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: _compute_l10n_th_branch_name

Inputs Method Outputs
  • is_company
  • country_code
for partner in self:
            if not partner.is_company or partner.country_code != 'TH':
                partner.l10n_th_branch_name = ""
            else:
                code = partner._get_additional_identifier('TH_BRANCH_CODE')
                partner.l10n_th_branch_name = partner.env._("Branch %(code)s", code=code) if code and code != "00000" else partner.env._(
                    "Headquarter")

Back to entity