Import extra module exception only when used

issue10449
review348711002
This commit is contained in:
Cédric Krier
2021-06-25 01:16:35 +02:00
parent 2d81e331fd
commit 716d0f2a3e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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')
+1 -1
View File
@@ -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')