Skip to content
Snippets Groups Projects
Commit 7c5ce75a authored by Jérome Maes's avatar Jérome Maes
Browse files

[FIX] analytic: missing depends

This commit adds a missing `depends` on the `debit` and `credit` computed
field on analytic account model. Indeed, without that, the recompute is not
done when accessing thoses fields after adding lines in the same
transaction (like in tests).

Task-1911581
parent 00ac6c60
No related branches found
No related tags found
No related merge requests found
......@@ -78,6 +78,7 @@ class AccountAnalyticAccount(models.Model):
line['credit'] = sum(accounts.mapped('credit'))
return res
@api.depends('line_ids.amount')
def _compute_debit_credit_balance(self):
Curr = self.env['res.currency']
analytic_line_obj = self.env['account.analytic.line']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment