From bdb7d7677a7d772dd407ac768aca79a496613ee2 Mon Sep 17 00:00:00 2001 From: Eduardo De Miguel Date: Fri, 13 Sep 2024 10:42:56 +0200 Subject: [PATCH] [FIX] hr_expense_invoice: Decide when to check expense amount --- hr_expense_invoice/models/account_move.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hr_expense_invoice/models/account_move.py b/hr_expense_invoice/models/account_move.py index ad6ddc215..3fb282484 100644 --- a/hr_expense_invoice/models/account_move.py +++ b/hr_expense_invoice/models/account_move.py @@ -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")