Skip to content

Commit

Permalink
[FIX] account: use 'journal' instead of 'self' in _methods_compute
Browse files Browse the repository at this point in the history
Using 'self' triggers a ValueError: Expected singleton
  • Loading branch information
Olivier Laurent committed Sep 15, 2015
1 parent e9ff413 commit 0902554
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/account/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ def name_get(self):
@api.depends('inbound_payment_method_ids', 'outbound_payment_method_ids')
def _methods_compute(self):
for journal in self:
journal.at_least_one_inbound = bool(len(self.inbound_payment_method_ids))
journal.at_least_one_outbound = bool(len(self.outbound_payment_method_ids))
journal.at_least_one_inbound = bool(len(journal.inbound_payment_method_ids))
journal.at_least_one_outbound = bool(len(journal.outbound_payment_method_ids))


class ResPartnerBank(models.Model):
Expand Down

0 comments on commit 0902554

Please sign in to comment.