diff --git a/account_invoice_margin/account_invoice.py b/account_invoice_margin/account_invoice.py index 0af9c5c..b7adece 100644 --- a/account_invoice_margin/account_invoice.py +++ b/account_invoice_margin/account_invoice.py @@ -104,12 +104,9 @@ class AccountInvoice(models.Model): @api.one @api.depends( - 'currency_id', 'date_invoice', 'type', 'move_id', + 'type', 'invoice_line.margin_invoice_currency', 'invoice_line.margin_company_currency') - # I invalidate on move_id because the currency rate used for accounting - # entries is the currency rate available on invoice validation, so when - # the move_id field is written def _compute_margin(self): margin_inv_cur = 0.0 margin_comp_cur = 0.0