From 024cf87978477aa2bc78ffdca4ff736bc7fdea71 Mon Sep 17 00:00:00 2001 From: Frederik Jaeckel Date: Mon, 27 Jan 2025 10:55:17 +0100 Subject: [PATCH 1/2] configuration: add filter to 'product_category' --- configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration.py b/configuration.py index 5708df5..b4048b6 100644 --- a/configuration.py +++ b/configuration.py @@ -34,7 +34,7 @@ class Configuration(metaclass=PoolMeta): product_category = fields.Many2Many( string='Categories', origin='config', target='category', help='Categories used to determine tax and accounts for a product ' + - 'on an invoice line.', + 'on an invoice line.', filter=[('accounting', '=', True)], relation_name='document.incoming.confprodcat_rel') @classmethod From 5fc191697a66cc5d32b10bbe81d1ed97fa10b460 Mon Sep 17 00:00:00 2001 From: Frederik Jaeckel Date: Mon, 27 Jan 2025 12:32:49 +0100 Subject: [PATCH 2/2] extras_depend to sale_point_invoice to arrange order of execution of '_process_supplier_invoice' --- tests/test_module.py | 12 +++++++++++- tryton.cfg | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/test_module.py b/tests/test_module.py index 96a4dde..25ae8ef 100644 --- a/tests/test_module.py +++ b/tests/test_module.py @@ -4,7 +4,7 @@ # this repository contains the full copyright notices and license terms. -from trytond.tests.test_tryton import ModuleTestCase +from trytond.tests.test_tryton import ModuleTestCase, activate_module from .document import DocumentTestCase @@ -14,6 +14,16 @@ class XmlIncomingTestCase( 'Test document incoming xml converter module' module = 'document_incoming_invoice_xml' + @classmethod + def setUpClass(cls): + """ add modelues + """ + super(XmlIncomingTestCase, cls).setUpClass() + try: + activate_module(['sale_point_invoice']) + except Exception as e1: + print('- skipped install of "sale_point_invoice"', str(e1)) + # end XmlIncomingTestCase diff --git a/tryton.cfg b/tryton.cfg index db07b00..fde7a46 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -3,6 +3,8 @@ version=7.0.0 depends: document_incoming_invoice edocument_unece +extras_depend: + sale_point_invoice xml: message.xml configuration.xml