Manage Replace Wizard

issue5820
review26781002
This commit is contained in:
Cédric Krier
2016-10-11 18:18:01 +02:00
parent db40c884cb
commit e87c2d058d
2 changed files with 16 additions and 1 deletions
+3
View File
@@ -14,3 +14,6 @@ def register():
BankAccountParty,
Party,
module='bank', type_='model')
Pool.register(
PartyReplace,
module='bank', type_='wizard')
+13 -1
View File
@@ -4,7 +4,7 @@ from trytond.pool import PoolMeta
from trytond.model import fields
__all__ = ['Party']
__all__ = ['Party', 'PartyReplace']
class Party:
@@ -24,3 +24,15 @@ class Party:
domain,
('bank_accounts',) + tuple(clause[1:]),
]
class PartyReplace:
__metaclass__ = PoolMeta
__name__ = 'party.replace'
@classmethod
def fields_to_replace(cls):
return super(PartyReplace, cls).fields_to_replace() + [
('bank', 'party'),
('bank.account-party.party', 'owner'),
]