Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Import/Export electronic invoices with UBL/CII

Entity: res.partner

Compute Method: _compute_ubl_cii_format

Inputs Method Outputs
format_mapping = self._get_ubl_cii_formats()
for partner in self:
            country_code = partner._deduce_country_code()
            if country_code == 'DE' and partner.peppol_eas == '0204':
                partner.ubl_cii_format = 'xrechnung'
            elif country_code in format_mapping:
                partner.ubl_cii_format = format_mapping[country_code]
            elif country_code in PEPPOL_DEFAULT_COUNTRIES and country_code in EAS_MAPPING:
                partner.ubl_cii_format = 'ubl_bis3'
            else:
                partner.ubl_cii_format = partner.ubl_cii_format

Back to entity