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

Module: Ecuadorian Accounting

Entity: res.partner

Compute Method: _compute_l10n_ec_vat_validation

Inputs Method Outputs
  • country_code
for partner in self:
            partner.l10n_ec_vat_validation = False
            vals = partner._get_preferred_tax_identifier_vals()
            if partner.country_code != 'EC' or not vals or verify_final_consumer(vals['value']):
                continue
            if not partner._validate_identifier(vals['key'], vals['value'])['valid']:
                partner.l10n_ec_vat_validation = self.env._(
                    "The VAT %s seems to be invalid as the tenth digit doesn't comply with the validation algorithm "
                    "(SRI has stated that this validation is not required anymore for some VAT numbers)", vals['value'])

Back to entity