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_address_no_country

View 20.0
Inputs Method Outputs
  • country_code
  • address_inline
+ """
+         Hide country from address if it is Thailand address. If not fallback to address_inline
+         """
+ for partner in self:
+             if partner.country_code != 'TH':
+                 partner.l10n_th_address_no_country = partner.address_inline
+                 continue
+             address_part_without_country = partner.address_inline.split(', ')[:-1]
+             partner.l10n_th_address_no_country = ', '.join(address_part_without_country)
  • l10n_th_address_no_country

Back to entity