From 9f1a08d1b6dd7dca80a3dd666020a3b52832e37c Mon Sep 17 00:00:00 2001 From: wan Date: Thu, 8 Jul 2021 14:53:45 +0000 Subject: [PATCH] [FIX] l10n_it_stock_ddt: manage l10n_it_edi_sdiscoop installed These modules will need to be merged, but in the meantime the tests need to be green for the CI. A constraint is raised in `account_edi_proxy_client` is we do not call that method. --- addons/l10n_it_stock_ddt/tests/test_ddt.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/l10n_it_stock_ddt/tests/test_ddt.py b/addons/l10n_it_stock_ddt/tests/test_ddt.py index db88d772ffa..29752915d8b 100644 --- a/addons/l10n_it_stock_ddt/tests/test_ddt.py +++ b/addons/l10n_it_stock_ddt/tests/test_ddt.py @@ -12,7 +12,7 @@ class TestDDT(TestSaleCommon): super().setUpClass(chart_template_ref=chart_template_ref) cls.company_data['company'].write({ 'vat':"IT12345670017", - 'country_id': cls.env.ref('base.it'), + 'country_id': cls.env.ref('base.it').id, 'l10n_it_codice_fiscale': '01234560157', 'l10n_it_tax_system': 'RF01', 'street': 'Via Giovanni Maria Platina 66', @@ -27,10 +27,15 @@ class TestDDT(TestSaleCommon): 'street': 'Piazza Guglielmo Marconi 5', 'zip': '26100', 'city': 'Cremona', - 'country_id': cls.env.ref('base.it'), + 'country_id': cls.env.ref('base.it').id, 'vat': 'IT12345670124' }) + settings = cls.env['res.config.settings'].create({}) + if hasattr(settings, 'button_create_proxy_user'): + # Needed when `l10n_it_edi_sdiscoop` is installed + settings.button_create_proxy_user() + def test_ddt_flow(self): """