OdooWiki OCA HUB

Thai Localization - Government Expense

l10n_th_gov_hr_expense folder_open OCA/l10n-thailand open_in_new
Localization / Human Resources License: AGPL-3

This module enhances the integration of Purchase Request and Expense, aimed to follow Thai Government regulations.

auto_awesome What this module does

AI-generated from the code · Odoo 15.0

Links Thai government purchase requests to expense reports: users can pull approved purchase request lines into an expense report, which automatically creates the expense lines, and the system checks amounts and purchase request status before submitting or approving.

This module connects purchase requests with expense reports for Thai government workflows. On an expense report, a user can select an approved purchase request belonging to the same employee; the purchase request lines are then shown in a new "Expense from PR" tab. Saving the report automatically creates the corresponding expense lines in the "Expense" tab, and the temporary purchase request lines are cleared afterwards.

Business rules added: - When submitting an expense report, the total untaxed amount of the expenses cannot exceed the estimated amount of the linked purchase request, unless the HR manager ticks "Skip Amount Check". - When approving an expense report, the linked purchase request must already be in the "Approved" status. - A purchase request that is linked to a non-cancelled expense report cannot be reset to draft or rejected; the expense must be cancelled first.

For advances, the report shows a "Returned Date" and a clearing term (30 days after receiving the money or 30 days after returning to the office), and the clearing due date is computed automatically. The clearing term setting is hidden in the reminder configuration because Thai government rules already fix 30 days.

Purchase request and journal entry forms gain an "Expenses" button showing how many expense reports are linked, and expense searches can be grouped by purchase type.

Required by other modules

Models and fields (5)
  • hr.expense · extends an existing modelpr_line_id, purchase_type_id (Purchase Type)
  • account.move · extends an existing modelexpense_sheet_ids (Expense Report), expense_sheet_count (Expense Report Count)
  • hr.expense.sheet · extends an existing modelpr_for (Use PR for), date_return (Returned Date), no_pr_check (Skip Amount Check), pr_line_ids, clearing_term, employee_user_id, clearing_date_due, purchase_request_id (Purchase Request)
  • purchase.request · extends an existing modelexpense_sheet_ids (Expense Report), expense_sheet_count (Expense Report Count)
  • hr.expense.sheet.prline · new modelname (Description), quantity, sheet_id (Expense Report), reference (Bill Reference), pr_line_id, product_id (Product), currency_id (Currency), description (Notes...), employee_id, unit_amount (Unit Price), total_amount (Total)

Text generated by AI (DeepSeek) from reading the Odoo 15.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 15.0

Confirmed on 2026-11-03 in branch 15.0 of OCA/l10n-thailand.

terminal Installation and usage

OCA documentation · Odoo 15.0

To configure the Purchase Request to link with Expense, you need to go to the Purchase > Configuration > Purchase Type. Choose the type and change the 'To Create' setting to Expense.

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.