mirror of
https://gitlab.com/datalifeit/trytond-account_bank
synced 2023-12-14 06:23:07 +01:00
Add _parent_move.id to several on_change_with methods.
This commit is contained in:
parent
b0f693f7ca
commit
d1dca53b2b
10
account.py
10
account.py
|
@ -333,7 +333,7 @@ class Line(BankMixin, metaclass=PoolMeta):
|
|||
if self.payment_type and self.party:
|
||||
self._get_bank_account()
|
||||
|
||||
@fields.depends('party', 'debit', 'credit', 'move')
|
||||
@fields.depends('party', 'debit', 'credit', 'move', '_parent_move.id')
|
||||
def on_change_with_payment_type(self, name=None):
|
||||
if self.party:
|
||||
if self.credit > 0 or self.debit < 0:
|
||||
|
@ -439,6 +439,14 @@ class Line(BankMixin, metaclass=PoolMeta):
|
|||
)
|
||||
return [('party', operator, query)]
|
||||
|
||||
@fields.depends('_parent_move.id')
|
||||
def on_change_with_account_bank_from(self, name=None):
|
||||
return super().on_change_with_account_bank_from(name)
|
||||
|
||||
@fields.depends('_parent_move.id')
|
||||
def on_change_with_bank_account(self):
|
||||
return super().on_change_with_bank_account()
|
||||
|
||||
|
||||
class CompensationMoveStart(ModelView, BankMixin):
|
||||
'Create Compensation Move Start'
|
||||
|
|
Loading…
Reference in a new issue