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

View 17.0 View 20.0
Inputs Method Outputs
  • company_id
  • country_code
for record in self:
            allowed_companies = record.company_id or self.env.companies
-             record.fiscal_country_codes = ",".join(allowed_companies.mapped('account_fiscal_country_id.code'))
+             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))
  • fiscal_country_codes

Back to entity