Skip to content

Commit

Permalink
[FIX] account_invoice_tax: onchange_tax_id
Browse files Browse the repository at this point in the history
Ticket: 63705
  • Loading branch information
pablohmontenegro authored and ica-adhoc committed Oct 3, 2023
1 parent dedfc4f commit 8118117
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions account_invoice_tax/wizards/account_invoice_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ def onchange_move_id(self):

@api.onchange('tax_id')
def onchange_tax_id(self):
tax_line = self.move_id.line_ids.filtered(lambda x: x.tax_line_id and x.tax_line_id.id == self.tax_id.id)
if tax_line:
self.amount = abs(tax_line.amount_currency)
for rec in self:
tax_line = rec.move_id.line_ids.filtered(lambda x: x.tax_line_id and x.tax_line_id.id == rec.tax_id.id)
if tax_line:
rec.amount = abs(tax_line.amount_currency)

def _get_amount_updated_values(self):
debit = credit = 0
Expand Down

0 comments on commit 8118117

Please sign in to comment.