From 0da7184b67199e6944945558db63f55577ee5dbc Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 27 Jul 2016 15:07:25 +0200 Subject: [PATCH] [FIX] account: fix dependencies for amount_residual computation when we unreconcile an entry, amount_residual is not recompute due to missing dependencies. Resulting in problem when trying to reconcile the move later on as amount_residual is zero and aml is considered already reconciled --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 1bf26268771..ad3ae7607d6 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -232,7 +232,7 @@ class AccountMoveLine(models.Model): _description = "Journal Item" _order = "date desc, id desc" - @api.depends('debit', 'credit', 'amount_currency', 'currency_id', 'matched_debit_ids.amount', 'matched_credit_ids.amount', 'account_id.currency_id', 'move_id.state') + @api.depends('debit', 'credit', 'amount_currency', 'currency_id', 'matched_debit_ids', 'matched_credit_ids', 'matched_debit_ids.amount', 'matched_credit_ids.amount', 'account_id.currency_id', 'move_id.state') def _amount_residual(self): """ Computes the residual amount of a move line from a reconciliable account in the company currency and the line's currency. This amount will be 0 for fully reconciled lines or lines from a non-reconciliable account, the original line amount