mirror of
https://gitlab.com/datalifeit/trytond-account_bank
synced 2023-12-14 06:23:07 +01:00
depends' methods must be a method name, not a field name.
This commit is contained in:
parent
eddf814da4
commit
d18aac08af
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue