Skip to content

[15.0-->16.0] hr_expense_sheet all report already paid AND reconciled need to be register payment of 0,00€ amount to access 'Entry journal'? #5464

Description

@yboujraf

Module

hr_expense_sheet

Describe the bug

This explains what we experience:

15.0

def action_open_account_move(self):
    self.ensure_one()
    return {
        'name': self.account_move_id.name,
        'type': 'ir.actions.act_window',
        'view_type': 'form',
        'view_mode': 'form',
        'res_model': 'account.move',
        'res_id': self.account_move_id.id
    }

16.0

def action_open_account_move(self):
    self.ensure_one()
    return {
        'name': self.account_move_id.name,
        'type': 'ir.actions.act_window',
        'view_mode': 'form',
        'views': [[False, "form"]],
        'res_model': 'account.move' if self.payment_mode == 'own_account' else 'account.payment',
        'res_id': self.account_move_id.id if self.payment_mode == 'own_account' else self.account_move_id.payment_id.id,
    }

16.0 works with an account.payment object for company paid expenses and I suppose that the OCA openupgrade script misses the migration logic for this.

To Reproduce

Affected versions:
16.0

Steps to reproduce the behavior:

  1. we open the report on version 15.0 and 16.0 CE
Image
  1. When click on "Journal Entry"
Image

In odoo 15.0 normal view "journal Entry"
In odoo 16.0 not access to "journal entry" till we 'confirm' a register payment of "0,00€"

  1. Edit View: Form - view name hr.expense.sheet.form
Image

If we manually change the value of the flag : "account_move_id" invisible="0" then I can see my 'journal Entry"

Refresh the view

Image Image Image

Fix manually,

We tried to unreconcile bank,..,, cancel the journal, report, ... and recreate the report, register payment, ... but we have 500 reports since 2023 affected

We are blocked just because peppol is available only on 16.0 CE

Thanks if anybody could highlight my path.

Best Regards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions