From 82d2dcdf7db065bd325f56f779e3a3400fa73323 Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Wed, 25 Mar 2020 09:51:52 +0000 Subject: [PATCH] [FIX] l10n_it_edi: fix test After d3ddcc613f873b2f7073c45fea16c1f57abe278a l10n_it_edi started to fail its tests because not adapted, porting the code from the same commit fix the issue opw-2214185 closes odoo/odoo#48397 X-original-commit: 33e80333b84d71ae0f61d4ab0e3aa7fdfcdf0f78 Signed-off-by: Nicolas Martinelli (nim) --- addons/l10n_it_edi/tests/test_generate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_it_edi/tests/test_generate.py b/addons/l10n_it_edi/tests/test_generate.py index e0518666c09..a885ccd46f0 100644 --- a/addons/l10n_it_edi/tests/test_generate.py +++ b/addons/l10n_it_edi/tests/test_generate.py @@ -6,7 +6,7 @@ from odoo.tests.common import TransactionCase, Form class TestItalianElectronicInvoice(TransactionCase): def test_state(self): - f = Form(self.env['account.move']) + f = Form(self.env['account.move'].with_context(default_type='out_invoice')) f.partner_id = self.env.ref('base.res_partner_12') with f.invoice_line_ids.new() as l: l.product_id = self.env.ref('product.product_product_3')