OCA / account-financial-tools

Odoo Accountant Financial Tools and Utils
GNU Affero General Public License v3.0
298 stars 739 forks source link

[14.0][FIX] account_move_template: Replace old attribute name tag_ids with new one tax_tag_ids #1875

Closed QuiJoQuim closed 1 month ago

QuiJoQuim commented 2 months ago

This module's wizard throws an error when creating a move from a move_template with tax ids on any line.

This is because of a change in v13->v14 in account_move_line.tag_ids field name:

v13: ([https://github.com/odoo/odoo/blob/13.0/addons/account/models/account_move.py#L2795](https://github.com/odoo/odoo/blob/13.0/addons/account/models/account_move.py#L2795)) tag_ids = fields.Many2many(string="Tags", comodel_name='account.account.tag'...

v14: ([https://github.com/odoo/odoo/blob/14.0/addons/account/models/account_move.py#L3386](https://github.com/odoo/odoo/blob/14.0/addons/account/models/account_move.py#L3386)) tax_tag_ids = fields.Many2many(string="Tags", comodel_name='account.account.tag'...

This PR changes the attribute name in the account_move_template creation's wizard.

oyale commented 1 month ago

Tested and working, thanks for the PR!

QuiJoQuim commented 1 month ago

Please can anybody review this?

The only change is doing the same is done in v16: https://github.com/OCA/account-financial-tools/blob/0c6bc4edb91a1548e2d0ec4caa42f2d05d42785b/account_move_template/wizard/account_move_template_run.py#L235

This part has never been covered by tests.