Skip to content

Commit

Permalink
[FIX] hr_expense_invoice: Decide when to check expense amount
Browse files Browse the repository at this point in the history
  • Loading branch information
Shide committed Sep 13, 2024
1 parent f787c47 commit b4cc7ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hr_expense_invoice/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ def write(self, vals):
# Check if the amount of the invoice linked to an invoice is different
# Done here in the write instead of a Python constraint as the computed field
# amount_total is not yet updated on that moment
# Only need to check expenses amount when the invoice amount changes
check_expenses = "tax_totals" in vals
res = super().write(vals)
if self.env.context.get("skip_account_move_synchronization"):
if not check_expenses:
return res
DecimalPrecision = self.env["decimal.precision"]
precision = DecimalPrecision.precision_get("Product Price")
Expand Down

0 comments on commit b4cc7ac

Please sign in to comment.