From 9ea04fa4b2024e1d4cf2e11c64e6c261ed84d8d6 Mon Sep 17 00:00:00 2001 From: "Anh Thao Pham (pta)" Date: Thu, 10 Jun 2021 12:40:52 +0000 Subject: [PATCH] [FIX] account: fix taxes set on invoice sections & notes at creation When adding a section or a note on an invoice, default taxes are set on the account move line, making the corresponding Tax Group to appear on the invoice. opw-2541722 closes odoo/odoo#72337 X-original-commit: a8d3f466dfffca08214acecf08ec298e3ace6272 Signed-off-by: Cedric Snauwaert (csn) Signed-off-by: Anh Thao PHAM --- addons/account/models/account_move.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index ae773b04b0e..30c9205ea32 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -3651,6 +3651,8 @@ class AccountMoveLine(models.Model): @api.onchange('product_uom_id') def _onchange_uom_id(self): ''' Recompute the 'price_unit' depending of the unit of measure. ''' + if self.display_type in ('line_section', 'line_note'): + return taxes = self._get_computed_taxes() if taxes and self.move_id.fiscal_position_id: taxes = self.move_id.fiscal_position_id.map_tax(taxes)