Thai Localization - VAT and Withholding Tax

l10n_th_account_tax
REPOSITORY
REPOSITORYOCA/l10n-thailand
GIT
GIThttps://github.com/OCA/l10n-thailand.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-thailand/tree/18.0/l10n_th_account_tax
VERSION
VERSION 1.6.0
CATEGORY
CATEGORYLocalization / Accounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ecosoft
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ecosoft
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, Saran440, nakrob samael, theerayutEncoder
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-thailand
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:13
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module address 2 main tax requirement in Thailand

## 1. Tax Invoice (VAT)

Point of tax invoice can occur either on Invoice (VAT) or on Payment
(Undue VAT on invoice become VAT on payment)

## 2. Withholding Tax

This is the tax that is deducted during payment. There are 2 kinds of
withholding tax calculataion.

1.  Fixed rate of based amount, i.e., service 3%
2.  Progressive rate of accumulated amount, i.e., personal income tax

Code Analysis

Views touched (30)
XML IDNameModelTypeStatus
product_template_form_view product.template.form.inherit product.template xpath Inherits product.product_template_form_view
res_config_settings_view_form res.config.settings.view.form.thai.account res.config.settings xpath Inherits account.res_config_settings_view_form
view_account_form view.account.form account.account field Inherits account.view_account_form
view_account_move_reversal account.move.reversal.form account.move.reversal xpath Inherits account.view_account_move_reversal
view_account_payment_form account.view.account.payment.form account.payment div Inherits account.view_account_payment_form
view_account_payment_register_form account.payment.register.form account.payment.register field Inherits account.view_account_payment_register_form
view_account_payment_search account.payment.search account.payment xpath Inherits account.view_account_payment_search
view_account_withholding_tax_form view.account.withholding.tax.form account.withholding.tax form New
view_account_withholding_tax_income_code_form view.withholding.tax.income.code.form withholding.tax.code.income form New
view_account_withholding_tax_income_code_list view.withholding.tax.income.code.list withholding.tax.code.income list New
view_account_withholding_tax_income_code_search view.withholding.tax.income.code.search withholding.tax.code.income search New
view_account_withholding_tax_list view.account.withholding.tax.list account.withholding.tax list New
view_account_withholding_tax_search view.account.withholding.tax.search account.withholding.tax search New
view_clear_tax_form clear.tax.form clear.tax form New
view_move_form account.move.form account.move div Inherits account.view_move_form
view_partner_property_form res.partner.property.form.inherit res.partner div Inherits account.view_partner_property_form
view_personal_income_tax_form view.personal.income.tax.form personal.income.tax form New
view_personal_income_tax_list view.personal.income.tax.list personal.income.tax list New
view_pit_move_graph view.account.withholding.move.graph account.withholding.move graph New
view_pit_move_pivot view.account.withholding.move.pivot account.withholding.move pivot New
view_tax_form account.tax.form account.tax xpath Inherits account.view_tax_form
view_tax_invoice_form account.move.tax.invoice form New
view_tax_invoice_list account.move.tax.invoice list New
view_tax_invoice_search account.move.tax.invoice search New
view_wht_move_form view.account.withholding.move.form account.withholding.move form New
view_wht_move_list view.account.withholding.move.list account.withholding.move list New
view_wht_move_search view.account.withholding.move.search account.withholding.move search New
view_withholding_tax_cert_form view.withholding.tax.cert.form withholding.tax.cert form New
view_withholding_tax_cert_list view.withholding.tax.cert.list withholding.tax.cert list New
view_withholding_tax_cert_search view.withholding.tax.cert.search withholding.tax.cert search New
Models touched (21)

New fields (1)
  • wht_account Boolean
    default=False help='If check, this account is for withholding tax' string='WHT Account'
Public methods (0)

No public methods.

New fields (5)
  • has_wht Boolean
    compute='_compute_has_wht'
  • tax_invoice_ids One2many → account.move.tax.invoice
    comodel_name='account.move.tax.invoice' copy=False inverse_name='move_id'
  • wht_cert_ids One2many → withholding.tax.cert
    comodel_name='withholding.tax.cert' inverse_name='move_id' readonly=True string='Withholding Tax Cert.'
  • wht_cert_status Selection
    compute='_compute_wht_cert_status' selection=[('none', 'Not yet created'), ('draft', 'Draft'), ('done', 'Done'), ('cancel', 'Cancelled')]
  • wht_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' copy=False help='All withholding moves, including non-PIT' inverse_name='move_id' string='Withholding'
Public methods (7)
  • button_cancel(self)
  • button_draft(self)
  • button_wht_certs(self)
  • copy(self, default=None)
    For case reverse move, Tax number and date must have value from wizard reversal.
  • create_wht_cert(self)
    Create/replace one withholding tax cert from withholding move Group by partner and income type, regardless of wht_tax_id
  • js_assign_outstanding_line(self, line_id)
  • js_remove_outstanding_partial(self, partial_id)

New fields (3)
  • manual_tax_invoice Boolean
    copy=False help='Create Tax Invoice for this debit/credit line'
  • tax_invoice_ids One2many → account.move.tax.invoice
    comodel_name='account.move.tax.invoice' inverse_name='move_line_id'
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' compute='_compute_wht_tax_id' readonly=False store=True string='WHT'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (2)
  • tax_invoice_date Date
    copy=False
  • tax_invoice_number Char
    copy=False
Public methods (1)
  • reverse_moves(self, is_modify=False)

New fields (18)
  • account_id Many2one → account.account
    comodel_name='account.account' related='move_line_id.account_id' store=True
  • balance Monetary
    compute='_compute_tax_amount' copy=False currency_field='company_currency_id' readonly=False store=True string='Tax Amount'
  • company_currency_id Many2one → res.currency
    comodel_name='res.currency' related='company_id.currency_id'
  • company_id Many2one → res.company
    comodel_name='res.company' related='move_id.company_id' store=True
  • move_id Many2one → account.move
    comodel_name='account.move' copy=True index=True
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' copy=True index=True ondelete='cascade'
  • move_state Selection
    related='move_id.state' store=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' ondelete='restrict' string='Partner'
  • payment_id Many2one → account.payment
    comodel_name='account.payment' compute='_compute_payment_id' copy=True store=True
  • report_date Date
    compute='_compute_report_date' store=True
  • report_late_mo Selection
    default='0' required=True string='Report Late' args: [('0', '0 month'), ('1', '1 month'), ('2', '2 months'), ('3', '3 months'), ('4', '4 months'), ('5', '5 months'), ('6', '6 months')]
  • reversed_id Many2one → account.move
    comodel_name='account.move' help='This move that this move reverse'
  • reversing_id Many2one → account.move
    comodel_name='account.move' help='The move that reverse this move'
  • tax_base_amount Monetary
    compute='_compute_tax_amount' copy=False currency_field='company_currency_id' readonly=False store=True string='Tax Base'
  • tax_invoice_date Date
    copy=False
  • tax_invoice_number Char
    copy=False
  • tax_line_id Many2one → account.tax
    comodel_name='account.tax' related='move_line_id.tax_line_id' store=True
  • to_clear_tax Boolean
    related='payment_id.to_clear_tax'
Public methods (1)
  • unlink(self)
    Do not allow remove the last tax_invoice of move_line

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (9)
  • has_wht Boolean
    compute='_compute_has_wht'
  • pit_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' copy=False domain=[('is_pit', '=', True)] inverse_name='payment_id' string='Personal Income Tax'
  • tax_invoice_ids One2many → account.move.tax.invoice
    comodel_name='account.move.tax.invoice' copy=False domain=[('reversing_id', '=', False), ('reversed_id', '=', False)] inverse_name='payment_id'
  • tax_invoice_move_ids Many2many → account.move
    column1='payment_id' column2='tax_invoice_id' comodel_name='account.move' compute='_compute_tax_invoice_move_ids' relation='payment_tax_invoice_rel' string="Tax Invoice's Journal Entry"
  • to_clear_tax Boolean
    copy=False default=False help='When defer journal entry posting, this will show button'
  • wht_cert_ids One2many → withholding.tax.cert
    comodel_name='withholding.tax.cert' inverse_name='payment_id' readonly=True string='Withholding Tax Cert.'
  • wht_cert_status Selection
    compute='_compute_wht_cert_status' selection=[('none', 'Not yet created'), ('draft', 'Draft'), ('done', 'Done'), ('cancel', 'Cancelled')]
  • wht_certs_count Integer
    compute='_compute_wht_certs_count' string='# Withholding Tax Certs'
  • wht_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' copy=False help='All withholding moves, including non-PIT' inverse_name='payment_id' string='Withholding'
Public methods (5)
  • button_open_journal_entry(self)
    Add tax cash basis when open journal entry
  • button_wht_certs(self)
  • clear_tax_cash_basis(self)
  • create_wht_cert(self)
  • open_clear_tax(self)
    Open Wizard for clear tax with accounting date

New fields (2)
  • wht_amount_base Monetary
    compute='_compute_wht_amount' help='Based amount for the tax amount' readonly=False store=True string='Withholding Base'
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' help='Optional hidden field to keep wht_tax. Useful for case 1 tax only' string='Withholding Tax'
Public methods (2)
  • action_create_payments(self)
  • default_get(self, fields_list)
    @api.model

New fields (2)
  • sequence_number_next Integer
    compute='_compute_seq_number_next' help='The next sequence number will be used for the next tax invoice.' inverse='_inverse_seq_number_next' string='Next Number'
  • taxinv_sequence_id Many2one → ir.sequence
    comodel_name='ir.sequence' copy=False help='Optional sequence as Tax Invoice number' string='Tax Invoice Sequence'
Public methods (0)

No public methods.

New fields (16)
  • amount_income Monetary
    required=True string='Income'
  • amount_wht Monetary
    string='Withholding Amount'
  • calendar_year Char
    compute='_compute_move_data' index=True store=True
  • cancelled Boolean
    help='For filtering cancelled payment' readonly=True
  • cert_id Many2one → withholding.tax.cert
    check_company=True comodel_name='withholding.tax.cert' copy=False readonly=True string='Withholding Cert.'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True string='Company'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' default=<expr>
  • date Date
    compute='_compute_move_data' readonly=False store=True
  • is_pit Boolean
    related='wht_tax_id.is_pit' store=True
  • move_id Many2one → account.move
    comodel_name='account.move' domain=[('state', 'not in', ['draft', 'cancel'])] index=True ondelete='cascade' required=True string='Journal Entry'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True ondelete='cascade' required=True string='Vendor'
  • payment_id Many2one → account.payment
    comodel_name='account.payment' compute='_compute_move_data' domain=[('state', 'not in', ['draft', 'cancel'])] index=True ondelete='cascade' readonly=False store=True string='Payment'
  • payment_state Selection
    related='payment_id.state'
  • wht_cert_income_desc Char
    compute='_compute_wht_cert_income_desc' readonly=False size=500 store=True string='Income Description'
  • wht_cert_income_type Selection
    compute='_compute_wht_cert_income_type' readonly=False store=True string='Type of Income' args: WHT_CERT_INCOME_TYPE
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' index=True
Public methods (0)

No public methods.

New fields (8)
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('wht_account', '=', True)]" ondelete='restrict' required=True string='Withholding Tax Account'
  • amount Float
    string='Percent'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True
  • income_tax_form Selection
    selection=INCOME_TAX_FORM string='Default Income Tax Form'
  • is_pit Boolean
    help='As PIT, the calculation of withholding amount is based on pit.rate' string='Personal Income Tax'
  • name Char
    required=True
  • pit_id Many2one → personal.income.tax
    comodel_name='personal.income.tax' compute='_compute_pit_id' help='Latest PIT Rates used to calcuate withholiding amount' string='PIT Rate'
  • wht_cert_income_type Selection
    selection=WHT_CERT_INCOME_TYPE string='Default Type of Income'
Public methods (0)

No public methods.

New fields (2)
  • date Date
    default=fields.Date.context_today required=True string='Accounting Date (Tax Cash Basis)'
  • payment_id Many2one → account.payment
    required=True string='Payment' args: 'account.payment'
Public methods (1)
  • action_clear_tax(self)

New fields (4)
  • active Boolean
    default=True
  • calendar_year Char
    copy=False default=<expr> required=True
  • effective_date Date
    compute='_compute_effective_date' store=True
  • rate_ids One2many → personal.income.tax.rate
    comodel_name='personal.income.tax.rate' copy=True inverse_name='pit_id' string='Withholding Tax Rates'
Public methods (2)
  • calculate_rate_wht(self, total_income, income, pit_date)
  • copy(self, default=None)

New fields (7)
  • amount_tax_accum Float
    compute='_compute_amount_accum' string='Tax Accumulate'
  • amount_tax_max Float
    compute='_compute_amount_tax_max' store=True string='Maximum Tax in Range'
  • income_from Float
    string='Income From (>)'
  • income_to Float
    string='Income To (<=)'
  • pit_id Many2one → personal.income.tax
    comodel_name='personal.income.tax' index=True ondelete='cascade' string='PIT Table'
  • sequence Integer
    string='sequence'
  • tax_rate Float
    string='Tax Rate (%)'
Public methods (0)

No public methods.

New fields (3)
  • supplier_company_wht_tax_id Many2one → account.withholding.tax
    comodel_name='account.withholding.tax' company_dependent=True domain="[('company_id', '=', current_company_id)]" help='Default withholding tax for the vendor that is company' string='Company Vendor Withholding Tax'
  • supplier_wht_tax_id Many2one → account.withholding.tax
    comodel_name='account.withholding.tax' company_dependent=True domain="[('company_id', '=', current_company_id)]" help='Default withholding tax for the vendor that is individual' string='Individual Vendor Withholding Tax'
  • wht_tax_id Many2one → account.withholding.tax
    comodel_name='account.withholding.tax' company_dependent=True domain="[('company_id', '=', current_company_id)]" help='Default withholding tax for the customer' string='Withholding Tax'
Public methods (0)

No public methods.

New fields (2)
  • customer_tax_invoice_number Selection
    default='payment' help="It default running tax number by payment\n when user not select 'Tax Invoice Sequence' in taxes" selection=[('payment', 'Customer Payment Number'), ('invoice', 'Customer Invoice Number')] string='Customer Tax Invoice Number (Undue VAT)'
  • tax_zero_line Boolean
    default=True string='Keep Zero Line Taxes'
Public methods (0)

No public methods.

New fields (2)
  • customer_tax_invoice_number Selection
    readonly=False related='company_id.customer_tax_invoice_number'
  • tax_zero_line Boolean
    readonly=False related='company_id.tax_zero_line'
Public methods (0)

No public methods.

New fields (1)
  • pit_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' domain=<expr> inverse_name='partner_id' string='Personal Income Tax'
Public methods (2)
  • action_view_pit_move_yearly_summary(self)
  • button_wht_certs(self)

New fields (17)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True string='Main Company'
  • company_partner_id Many2one → res.partner
    comodel_name='res.partner' copy=False default=<expr> ondelete='restrict' string='Company'
  • company_vat Char
    related='company_partner_id.vat' string='Company Tax ID'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='company_id.currency_id' store=True string='Currency'
  • date Date
    compute='_compute_wht_cert_data' required=True store=True tracking=True
  • income_tax_form Selection
    copy=False selection=INCOME_TAX_FORM tracking=True
  • move_id Many2one → account.move
    comodel_name='account.move' copy=False domain="[('journal_id.type', '=', 'general'), ('state', '=', 'posted')]" ondelete='restrict' tracking=True
  • name Char
    compute='_compute_wht_cert_data' store=True string='Number' tracking=True
  • number Char
    copy=False default='/' readonly=True required=True string='WHT Number'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' ondelete='restrict' required=True string='Vendor' tracking=True
  • partner_vat Char
    related='partner_id.vat' string='Vendor Tax ID'
  • payment_id Many2one → account.payment
    comodel_name='account.payment' copy=False domain="[('partner_id', '=', partner_id)]" ondelete='restrict' string='Payment' tracking=True
  • ref_wht_cert_id Many2one → withholding.tax.cert
    check_company=True comodel_name='withholding.tax.cert' help='This field related from Old WHT Cert.' string='Ref WHT Cert.' tracking=True
  • state Selection
    copy=False default='draft' selection=[('draft', 'Draft'), ('done', 'Done'), ('cancel', 'Cancelled')] string='Status' tracking=True
  • tax_payer Selection
    copy=False default='withholding' required=True selection=TAX_PAYER tracking=True
  • verify_by Many2one → res.users
    comodel_name='res.users' copy=False tracking=True
  • wht_line One2many → withholding.tax.cert.line
    comodel_name='withholding.tax.cert.line' copy=False inverse_name='cert_id' string='Withholding Line'
Public methods (3)
  • action_cancel(self)
  • action_done(self)
  • action_draft(self)

New fields (11)
  • amount Float
    readonly=False string='Tax Amount'
  • base Float
    readonly=False string='Base Amount'
  • cert_id Many2one → withholding.tax.cert
    comodel_name='withholding.tax.cert' index=True string='WHT Cert'
  • company_id Many2one → res.company
    comodel_name='res.company' related='cert_id.company_id'
  • wht_cert_bank_account Many2one → res.partner.bank
    check_company=True comodel_name='res.partner.bank' compute='_compute_wht_bank_account' help='PND2 type 4A need bank account' readonly=False store=True string='Bank Account'
  • wht_cert_income_code Many2one → withholding.tax.code.income
    comodel_name='withholding.tax.code.income' help='For Text File income code' index=True string='Income Code'
  • wht_cert_income_desc Char
    required=False size=500 string='Income Description'
  • wht_cert_income_type Selection
    required=True selection=WHT_CERT_INCOME_TYPE string='Type of Income'
  • wht_income_tax_form Selection
    index=True related='cert_id.income_tax_form'
  • wht_percent Float
    compute='_compute_wht_percent' string='% Tax'
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' readonly=False string='Tax'
Public methods (0)

No public methods.

New fields (5)
  • code Char
  • income_tax_form Selection
    index=True required=True selection=INCOME_TAX_FORM
  • is_default Boolean
    string='Default'
  • name Char
    required=True
  • wht_cert_income_type Selection
    required=True selection=WHT_CERT_INCOME_TYPE string='Type of Income'
Public methods (1)
  • check_is_default(self)
    @api.constrains('is_default')
REPOSITORY
REPOSITORYOCA/l10n-thailand
GIT
GIThttps://github.com/OCA/l10n-thailand.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-thailand/tree/16.0/l10n_th_account_tax
VERSION
VERSION 2.0.5
CATEGORY
CATEGORYLocalization / Accounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ecosoft
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ecosoft
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Saran440, Pani-k-folk, saran
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-thailand
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:49
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
product_template_form_view product.template.form.inherit product.template xpath Inherits product.product_template_form_view
res_config_settings_view_form res.config.settings.view.form.thai.account res.config.settings xpath Inherits account.res_config_settings_view_form
view_account_form view.account.form account.account field Inherits account.view_account_form
view_account_move_reversal account.move.reversal.form account.move.reversal xpath Inherits account.view_account_move_reversal
view_account_payment_form account.view.account.payment.form account.payment div Inherits account.view_account_payment_form
view_account_payment_register_form account.payment.register.form account.payment.register field Inherits account.view_account_payment_register_form
view_account_withholding_tax_form view.account.withholding.tax.form account.withholding.tax form New
view_account_withholding_tax_income_code_form view.withholding.tax.income.code.form withholding.tax.code.income form New
view_account_withholding_tax_income_code_search view.withholding.tax.income.code.search withholding.tax.code.income search New
view_account_withholding_tax_income_code_tree view.withholding.tax.income.code.tree withholding.tax.code.income tree New
view_account_withholding_tax_search view.account.withholding.tax.search account.withholding.tax search New
view_account_withholding_tax_tree view.account.withholding.tax.tree account.withholding.tax tree New
view_move_form account.move.form account.move div Inherits account.view_move_form
view_partner_property_form res.partner.property.form.inherit res.partner div Inherits account.view_partner_property_form
view_personal_income_tax_form view.personal.income.tax.form personal.income.tax form New
view_personal_income_tax_tree view.personal.income.tax.tree personal.income.tax tree New
view_pit_move_graph view.account.withholding.move.graph account.withholding.move graph New
view_pit_move_pivot view.account.withholding.move.pivot account.withholding.move pivot New
view_tax_form account.tax.form account.tax xpath Inherits account.view_tax_form
view_tax_invoice_form account.move.tax.invoice form New
view_tax_invoice_search account.move.tax.invoice search New
view_tax_invoice_tree account.move.tax.invoice tree New
view_wht_move_form view.account.withholding.move.form account.withholding.move form New
view_wht_move_search view.account.withholding.move.search account.withholding.move search New
view_wht_move_tree view.account.withholding.move.tree account.withholding.move tree New
view_withholding_tax_cert_form view.withholding.tax.cert.form withholding.tax.cert form New
view_withholding_tax_cert_search view.withholding.tax.cert.search withholding.tax.cert search New
view_withholding_tax_cert_tree view.withholding.tax.cert.tree withholding.tax.cert tree New
Models touched (20)

New fields (1)
  • wht_account Boolean
    default=False help='If check, this account is for withholding tax' string='WHT Account'
Public methods (0)

No public methods.

New fields (5)
  • has_wht Boolean
    compute='_compute_has_wht'
  • tax_invoice_ids One2many → account.move.tax.invoice
    comodel_name='account.move.tax.invoice' copy=False inverse_name='move_id' readonly=True states={'draft': [('readonly', False)]}
  • wht_cert_ids One2many → withholding.tax.cert
    comodel_name='withholding.tax.cert' inverse_name='move_id' readonly=True string='Withholding Tax Cert.'
  • wht_cert_status Selection
    compute='_compute_wht_cert_status' selection=[('none', 'Not yet created'), ('draft', 'Draft'), ('done', 'Done'), ('cancel', 'Cancelled')]
  • wht_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' copy=False help='All withholding moves, including non-PIT' inverse_name='move_id' string='Withholding'
Public methods (6)
  • button_cancel(self)
  • button_draft(self)
  • button_wht_certs(self)
  • copy(self, default=None)
    For case reverse move, Tax number and date must have value from wizard reversal.
  • create_wht_cert(self)
    Create/replace one withholding tax cert from withholding move Group by partner and income type, regardless of wht_tax_id
  • js_assign_outstanding_line(self, line_id)

New fields (3)
  • manual_tax_invoice Boolean
    copy=False help='Create Tax Invoice for this debit/credit line'
  • tax_invoice_ids One2many → account.move.tax.invoice
    comodel_name='account.move.tax.invoice' inverse_name='move_line_id'
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' compute='_compute_wht_tax_id' readonly=False store=True string='WHT'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • reconcile(self)
    Case: Vendor Bills only. Reset tax cash basis to draft. until clear tax or reset payment - Bill --> Payment create cash basis (1) is draft - Payment (Posted) --> Payment (Draft) create cash basis (2) and reconcile with (1) state change to posted - Bill manual reconcile payment create cash basis (3) is draft
  • write(self, vals)

New fields (2)
  • tax_invoice_date Date
    copy=False
  • tax_invoice_number Char
    copy=False
Public methods (1)
  • reverse_moves(self)

New fields (18)
  • account_id Many2one → account.account
    comodel_name='account.account' related='move_line_id.account_id' store=True
  • balance Monetary
    compute='_compute_tax_amount' copy=False currency_field='company_currency_id' readonly=False store=True string='Tax Amount'
  • company_currency_id Many2one → res.currency
    comodel_name='res.currency' related='company_id.currency_id'
  • company_id Many2one → res.company
    comodel_name='res.company' related='move_id.company_id' store=True
  • move_id Many2one → account.move
    comodel_name='account.move' copy=True index=True
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' copy=True index=True ondelete='cascade'
  • move_state Selection
    related='move_id.state' store=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' ondelete='restrict' string='Partner'
  • payment_id Many2one → account.payment
    comodel_name='account.payment' compute='_compute_payment_id' copy=True store=True
  • report_date Date
    compute='_compute_report_date' store=True
  • report_late_mo Selection
    default='0' required=True string='Report Late' args: [('0', '0 month'), ('1', '1 month'), ('2', '2 months'), ('3', '3 months'), ('4', '4 months'), ('5', '5 months'), ('6', '6 months')]
  • reversed_id Many2one → account.move
    comodel_name='account.move' help='This move that this move reverse'
  • reversing_id Many2one → account.move
    comodel_name='account.move' help='The move that reverse this move'
  • tax_base_amount Monetary
    compute='_compute_tax_amount' copy=False currency_field='company_currency_id' readonly=False store=True string='Tax Base'
  • tax_invoice_date Date
    copy=False
  • tax_invoice_number Char
    copy=False
  • tax_line_id Many2one → account.tax
    comodel_name='account.tax' related='move_line_id.tax_line_id' store=True
  • to_clear_tax Boolean
    related='payment_id.to_clear_tax'
Public methods (1)
  • unlink(self)
    Do not allow remove the last tax_invoice of move_line

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (7)
  • pit_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' copy=False domain=[('is_pit', '=', True)] inverse_name='payment_id' string='Personal Income Tax'
  • tax_invoice_ids One2many → account.move.tax.invoice
    comodel_name='account.move.tax.invoice' copy=False domain=[('reversing_id', '=', False), ('reversed_id', '=', False)] inverse_name='payment_id'
  • tax_invoice_move_ids Many2many → account.move
    column1='payment_id' column2='tax_invoice_id' comodel_name='account.move' compute='_compute_tax_invoice_move_ids' relation='payment_tax_invoice_rel' string="Tax Invoice's Journal Entry"
  • to_clear_tax Boolean
    copy=False default=False help='When defer journal entry posting, this will show button'
  • wht_cert_ids One2many → withholding.tax.cert
    comodel_name='withholding.tax.cert' inverse_name='payment_id' readonly=True string='Withholding Tax Cert.'
  • wht_certs_count Integer
    compute='_compute_wht_certs_count' string='# Withholding Tax Certs'
  • wht_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' copy=False help='All withholding moves, including non-PIT' inverse_name='payment_id' string='Withholding'
Public methods (4)
  • button_open_journal_entry(self)
    Add tax cash basis when open journal entry
  • button_wht_certs(self)
  • clear_tax_cash_basis(self)
  • create_wht_cert(self)

New fields (2)
  • wht_amount_base Monetary
    help='Based amount for the tax amount' string='Withholding Base'
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' help='Optional hidden field to keep wht_tax. Useful for case 1 tax only' string='Withholding Tax'
Public methods (2)
  • action_create_payments(self)
  • default_get(self, fields_list)
    @api.model

New fields (2)
  • sequence_number_next Integer
    compute='_compute_seq_number_next' help='The next sequence number will be used for the next tax invoice.' inverse='_inverse_seq_number_next' string='Next Number'
  • taxinv_sequence_id Many2one → ir.sequence
    comodel_name='ir.sequence' copy=False help='Optional sequence as Tax Invoice number' string='Tax Invoice Sequence'
Public methods (0)

No public methods.

New fields (16)
  • amount_income Monetary
    required=True string='Income'
  • amount_wht Monetary
    string='Withholding Amount'
  • calendar_year Char
    compute='_compute_move_data' index=True store=True
  • cancelled Boolean
    help='For filtering cancelled payment' readonly=True
  • cert_id Many2one → withholding.tax.cert
    check_company=True comodel_name='withholding.tax.cert' copy=False readonly=True string='Withholding Cert.'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True string='Company'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' default=<expr>
  • date Date
    compute='_compute_move_data' readonly=False store=True
  • is_pit Boolean
    related='wht_tax_id.is_pit' store=True
  • move_id Many2one → account.move
    comodel_name='account.move' domain=[('state', 'not in', ['draft', 'cancel'])] index=True ondelete='cascade' required=True string='Journal Entry'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True ondelete='cascade' required=True string='Vendor'
  • payment_id Many2one → account.payment
    comodel_name='account.payment' compute='_compute_move_data' domain=[('state', 'not in', ['draft', 'cancel'])] index=True ondelete='cascade' readonly=False store=True string='Payment'
  • payment_state Selection
    related='payment_id.state'
  • wht_cert_income_desc Char
    compute='_compute_wht_cert_income_desc' readonly=False size=500 store=True string='Income Description'
  • wht_cert_income_type Selection
    compute='_compute_wht_cert_income_type' readonly=False store=True string='Type of Income' args: WHT_CERT_INCOME_TYPE
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' index=True
Public methods (0)

No public methods.

New fields (8)
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('wht_account', '=', True), ('company_id', '=', company_id)]" ondelete='restrict' required=True string='Withholding Tax Account'
  • amount Float
    string='Percent'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True
  • income_tax_form Selection
    selection=INCOME_TAX_FORM string='Default Income Tax Form'
  • is_pit Boolean
    help='As PIT, the calculation of withholding amount is based on pit.rate' string='Personal Income Tax'
  • name Char
    required=True
  • pit_id Many2one → personal.income.tax
    comodel_name='personal.income.tax' compute='_compute_pit_id' help='Latest PIT Rates used to calcuate withholiding amount' string='PIT Rate'
  • wht_cert_income_type Selection
    selection=WHT_CERT_INCOME_TYPE string='Default Type of Income'
Public methods (0)

No public methods.

New fields (4)
  • active Boolean
    default=True
  • calendar_year Char
    copy=False default=<expr> required=True
  • effective_date Date
    compute='_compute_effective_date' store=True
  • rate_ids One2many → personal.income.tax.rate
    comodel_name='personal.income.tax.rate' copy=True inverse_name='pit_id' string='Withholding Tax Rates'
Public methods (2)
  • calculate_rate_wht(self, total_income, income, pit_date)
  • copy(self, default=None)

New fields (7)
  • amount_tax_accum Float
    compute='_compute_amount_accum' string='Tax Accumulate'
  • amount_tax_max Float
    compute='_compute_amount_tax_max' store=True string='Maximum Tax in Range'
  • income_from Float
    string='Income From (>)'
  • income_to Float
    string='Income To (<=)'
  • pit_id Many2one → personal.income.tax
    comodel_name='personal.income.tax' index=True ondelete='cascade' string='PIT Table'
  • sequence Integer
    string='sequence'
  • tax_rate Float
    string='Tax Rate (%)'
Public methods (0)

No public methods.

New fields (3)
  • supplier_company_wht_tax_id Many2one → account.withholding.tax
    comodel_name='account.withholding.tax' company_dependent=True domain="[('company_id', '=', current_company_id)]" help='Default withholding tax for the vendor that is company' string='Company Vendor Withholding Tax'
  • supplier_wht_tax_id Many2one → account.withholding.tax
    comodel_name='account.withholding.tax' company_dependent=True domain="[('company_id', '=', current_company_id)]" help='Default withholding tax for the vendor that is individual' string='Individual Vendor Withholding Tax'
  • wht_tax_id Many2one → account.withholding.tax
    comodel_name='account.withholding.tax' company_dependent=True domain="[('company_id', '=', current_company_id)]" help='Default withholding tax for the customer' string='Withholding Tax'
Public methods (0)

No public methods.

New fields (1)
  • customer_tax_invoice_number Selection
    default='payment' help="It default running tax number by payment\n when user not select 'Tax Invoice Sequence' in taxes" selection=[('payment', 'Customer Payment Number'), ('invoice', 'Customer Invoice Number')] string='Customer Tax Invoice Number (Undue VAT)'
Public methods (0)

No public methods.

New fields (1)
  • customer_tax_invoice_number Selection
    readonly=False related='company_id.customer_tax_invoice_number'
Public methods (0)

No public methods.

New fields (1)
  • pit_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' domain=<expr> inverse_name='partner_id' string='Personal Income Tax'
Public methods (2)
  • action_view_pit_move_yearly_summary(self)
  • button_wht_certs(self)

New fields (15)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> readonly=True required=True string='Main Company'
  • company_partner_id Many2one → res.partner
    comodel_name='res.partner' copy=False default=<expr> ondelete='restrict' readonly=True string='Company'
  • company_vat Char
    readonly=True related='company_partner_id.vat' string='Company Tax ID'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True related='company_id.currency_id' store=True string='Currency'
  • date Date
    compute='_compute_wht_cert_data' required=True states={'draft': [('readonly', False)]} store=True tracking=True
  • income_tax_form Selection
    copy=False readonly=True required=False selection=INCOME_TAX_FORM states={'draft': [('readonly', False)]} tracking=True
  • move_id Many2one → account.move
    comodel_name='account.move' copy=False domain="[('journal_id.type', '=', 'general'), ('state', '=', 'posted')]" ondelete='restrict' readonly=True states={'draft': [('readonly', False)]} string='Move' tracking=True
  • name Char
    compute='_compute_wht_cert_data' states={'draft': [('readonly', False)]} store=True string='Number' tracking=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' ondelete='restrict' readonly=True required=True states={'draft': [('readonly', False)]} string='Vendor' tracking=True
  • partner_vat Char
    readonly=True related='partner_id.vat' string='Vendor Tax ID'
  • payment_id Many2one → account.payment
    comodel_name='account.payment' copy=False domain="[('partner_id', '=', partner_id)]" ondelete='restrict' readonly=True states={'draft': [('readonly', False)]} string='Payment' tracking=True
  • ref_wht_cert_id Many2one → withholding.tax.cert
    check_company=True comodel_name='withholding.tax.cert' help='This field related from Old WHT Cert.' readonly=True states={'draft': [('readonly', False)]} string='Ref WHT Cert.' tracking=True
  • state Selection
    copy=False default='draft' selection=[('draft', 'Draft'), ('done', 'Done'), ('cancel', 'Cancelled')] string='Status' tracking=True
  • tax_payer Selection
    copy=False default='withholding' readonly=True required=True selection=TAX_PAYER states={'draft': [('readonly', False)]} tracking=True
  • wht_line One2many → withholding.tax.cert.line
    comodel_name='withholding.tax.cert.line' copy=False inverse_name='cert_id' readonly=True states={'draft': [('readonly', False)]} string='Withholding Line'
Public methods (3)
  • action_cancel(self)
  • action_done(self)
  • action_draft(self)

New fields (11)
  • amount Float
    readonly=False string='Tax Amount'
  • base Float
    readonly=False string='Base Amount'
  • cert_id Many2one → withholding.tax.cert
    comodel_name='withholding.tax.cert' index=True string='WHT Cert'
  • company_id Many2one → res.company
    comodel_name='res.company' related='cert_id.company_id'
  • wht_cert_bank_account Many2one → res.partner.bank
    check_company=True comodel_name='res.partner.bank' compute='_compute_wht_bank_account' help='PND2 type 4A need bank account' readonly=False store=True string='Bank Account'
  • wht_cert_income_code Many2one → withholding.tax.code.income
    comodel_name='withholding.tax.code.income' help='For Text File income code' index=True string='Income Code'
  • wht_cert_income_desc Char
    required=False size=500 string='Income Description'
  • wht_cert_income_type Selection
    required=True selection=WHT_CERT_INCOME_TYPE string='Type of Income'
  • wht_income_tax_form Selection
    index=True related='cert_id.income_tax_form'
  • wht_percent Float
    compute='_compute_wht_percent' string='% Tax'
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' readonly=False string='Tax'
Public methods (0)

No public methods.

New fields (5)
  • code Char
  • income_tax_form Selection
    index=True required=True selection=INCOME_TAX_FORM
  • is_default Boolean
    string='Default'
  • name Char
    required=True
  • wht_cert_income_type Selection
    required=True selection=WHT_CERT_INCOME_TYPE string='Type of Income'
Public methods (1)
  • check_is_default(self)
    @api.constrains('is_default')
REPOSITORY
REPOSITORYOCA/l10n-thailand
GIT
GIThttps://github.com/OCA/l10n-thailand.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-thailand/tree/15.0/l10n_th_account_tax
VERSION
VERSION 2.5.0
CATEGORY
CATEGORYLocalization / Accounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ecosoft
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ecosoft
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Kitti U, Saran440, ps-tubtim, theerayut
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-thailand
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:35
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (29)
XML IDNameModelTypeStatus
product_template_form_view product.template.form.inherit product.template xpath Inherits product.product_template_form_view
res_config_settings_view_form res.config.settings.view.form.thai.account res.config.settings xpath Inherits account.res_config_settings_view_form
view_account_form view.account.form account.account field Inherits account.view_account_form
view_account_move_reversal account.move.reversal.form account.move.reversal xpath Inherits account.view_account_move_reversal
view_account_payment_form account.view.account.payment.form account.payment div Inherits account.view_account_payment_form
view_account_payment_register_form account.payment.register.form account.payment.register field Inherits account.view_account_payment_register_form
view_account_payment_search account.payment.search account.payment xpath Inherits account.view_account_payment_search
view_account_withholding_tax_form view.account.withholding.tax.form account.withholding.tax form New
view_account_withholding_tax_income_code_form view.withholding.tax.income.code.form withholding.tax.code.income form New
view_account_withholding_tax_income_code_search view.withholding.tax.income.code.search withholding.tax.code.income search New
view_account_withholding_tax_income_code_tree view.withholding.tax.income.code.tree withholding.tax.code.income tree New
view_account_withholding_tax_search view.account.withholding.tax.search account.withholding.tax search New
view_account_withholding_tax_tree view.account.withholding.tax.tree account.withholding.tax tree New
view_move_form account.move.form account.move div Inherits account.view_move_form
view_partner_property_form res.partner.property.form.inherit res.partner div Inherits account.view_partner_property_form
view_personal_income_tax_form view.personal.income.tax.form personal.income.tax form New
view_personal_income_tax_tree view.personal.income.tax.tree personal.income.tax tree New
view_pit_move_graph view.account.withholding.move.graph account.withholding.move graph New
view_pit_move_pivot view.account.withholding.move.pivot account.withholding.move pivot New
view_tax_form_inherited account.tax.form.inherited account.tax field Inherits account.view_tax_form
view_tax_invoice_form account.move.tax.invoice form New
view_tax_invoice_search account.move.tax.invoice search New
view_tax_invoice_tree account.move.tax.invoice tree New
view_wht_move_form view.account.withholding.move.form account.withholding.move form New
view_wht_move_search view.account.withholding.move.search account.withholding.move search New
view_wht_move_tree view.account.withholding.move.tree account.withholding.move tree New
view_withholding_tax_cert_form view.withholding.tax.cert.form withholding.tax.cert form New
view_withholding_tax_cert_search view.withholding.tax.cert.search withholding.tax.cert search New
view_withholding_tax_cert_tree view.withholding.tax.cert.tree withholding.tax.cert tree New
Models touched (20)

New fields (1)
  • wht_account Boolean
    default=False help='If check, this account is for withholding tax' string='WHT Account'
Public methods (0)

No public methods.

New fields (5)
  • has_wht Boolean
    compute='_compute_has_wht'
  • tax_invoice_ids One2many → account.move.tax.invoice
    comodel_name='account.move.tax.invoice' copy=False inverse_name='move_id' readonly=True states={'draft': [('readonly', False)]}
  • wht_cert_ids One2many → withholding.tax.cert
    comodel_name='withholding.tax.cert' inverse_name='move_id' readonly=True string='Withholding Tax Cert.'
  • wht_cert_status Selection
    compute='_compute_wht_cert_status' selection=[('none', 'Not yet created'), ('draft', 'Draft'), ('done', 'Done'), ('cancel', 'Cancelled')]
  • wht_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' copy=False help='All withholding moves, including non-PIT' inverse_name='move_id' string='Withholding'
Public methods (7)
  • button_cancel(self)
  • button_draft(self)
  • button_wht_certs(self)
  • create_wht_cert(self)
    Create/replace one withholding tax cert from withholding move Group by partner and income type, regardless of wht_tax_id
  • js_assign_outstanding_line(self, line_id)
  • js_remove_outstanding_partial(self, partial_id)
  • mount_base_lines(self, recompute_tax_base_amount, taxes_map)

New fields (3)
  • manual_tax_invoice Boolean
    copy=False help='Create Tax Invoice for this debit/credit line'
  • tax_invoice_ids One2many → account.move.tax.invoice
    comodel_name='account.move.tax.invoice' inverse_name='move_line_id'
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' compute='_compute_wht_tax_id' readonly=False store=True string='WHT'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (2)
  • tax_invoice_date Date
    copy=False
  • tax_invoice_number Char
    copy=False
Public methods (1)
  • reverse_moves(self)

New fields (18)
  • account_id Many2one → account.account
    comodel_name='account.account' related='move_line_id.account_id'
  • balance Monetary
    compute='_compute_tax_amount' copy=False currency_field='company_currency_id' readonly=False store=True string='Tax Amount'
  • company_currency_id Many2one → res.currency
    comodel_name='res.currency' related='company_id.currency_id'
  • company_id Many2one → res.company
    comodel_name='res.company' related='move_id.company_id' store=True
  • move_id Many2one → account.move
    comodel_name='account.move' copy=True index=True
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' copy=True index=True ondelete='cascade'
  • move_state Selection
    related='move_id.state' store=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' ondelete='restrict' string='Partner'
  • payment_id Many2one → account.payment
    comodel_name='account.payment' compute='_compute_payment_id' copy=True store=True
  • report_date Date
    compute='_compute_report_date' store=True
  • report_late_mo Selection
    default='0' required=True string='Report Late' args: [('0', '0 month'), ('1', '1 month'), ('2', '2 months'), ('3', '3 months'), ('4', '4 months'), ('5', '5 months'), ('6', '6 months')]
  • reversed_id Many2one → account.move
    comodel_name='account.move' help='This move that this move reverse'
  • reversing_id Many2one → account.move
    comodel_name='account.move' help='The move that reverse this move'
  • tax_base_amount Monetary
    compute='_compute_tax_amount' copy=False currency_field='company_currency_id' readonly=False store=True string='Tax Base'
  • tax_invoice_date Date
    copy=False
  • tax_invoice_number Char
    copy=False
  • tax_line_id Many2one → account.tax
    comodel_name='account.tax' related='move_line_id.tax_line_id'
  • to_clear_tax Boolean
    related='payment_id.to_clear_tax'
Public methods (1)
  • unlink(self)
    Do not allow remove the last tax_invoice of move_line

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (8)
  • original_move_ids Many2many → account.move
    comodel_name='account.move'
  • pit_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' copy=False domain=[('is_pit', '=', True)] inverse_name='payment_id' string='Personal Income Tax'
  • tax_invoice_ids One2many → account.move.tax.invoice
    comodel_name='account.move.tax.invoice' copy=False domain=[('reversing_id', '=', False), ('reversed_id', '=', False)] inverse_name='payment_id'
  • tax_invoice_move_ids Many2many → account.move
    column1='payment_id' column2='tax_invoice_id' comodel_name='account.move' compute='_compute_tax_invoice_move_ids' relation='payment_tax_invoice_rel' string="Tax Invoice's Journal Entry"
  • to_clear_tax Boolean
    copy=False default=False help='When defer journal entry posting, this will show button'
  • wht_cert_ids One2many → withholding.tax.cert
    comodel_name='withholding.tax.cert' inverse_name='payment_id' readonly=True string='Withholding Tax Cert.'
  • wht_certs_count Integer
    compute='_compute_wht_certs_count' string='# Withholding Tax Certs'
  • wht_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' copy=False help='All withholding moves, including non-PIT' inverse_name='payment_id' string='Withholding'
Public methods (4)
  • button_journal_entries(self)
  • button_wht_certs(self)
  • clear_tax_cash_basis(self)
  • create_wht_cert(self)

New fields (2)
  • wht_amount_base Monetary
    help='Based amount for the tax amount' string='Withholding Base'
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' help='Optional hidden field to keep wht_tax. Useful for case 1 tax only' string='Withholding Tax'
Public methods (2)
  • action_create_payments(self)
  • default_get(self, fields_list)
    @api.model

New fields (2)
  • sequence_number_next Integer
    compute='_compute_seq_number_next' help='The next sequence number will be used for the next tax invoice.' inverse='_inverse_seq_number_next' string='Next Number'
  • taxinv_sequence_id Many2one → ir.sequence
    comodel_name='ir.sequence' copy=False help='Optional sequence as Tax Invoice number' string='Tax Invoice Sequence'
Public methods (0)

No public methods.

New fields (16)
  • amount_income Monetary
    required=True string='Income'
  • amount_wht Monetary
    string='Withholding Amount'
  • calendar_year Char
    compute='_compute_move_data' index=True store=True
  • cancelled Boolean
    help='For filtering cancelled payment' readonly=True
  • cert_id Many2one → withholding.tax.cert
    check_company=True comodel_name='withholding.tax.cert' copy=False readonly=True string='Withholding Cert.'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True string='Company'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' default=<expr>
  • date Date
    compute='_compute_move_data' readonly=False store=True
  • is_pit Boolean
    related='wht_tax_id.is_pit' store=True
  • move_id Many2one → account.move
    comodel_name='account.move' domain=[('state', 'not in', ['draft', 'cancel'])] index=True ondelete='cascade' required=True string='Journal Entry'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True ondelete='cascade' required=True string='Vendor'
  • payment_id Many2one → account.payment
    comodel_name='account.payment' compute='_compute_move_data' domain=[('state', 'not in', ['draft', 'cancel'])] index=True ondelete='cascade' readonly=False store=True string='Payment'
  • payment_state Selection
    related='payment_id.state'
  • wht_cert_income_desc Char
    compute='_compute_wht_cert_income_desc' readonly=False size=500 store=True string='Income Description'
  • wht_cert_income_type Selection
    compute='_compute_wht_cert_income_type' readonly=False store=True string='Type of Income' args: WHT_CERT_INCOME_TYPE
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' index=True
Public methods (0)

No public methods.

New fields (8)
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('wht_account', '=', True), ('company_id', '=', company_id)]" ondelete='restrict' required=True string='Withholding Tax Account'
  • amount Float
    string='Percent'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True
  • income_tax_form Selection
    selection=INCOME_TAX_FORM string='Default Income Tax Form'
  • is_pit Boolean
    help='As PIT, the calculation of withholding amount is based on pit.rate' string='Personal Income Tax'
  • name Char
    required=True
  • pit_id Many2one → personal.income.tax
    comodel_name='personal.income.tax' compute='_compute_pit_id' help='Latest PIT Rates used to calcuate withholiding amount' string='PIT Rate'
  • wht_cert_income_type Selection
    selection=WHT_CERT_INCOME_TYPE string='Default Type of Income'
Public methods (0)

No public methods.

New fields (4)
  • active Boolean
    default=True
  • calendar_year Char
    copy=False default=<expr> required=True
  • effective_date Date
    compute='_compute_effective_date' store=True
  • rate_ids One2many → personal.income.tax.rate
    comodel_name='personal.income.tax.rate' copy=True inverse_name='pit_id' string='Withholding Tax Rates'
Public methods (2)
  • calculate_rate_wht(self, total_income, income, pit_date=False)
  • copy(self, default=None)

New fields (7)
  • amount_tax_accum Float
    compute='_compute_amount_accum' string='Tax Accumulate'
  • amount_tax_max Float
    compute='_compute_amount_tax_max' store=True string='Maximum Tax in Range'
  • income_from Float
    string='Income From (>)'
  • income_to Float
    string='Income To (<=)'
  • pit_id Many2one → personal.income.tax
    comodel_name='personal.income.tax' index=True ondelete='cascade' string='PIT Table'
  • sequence Integer
    string='sequence'
  • tax_rate Float
    string='Tax Rate (%)'
Public methods (0)

No public methods.

New fields (3)
  • supplier_company_wht_tax_id Many2one → account.withholding.tax
    comodel_name='account.withholding.tax' company_dependent=True domain="[('company_id', '=', current_company_id)]" help='Default withholding tax for the vendor that is company' string='Company Vendor Withholding Tax'
  • supplier_wht_tax_id Many2one → account.withholding.tax
    comodel_name='account.withholding.tax' company_dependent=True domain="[('company_id', '=', current_company_id)]" help='Default withholding tax for the vendor that is individual' string='Individual Vendor Withholding Tax'
  • wht_tax_id Many2one → account.withholding.tax
    comodel_name='account.withholding.tax' company_dependent=True domain="[('company_id', '=', current_company_id)]" help='Default withholding tax for the customer' string='Withholding Tax'
Public methods (0)

No public methods.

New fields (1)
  • customer_tax_name Selection
    default='payment' help='If checked, wht cert form will show layout pre-print' string='Customer Tax Invoices Number' args: [('payment', 'Payment'), ('invoice', 'Invoice')]
Public methods (0)

No public methods.

New fields (1)
  • customer_tax_name Selection
    readonly=False related='company_id.customer_tax_name'
Public methods (0)

No public methods.

New fields (1)
  • pit_move_ids One2many → account.withholding.move
    comodel_name='account.withholding.move' domain=<expr> inverse_name='partner_id' string='Personal Income Tax'
Public methods (2)
  • action_view_pit_move_yearly_summary(self)
  • button_wht_certs(self)

New fields (16)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> readonly=True required=True string='Main Company'
  • company_partner_id Many2one → res.partner
    comodel_name='res.partner' copy=False default=<expr> ondelete='restrict' readonly=True string='Company'
  • company_vat Char
    readonly=True related='company_partner_id.vat' string='Company Tax ID'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True related='company_id.currency_id' store=True string='Currency'
  • date Date
    compute='_compute_wht_cert_data' required=True states={'draft': [('readonly', False)]} store=True tracking=True
  • income_tax_form Selection
    copy=False readonly=True required=False selection=INCOME_TAX_FORM states={'draft': [('readonly', False)]} tracking=True
  • move_id Many2one → account.move
    comodel_name='account.move' copy=False domain="[('journal_id.type', '=', 'general'), ('state', '=', 'posted')]" ondelete='restrict' readonly=True states={'draft': [('readonly', False)]} string='Move' tracking=True
  • name Char
    compute='_compute_wht_cert_data' states={'draft': [('readonly', False)]} store=True string='Number' tracking=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' ondelete='restrict' readonly=True required=True states={'draft': [('readonly', False)]} string='Vendor' tracking=True
  • partner_vat Char
    readonly=True related='partner_id.vat' string='Vendor Tax ID'
  • payment_id Many2one → account.payment
    comodel_name='account.payment' copy=False domain="[('partner_id', '=', partner_id)]" ondelete='restrict' readonly=True states={'draft': [('readonly', False)]} string='Payment' tracking=True
  • ref_wht_cert_id Many2one → withholding.tax.cert
    check_company=True comodel_name='withholding.tax.cert' help='This field related from Old WHT Cert.' readonly=True states={'draft': [('readonly', False)]} string='Ref WHT Cert.' tracking=True
  • state Selection
    copy=False default='draft' selection=[('draft', 'Draft'), ('done', 'Done'), ('cancel', 'Cancelled')] string='Status' tracking=True
  • tax_payer Selection
    copy=False default='withholding' readonly=True required=True selection=TAX_PAYER states={'draft': [('readonly', False)]} tracking=True
  • verify_by Many2one → res.users
    comodel_name='res.users' copy=False tracking=True
  • wht_line One2many → withholding.tax.cert.line
    comodel_name='withholding.tax.cert.line' copy=False inverse_name='cert_id' readonly=True states={'draft': [('readonly', False)]} string='Withholding Line'
Public methods (3)
  • action_cancel(self)
  • action_done(self)
  • action_draft(self)

New fields (11)
  • amount Float
    readonly=False string='Tax Amount'
  • base Float
    readonly=False string='Base Amount'
  • cert_id Many2one → withholding.tax.cert
    comodel_name='withholding.tax.cert' index=True string='WHT Cert'
  • company_id Many2one → res.company
    comodel_name='res.company' related='cert_id.company_id'
  • wht_cert_bank_account Many2one → res.partner.bank
    check_company=True comodel_name='res.partner.bank' compute='_compute_wht_bank_account' help='PND2 type 4A need bank account' readonly=False store=True string='Bank Account'
  • wht_cert_income_code Many2one → withholding.tax.code.income
    comodel_name='withholding.tax.code.income' help='For Text File income code' index=True string='Income Code'
  • wht_cert_income_desc Char
    required=False size=500 string='Income Description'
  • wht_cert_income_type Selection
    required=True selection=WHT_CERT_INCOME_TYPE string='Type of Income'
  • wht_income_tax_form Selection
    index=True related='cert_id.income_tax_form'
  • wht_percent Float
    compute='_compute_wht_percent' string='% Tax'
  • wht_tax_id Many2one → account.withholding.tax
    check_company=True comodel_name='account.withholding.tax' readonly=False string='Tax'
Public methods (0)

No public methods.

New fields (5)
  • code Char
  • income_tax_form Selection
    index=True required=True selection=INCOME_TAX_FORM
  • is_default Boolean
    string='Default'
  • name Char
    required=True
  • wht_cert_income_type Selection
    required=True selection=WHT_CERT_INCOME_TYPE string='Type of Income'
Public methods (1)
  • check_is_default(self)
    @api.constrains('is_default')
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/l10n-thailand
PULL REQUEST
PULL REQUEST[19.0][MIG] l10n_th_account_tax: Migration to 19.0 (#578)