diff --git a/__init__.py b/__init__.py index f9b3583f95..c857677248 100644 --- a/__init__.py +++ b/__init__.py @@ -7,6 +7,7 @@ from .product import * from .stock import * from .configuration import * from .invoice import * +from .party import PartyReplace def register(): @@ -40,4 +41,5 @@ def register(): HandleShipmentException, HandleInvoiceException, OpenProductQuantitiesByWarehouse, + PartyReplace, module='purchase', type_='wizard') diff --git a/party.py b/party.py new file mode 100644 index 0000000000..1f2402b0e9 --- /dev/null +++ b/party.py @@ -0,0 +1,17 @@ +# 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() + [ + ('purchase.product_supplier', 'party'), + ('purchase.purchase', 'party'), + ]