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_peppol_endpoint

Inputs Method Outputs
""" If the EAS changes and a valid endpoint is available, set it. Otherwise, keep the existing value."""
for partner in self:
            partner.peppol_endpoint = partner.peppol_endpoint
            country_code = partner._deduce_country_code()
            if country_code in EAS_MAPPING:
                field = EAS_MAPPING[country_code].get(partner.peppol_eas)
                value = partner._get_peppol_endpoint_value(country_code, field)
                if field and value and not partner._build_error_peppol_endpoint(partner.peppol_eas, value):
                    partner.peppol_endpoint = value

Back to entity