OpenUpgrade icon indicating copy to clipboard operation
OpenUpgrade copied to clipboard

[13.0] wrong rename for account.move.reverse_entry_id

Open Lukwos opened this issue 1 year ago • 1 comments

I don't know if it's a bug or I misunderstand something

In 12.0 reverse_entry_id is set in the original move and point to the reverse move https://github.com/odoo/odoo/blob/12.0/addons/account/models/account_move.py#L469

In 13.0 reversed_entry_id is set in the reverse move and point to the original move https://github.com/odoo/odoo/blob/13.0/addons/account/models/account_move.py#L2247

But in the pre-migration we rename reverse_entry_id to reversed_entry_id and so point in the wrong direction https://github.com/OCA/OpenUpgrade/blob/13.0/addons/account/migrations/13.0.1.1/pre-migration.py#L37

Lukwos avatar Apr 05 '24 10:04 Lukwos

Yes, it's a mistake. Can you please propose the fix doing?:

  • Not doing renaming.
  • Adapting the code at https://github.com/OCA/OpenUpgrade/blob/39543a8a93f2645f772faa3d763315a1523c675b/addons/account/migrations/13.0.1.1/post-migration.py#L583. I would say there's nothing to do though, as the field will be NULL.
  • Adding the conversion for the rest of the moves that are not invoices.

pedrobaeza avatar Apr 13 '24 11:04 pedrobaeza