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 bdb7d76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hr_expense_invoice/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def write(self, vals):
# Done here in the write instead of a Python constraint as the computed field
# amount_total is not yet updated on that moment
res = super().write(vals)
if self.env.context.get("skip_account_move_synchronization"):
# Only need to check expenses amount when the invoice amount changes
if not ("amount_total" in vals or "tax_totals" in vals):
return res
DecimalPrecision = self.env["decimal.precision"]
precision = DecimalPrecision.precision_get("Product Price")
Expand Down

0 comments on commit bdb7d76

Please sign in to comment.