From 4f477e740983da546d760a8a973d7dd40a26ef3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 11 Oct 2016 18:17:34 +0200 Subject: [PATCH] Manage Replace Wizard issue5820 review29611002 --- __init__.py | 2 ++ party.py | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 party.py 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'), + ]