Thai Localization - Government Expense

l10n_th_gov_hr_expense
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_gov_hr_expense
VERSION
VERSION 1.2.2
CATEGORY
CATEGORYLocalization / Human Resources
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, Pani-k-folk, Thotsapol-A
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-thailand
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:35
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/hr-expense:
    - hr_expense_advance_clearing
    - hr_expense_advance_overdue_reminder
    - hr_expense_advance_clearing_sequence
    - hr_expense_sequence
OCA/l10n-thailand:
    - l10n_th_gov_purchase_request
OCA/purchase-workflow:
    - purchase_exception
    - purchase_request_exception
    - purchase_request
    - purchase_request_substate
    - purchase_request_to_requisition
OCA/server-tools:
    - base_exception
OCA/server-ux:
    - base_substate
odoo/odoo:
    - hr_expense
    - hr_contract
    - hr
    - base_setup
    - base
    - web
    - mail
    - bus
    - web_tour
    - resource
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - purchase
    - purchase_stock
    - stock_account
    - stock
    - barcodes
    - purchase_requisition_stock
    - purchase_requisition
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
hr_expense_sheet_view_search hr.expense.sheet.view.search hr.expense.sheet xpath Inherits hr_expense.hr_expense_sheet_view_search
hr_expense_view_expenses_analysis_tree hr.expense.tree hr.expense xpath Inherits hr_expense.hr_expense_view_expenses_analysis_tree
hr_expense_view_form hr.expense.view.form hr.expense xpath Inherits hr_expense.hr_expense_view_form
hr_expense_view_search hr.expense.view.search hr.expense xpath Inherits hr_expense.hr_expense_view_search
reminder_definition_view_form reminder.definition.form reminder.definition xpath Inherits hr_expense_advance_overdue_reminder.reminder_definition_view_form
view_hr_expense_sheet_form hr.expense.sheet.form hr.expense.sheet xpath Inherits hr_expense_advance_overdue_reminder.view_hr_expense_sheet_form
view_move_form account.move.form account.move xpath Inherits account.view_move_form
view_purchase_request_form purchase.request.form purchase.request xpath Inherits purchase_request.view_purchase_request_form
Models touched (5)

New fields (2)
  • expense_sheet_count Integer
    compute='_compute_expense_sheet_count' string='Expense Report Count'
  • expense_sheet_ids One2many → hr.expense.sheet
    comodel_name='hr.expense.sheet' compute='_compute_expense_sheet_count' string='Expense Report'
Public methods (1)
  • action_view_expense_sheet(self)

New fields (2)
  • pr_line_id Many2one → purchase.request.line
    comodel_name='purchase.request.line' help='Expense created from this purchase request line' ondelete='cascade'
  • purchase_type_id Many2one → purchase.type
    comodel_name='purchase.type' compute='_compute_purchase_type_id' domain=<expr> index=True ondelete='restrict' readonly=False store=True string='Purchase Type'
Public methods (0)

No public methods.

New fields (8)
  • clearing_date_due Date
    compute='_compute_clearing_date_due' store=True
  • clearing_term Selection
    default='thirty_days_after_receive' readonly=True selection=[('thirty_days_after_receive', '30 days after receiving the money'), ('thirty_days_after_return', '30 days after returning to the office')] states={'draft': [('readonly', False)]} tracking=True
  • date_return Date
    readonly=True states={'draft': [('readonly', False)]} string='Returned Date' tracking=True
  • employee_user_id Many2one
    readonly=True related='employee_id.user_id'
  • no_pr_check Boolean
    copy=False groups='hr_expense.group_hr_expense_manager' string='Skip Amount Check'
  • pr_for Selection
    compute='_compute_pr_for' readonly=False selection=[('expense', 'Expense'), ('advance', 'Advance')] store=True string='Use PR for'
  • pr_line_ids One2many → hr.expense.sheet.prline
    comodel_name='hr.expense.sheet.prline' copy=False inverse_name='sheet_id'
  • purchase_request_id Many2one → purchase.request
    comodel_name='purchase.request' copy=False domain="[('requested_by', '=', employee_user_id), ('state', '=', 'approved'), ('purchase_type_id.to_create', '=', 'expense')]" help='Select purchase request of this employee, to create expense lines' index=True ondelete='restrict' readonly=True states={'draft': [('readonly', False)]} string='Purchase Request'
Public methods (5)
  • action_sheet_move_create(self)
    Remove clearing_date_due when clearing term is 30 Days after receive
  • action_submit_sheet(self)
  • approve_expense_sheets(self)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (11)
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True related='pr_line_id.currency_id' string='Currency'
  • description Text
    readonly=True related='pr_line_id.description' string='Notes...'
  • employee_id Many2one → hr.employee
    comodel_name='hr.employee' readonly=True related='sheet_id.employee_id'
  • name Char
    readonly=True related='pr_line_id.name' string='Description'
  • pr_line_id Many2one → purchase.request.line
    comodel_name='purchase.request.line' ondelete='cascade'
  • product_id Many2one → product.product
    comodel_name='product.product' readonly=True related='pr_line_id.product_id' string='Product'
  • quantity Float
    digits='Product Unit of Measure'
  • reference Text
    readonly=True related='pr_line_id.specifications' string='Bill Reference'
  • sheet_id Many2one → hr.expense.sheet
    comodel_name='hr.expense.sheet' string='Expense Report'
  • total_amount Monetary
    compute='_compute_total_amount' readonly=True string='Total'
  • unit_amount Monetary
    string='Unit Price'
Public methods (0)

No public methods.

New fields (2)
  • expense_sheet_count Integer
    compute='_compute_expense_sheet_count' string='Expense Report Count'
  • expense_sheet_ids One2many → hr.expense.sheet
    comodel_name='hr.expense.sheet' inverse_name='purchase_request_id' string='Expense Report'
Public methods (3)
  • action_view_expense_sheet(self)
  • button_draft(self)
  • button_rejected(self)
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/l10n-thailand
PULL REQUEST
PULL REQUEST[18.0][MIG] l10n_th_gov_hr_expense: Migration to 18.0 (#607)