mirror of
https://github.com/NaN-tic/trytond-account_move_party_required.git
synced 2023-12-13 20:40:11 +01:00
Fix DeprecationWarning: on_change argument is deprecated, use the depends decorator
This commit is contained in:
parent
6871afad92
commit
b0edd121c2
1 changed files with 3 additions and 2 deletions
|
@ -51,9 +51,10 @@ class Account(ModelSQL, ModelView):
|
|||
|
||||
class Line(ModelSQL, ModelView):
|
||||
__name__ = 'account.move.line'
|
||||
party_required = fields.Function(fields.Boolean('Party Required',
|
||||
on_change_with=['account']), 'on_change_with_party_required')
|
||||
party_required = fields.Function(fields.Boolean('Party Required'),
|
||||
'on_change_with_party_required')
|
||||
|
||||
@fields.depends('account')
|
||||
def on_change_with_party_required(self, name=None):
|
||||
if self.account:
|
||||
return self.account.party_required
|
||||
|
|
Loading…
Reference in a new issue