diff --git a/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py b/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py index 686704fd370..3bb75c72ff5 100644 --- a/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py +++ b/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py @@ -67,11 +67,10 @@ class AccountEdiXmlUBL20(models.AbstractModel): }] def _get_partner_contact_vals(self, partner): - phone = partner.phone or partner.mobile return { 'id': partner.id, 'name': partner.name, - 'telephone': phone and phone.strip(), + 'telephone': partner.phone or partner.mobile, 'electronic_mail': partner.email, } diff --git a/addons/l10n_sa_edi/models/account_edi_xml_ubl_21_zatca.py b/addons/l10n_sa_edi/models/account_edi_xml_ubl_21_zatca.py index 84c8b4c85af..e6482eef052 100644 --- a/addons/l10n_sa_edi/models/account_edi_xml_ubl_21_zatca.py +++ b/addons/l10n_sa_edi/models/account_edi_xml_ubl_21_zatca.py @@ -94,6 +94,12 @@ class AccountEdiXmlUBL21Zatca(models.AbstractModel): return [{'actual_delivery_date': invoice.delivery_date or invoice.invoice_date, 'delivery_address_vals': self._get_partner_address_vals(shipping_address) if shipping_address else {},}] + def _get_partner_contact_vals(self, partner): + res = super()._get_partner_contact_vals(partner) + if res.get('telephone'): + res['telephone'] = res['telephone'].replace(' ', '') + return res + def _get_partner_party_identification_vals_list(self, partner): """ Override to include/update values specific to ZATCA's UBL 2.1 specs """ return [{ diff --git a/addons/l10n_sa_edi/tests/compliance/simplified/credit.xml b/addons/l10n_sa_edi/tests/compliance/simplified/credit.xml index 4397c2e53f8..3a8a785246f 100644 --- a/addons/l10n_sa_edi/tests/compliance/simplified/credit.xml +++ b/addons/l10n_sa_edi/tests/compliance/simplified/credit.xml @@ -101,7 +101,7 @@ 1 SA Company Test - +966 51 234 5678 + +966512345678 info@company.saexample.com diff --git a/addons/l10n_sa_edi/tests/compliance/simplified/debit.xml b/addons/l10n_sa_edi/tests/compliance/simplified/debit.xml index b89bb2b738e..b6349951ab0 100644 --- a/addons/l10n_sa_edi/tests/compliance/simplified/debit.xml +++ b/addons/l10n_sa_edi/tests/compliance/simplified/debit.xml @@ -101,7 +101,7 @@ 1 SA Company Test - +966 51 234 5678 + +966512345678 info@company.saexample.com diff --git a/addons/l10n_sa_edi/tests/compliance/simplified/invoice.xml b/addons/l10n_sa_edi/tests/compliance/simplified/invoice.xml index cf8facbfa33..28c294e86b1 100644 --- a/addons/l10n_sa_edi/tests/compliance/simplified/invoice.xml +++ b/addons/l10n_sa_edi/tests/compliance/simplified/invoice.xml @@ -96,7 +96,7 @@ 1 SA Company Test - +966 51 234 5678 + +966512345678 info@company.saexample.com diff --git a/addons/l10n_sa_edi/tests/compliance/standard/credit.xml b/addons/l10n_sa_edi/tests/compliance/standard/credit.xml index 0db2edb6f76..dc3da47e48e 100644 --- a/addons/l10n_sa_edi/tests/compliance/standard/credit.xml +++ b/addons/l10n_sa_edi/tests/compliance/standard/credit.xml @@ -95,7 +95,7 @@ 337 SA Company Test - +966 51 234 5678 + +966512345678 info@company.saexample.com diff --git a/addons/l10n_sa_edi/tests/compliance/standard/debit.xml b/addons/l10n_sa_edi/tests/compliance/standard/debit.xml index 4b314353233..690cedce8c0 100644 --- a/addons/l10n_sa_edi/tests/compliance/standard/debit.xml +++ b/addons/l10n_sa_edi/tests/compliance/standard/debit.xml @@ -95,7 +95,7 @@ 547 SA Company Test - +966 51 234 5678 + +966512345678 info@company.saexample.com diff --git a/addons/l10n_sa_edi/tests/compliance/standard/invoice.xml b/addons/l10n_sa_edi/tests/compliance/standard/invoice.xml index 6fe81700176..a8cefd0386f 100644 --- a/addons/l10n_sa_edi/tests/compliance/standard/invoice.xml +++ b/addons/l10n_sa_edi/tests/compliance/standard/invoice.xml @@ -89,7 +89,7 @@ 33 SA Company Test - +966 51 234 5678 + +966512345678 info@company.saexample.com