From a2a0f387e580d1ca14d4258bc47b404ce334303c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 4 Mar 2018 01:16:04 +0100 Subject: [PATCH] Manage Replace Wizard issue7171 review37041002 --- __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 bbc14b96de..8418cfd3cb 100644 --- a/__init__.py +++ b/__init__.py @@ -7,6 +7,7 @@ from . import recurrence from . import service from . import subscription from . import invoice +from . import party def register(): @@ -26,6 +27,7 @@ def register(): Pool.register( subscription.CreateLineConsumption, subscription.CreateSubscriptionInvoice, + party.PartyReplace, module='sale_subscription', type_='wizard') Pool.register( module='sale_subscription', type_='report') diff --git a/party.py b/party.py new file mode 100644 index 0000000000..4de3a1ef40 --- /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() + [ + ('sale.subscription', 'party'), + ]