Skip to content

Commit

Permalink
[FIX] account: fix taxes set on invoice sections & notes at creation
Browse files Browse the repository at this point in the history
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#72324

X-original-commit: a8d3f46
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
  • Loading branch information
kitan191 committed Jun 18, 2021
1 parent 5f7cd8e commit 36c72a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/account/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -3547,6 +3547,8 @@ def _onchange_product_id(self):
@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, partner=self.partner_id)
Expand Down

0 comments on commit 36c72a5

Please sign in to comment.