From fd4b87853ab30ded8d990bcbf7acf77866860168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 20 Mar 2018 17:30:09 +0100 Subject: [PATCH] Add depends on Pool.register issue7178 review37051002 --- __init__.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/__init__.py b/__init__.py index 1f53fbb438..83f6d0b45a 100644 --- a/__init__.py +++ b/__init__.py @@ -2,16 +2,22 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import Pool -from carrier import * -from stock import * -from sale import * +from . import carrier +from . import stock +from . import sale def register(): Pool.register( - Carrier, - WeightPriceList, - ShipmentIn, - ShipmentOut, - Sale, + carrier.Carrier, + carrier.WeightPriceList, module='carrier_weight', type_='model') + Pool.register( + stock.ShipmentIn, + module='carrier_weight', type_='model', + depends=['purchase_shipment_cost']) + Pool.register( + stock.ShipmentOut, + sale.Sale, + module='carrier_weight', type_='model', + depends=['sale_shipment_cost'])