From f48f19073bbef391786bcec2dd202e3fbf704db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 20 Mar 2018 17:29:24 +0100 Subject: [PATCH] Add depends on Pool.register issue7178 review37051002 --- __init__.py | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/__init__.py b/__init__.py index 76e1176393..ba2393797c 100644 --- a/__init__.py +++ b/__init__.py @@ -2,19 +2,31 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import Pool -from .account import * -from .sale import * -from .purchase import * +from . import account +from . import sale +from . import purchase from . import stock def register(): Pool.register( - TaxRuleLineTemplate, - TaxRuleLine, - InvoiceLine, - Sale, - SaleLine, - PurchaseLine, - stock.Move, + account.TaxRuleLineTemplate, + account.TaxRuleLine, module='account_tax_rule_country', type_='model') + Pool.register( + account.InvoiceLine, + module='account_tax_rule_country', type_='model', + depends=['account_invoice']) + Pool.register( + sale.Sale, + sale.SaleLine, + module='account_tax_rule_country', type_='model', + depends=['sale']) + Pool.register( + purchase.PurchaseLine, + module='account_tax_rule_country', type_='model', + depends=['purchase']) + Pool.register( + stock.Move, + module='account_tax_rule_country', type_='model', + depends=['stock'])