[FIX] account_edi_ubl_cii: fix import facturx
Factur-x import is broken since: 4ea13aea05b1d9650a2c9605d24ac7d69583cefa Indeed, for non FR/DE companies, the `_get_xml_builder` is now returning None, thus the import `_create_invoice_from_xml_tree` and `_update_invoice_from_xml_tree` do not work. closes odoo/odoo#102777 X-original-commit: 6eb6662b53a521adda0588d05f316652b66e758b Signed-off-by: Laurent Smet <las@odoo.com> Signed-off-by: Julien Van Roy <juvr@odoo.com>
This commit is contained in:
@@ -180,7 +180,7 @@ class AccountEdiFormat(models.Model):
|
||||
('company_id', '=', self.env.company.id), ('type', '=', 'purchase')
|
||||
], limit=1)
|
||||
|
||||
if not self._is_ubl_cii_available(journal.company_id):
|
||||
if not self._is_ubl_cii_available(journal.company_id) and self.code != 'facturx_1_0_05':
|
||||
return super()._create_invoice_from_xml_tree(filename, tree, journal=journal)
|
||||
|
||||
# infer the xml builder
|
||||
@@ -197,7 +197,7 @@ class AccountEdiFormat(models.Model):
|
||||
# EXTENDS account_edi
|
||||
self.ensure_one()
|
||||
|
||||
if not self._is_ubl_cii_available(invoice.company_id):
|
||||
if not self._is_ubl_cii_available(invoice.company_id) and self.code != 'facturx_1_0_05':
|
||||
return super()._update_invoice_from_xml_tree(filename, tree, invoice)
|
||||
|
||||
# infer the xml builder
|
||||
|
||||
Reference in New Issue
Block a user