diff --git a/addons/account/models/account_account.py b/addons/account/models/account_account.py index e722472bbe5..a6f7dcbe785 100644 --- a/addons/account/models/account_account.py +++ b/addons/account/models/account_account.py @@ -284,10 +284,12 @@ class AccountAccount(models.Model): account.is_off_balance = account.internal_group == "off_balance" def _set_opening_debit(self): - self._set_opening_debit_credit(self.opening_debit, 'debit') + for record in self: + record._set_opening_debit_credit(record.opening_debit, 'debit') def _set_opening_credit(self): - self._set_opening_debit_credit(self.opening_credit, 'credit') + for record in self: + record._set_opening_debit_credit(record.opening_credit, 'credit') def _set_opening_debit_credit(self, amount, field): """ Generic function called by both opening_debit and opening_credit's