[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) <csn@openerp.com> Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user