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: account.payment

Compute Method: _compute_l10n_th_wth_condition

View 20.0
Inputs Method Outputs
  • withhold
  • country_code
  • l10n_th_wth_condition
+ """
+         Compute the default value only if relevant for the current payment's country.
+         """
+ for payment in self:
+             if payment.withhold != 'payment' and payment.country_code == 'TH':
+                 payment.l10n_th_wth_condition = payment.l10n_th_wth_condition or 'at_source'
+             else:
+                 payment.l10n_th_wth_condition = False
  • l10n_th_wth_condition

Back to entity