From 6cbf4eaf7fbac8c39f12c17d3abecc58841c48b7 Mon Sep 17 00:00:00 2001 From: aserrador Date: Thu, 2 Jul 2026 19:21:02 -0500 Subject: [PATCH] move register from __init__ to tryton.cfg --- __init__.py | 22 ---------------------- tryton.cfg | 9 +++++++++ 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/__init__.py b/__init__.py index 8a49cb1..e69de29 100644 --- a/__init__.py +++ b/__init__.py @@ -1,22 +0,0 @@ -# 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 Pool -from . import invoice, purchase, sale - -__all__ = ['register'] - - -def register(): - Pool.register( - purchase.Purchase, - purchase.PurchaseLine, - sale.Sale, - sale.SaleLine, - invoice.Invoice, - invoice.InvoiceLine, - module='analytic_operations', type_='model') - Pool.register( - module='analytic_operations', type_='wizard') - Pool.register( - module='analytic_operations', type_='report') diff --git a/tryton.cfg b/tryton.cfg index 593079a..2b12c57 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -9,3 +9,12 @@ xml: purchase.xml sale.xml invoice.xml + +[register] +model: + purchase.Purchase + purchase.PurchaseLine + sale.Sale + sale.SaleLine + invoice.Invoice + invoice.InvoiceLine