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

Module: Sri Lanka - Accounting

Entity: res.partner

Compute Method: _compute_l10n_lk_vat_registered

Inputs Method Outputs
  • vat
"""Detect Sri Lankan VAT registration from the VAT number.

        We intentionally do not check the country, because the partner country may be missing.
        """
for partner in self:
            vat_digits = "".join(ch for ch in (partner.vat or "") if ch.isdigit())
            partner.l10n_lk_vat_registered = len(vat_digits) >= 13 and vat_digits[-4:] == "7000"

Back to entity