[FIX] account: add _run_vat_test in account to avoid base_vat dependency
This way, it can be used without having to add the dependency to `base_vat`. For instance, in `account_edi_ubl_cii` in `_import_retrieve_and_fill_partner`. This commit essentially backports part of commit 212be2920affdab5baf14b3025ef31ee2d6a652b closes odoo/odoo#136950 X-original-commit: 32e72ef26f033cf7701d7d797738688a339d9b77 Signed-off-by: Laurent Smet (las) <las@odoo.com> Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
This commit is contained in:
@@ -22,7 +22,7 @@ Note also that in order for Chorus Pro to automatically detect the "PDF/A-3 (Fac
|
||||
the "Factur-X PDF/A-3" option on the journal. This option will also validate the xml against the Factur-X and Chorus
|
||||
Pro rules and show the errors.
|
||||
""",
|
||||
'depends': ['account', 'base_vat'],
|
||||
'depends': ['account'],
|
||||
'data': [
|
||||
'data/cii_22_templates.xml',
|
||||
'data/ubl_20_templates.xml',
|
||||
|
||||
@@ -259,7 +259,8 @@ class AccountEdiXmlCII(models.AbstractModel):
|
||||
mail = _find_value(f"//ram:{role}//ram:URIID[@schemeID='SMTP']")
|
||||
vat = _find_value(f"//ram:{role}/ram:SpecifiedTaxRegistration/ram:ID")
|
||||
phone = _find_value(f"//ram:{role}/ram:DefinedTradeContact/ram:TelephoneUniversalCommunication/ram:CompleteNumber")
|
||||
self._import_retrieve_and_fill_partner(invoice, name=name, phone=phone, mail=mail, vat=vat)
|
||||
country_code = _find_value(f'//ram:{role}/ram:PostalTradeAddress//ram:CountryID')
|
||||
self._import_retrieve_and_fill_partner(invoice, name=name, phone=phone, mail=mail, vat=vat, country_code=country_code)
|
||||
|
||||
# ==== currency_id ====
|
||||
|
||||
|
||||
Reference in New Issue
Block a user