depends' methods must be a method name, not a field name.

This commit is contained in:
Albert Cervera i Areny 2018-08-17 22:59:48 +02:00
parent eddf814da4
commit d18aac08af

View file

@ -187,7 +187,8 @@ class BankMixin(object):
self.bank_account = default_bank
return
@fields.depends('party', 'payment_type', methods=['payment_type'])
@fields.depends('party', 'payment_type',
methods=['on_change_with_payment_type'])
def on_change_with_bank_account(self):
'''
Add account bank when changes payment_type or party.
@ -195,7 +196,8 @@ class BankMixin(object):
self._get_bank_account()
return self.bank_account.id if self.bank_account else None
@fields.depends('payment_type', 'party', methods=['payment_type'])
@fields.depends('payment_type', 'party',
methods=['on_change_with_payment_type'])
def on_change_with_account_bank_from(self, name=None):
'''
Sets the party where get bank account for this move line.