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

Module: Invoicing

Entity: res.partner

Compute Method: _compute_fiscal_country_codes

Inputs Method Outputs
  • company_id
  • country_code
for record in self:
            allowed_companies = record.company_id or self.env.companies
            country_codes = allowed_companies.mapped('account_fiscal_country_id.code')
            if record.country_code:
                country_codes.append(record.country_code)
            record.fiscal_country_codes = ",".join(set(country_codes))

Back to entity