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: personal.income.tax

Compute Method: _compute_effective_date

Inputs Method Outputs
for rec in self:
            rec.effective_date = False
            # Check len string (before convert) and digit int (after convert)
            if (
                rec.calendar_year.isdigit()
                and len(rec.calendar_year) == 4
                and len(str(int(rec.calendar_year))) == 4
            ):
                rec.effective_date = f"{rec.calendar_year}-01-01"

Back to entity