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

Module: Thailand - Accounting

Entity: res.partner

Compute Method: _l10n_th_get_branch_name

Inputs Method Outputs
  • is_company
  • country_code
  • company_registry
for partner in self:
            if not partner.is_company or partner.country_code != 'TH':
                partner.l10n_th_branch_name = ""
            else:
                code = partner.company_registry
                partner.l10n_th_branch_name = f"Branch {code}" if code else "Headquarter"

Back to entity