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

Module: Thai Localization - VAT and Withholding Tax

Entity: account.payment

Compute Method: _compute_has_wht

View 18.0
Inputs Method Outputs
  • move_id
  • move_id.line_ids
  • payment_type
+ """Has WHT when
+         1. Has wht_tax_id
+         2. payment is not received (sale type)
+         """
+ for rec in self:
+             wht_tax = bool(rec.move_id.line_ids.filtered("wht_tax_id"))
+             not_inv = rec.payment_type != "inbound"
+             rec.has_wht = wht_tax and not_inv
  • has_wht

Back to entity