[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
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user