From 716d0f2a3e64c76aae8de7b133c3b4d2f6f5e6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 25 Jun 2021 01:16:35 +0200 Subject: [PATCH] Import extra module exception only when used issue10449 review348711002 --- purchase.py | 2 +- sale.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/purchase.py b/purchase.py index 0ccf9898d6..526b2b1f24 100644 --- a/purchase.py +++ b/purchase.py @@ -5,7 +5,6 @@ from trytond.pool import PoolMeta, Pool from trytond.model import ModelSQL, ModelView, fields from trytond.modules.product import round_price -from trytond.modules.purchase.exceptions import PartyLocationError from .product import ComponentMixin from .common import order_mixin, order_line_mixin, order_line_component_mixin @@ -65,6 +64,7 @@ class LineComponent( __name__ = 'purchase.line.component' def get_move(self, move_type): + from trytond.modules.purchase.exceptions import PartyLocationError pool = Pool() Move = pool.get('stock.move') Date = pool.get('ir.date') diff --git a/sale.py b/sale.py index ba8fd9179b..4c42dab012 100644 --- a/sale.py +++ b/sale.py @@ -5,7 +5,6 @@ from trytond.pool import PoolMeta, Pool from trytond.model import ModelSQL, ModelView, fields from trytond.modules.product import round_price -from trytond.modules.sale.exceptions import PartyLocationError from .product import ComponentMixin from .common import order_mixin, order_line_mixin, order_line_component_mixin @@ -66,6 +65,7 @@ class LineComponent( return self.line.warehouse def get_move(self, shipment_type): + from trytond.modules.sale.exceptions import PartyLocationError pool = Pool() Move = pool.get('stock.move') Date = pool.get('ir.date')