diff --git a/__init__.py b/__init__.py index 6d60a3714e..6d7ca98dc1 100644 --- a/__init__.py +++ b/__init__.py @@ -6,6 +6,7 @@ from .commission import * from .invoice import * from .sale import * from .product import * +from . import party def register(): @@ -25,4 +26,5 @@ def register(): module='commission', type_='model') Pool.register( CreateInvoice, + party.PartyReplace, module='commission', type_='wizard') diff --git a/party.py b/party.py new file mode 100644 index 0000000000..722bc75ef9 --- /dev/null +++ b/party.py @@ -0,0 +1,16 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. +from trytond.pool import PoolMeta + +__all__ = ['PartyReplace'] + + +class PartyReplace: + __metaclass__ = PoolMeta + __name__ = 'party.replace' + + @classmethod + def fields_to_replace(cls): + return super(PartyReplace, cls).fields_to_replace() + [ + ('commission.agent', 'party'), + ]