Repository
OCA/l10n-thailand · module folder · Try on Runboat
Module version
1.0.0
Category
Tools
Folder size
2.47 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/l10n-thailand
Last tracking update
2026-08-13 17:32:51
Authors
Odoo Community Association (OCA), Ecosoft
Maintainers
Odoo Community Association (OCA), Ecosoft
Committers
OCA-git-bot, oca-ci, monthop-gmail
Odoo dependencies
odoo/odoo:
- web
Python dependencies
None
System dependencies
None
Required by
None
Description
This module is a utility package for Thailand, providing helper functions commonly used in Thai-specific contexts.

It includes features such as:

- Conversion between Arabic and Thai numerals
- Thai month name and Buddhist calendar (Thai year) conversion
- Thai font support:

    - Font `THSrisakdi`
    - Font `THSarabunNew`
    - Font `THSarabun`
    - Font `THNiramitAS`
    - Font `THMaliGrade6`
    - Font `THKrub`
    - Font `THKoHo`
    - Font `THKodchasal`
    - Font `THK2DJuly8`
    - Font `THFahkwang`
    - Font `THCharmonman`
    - Font `THCharmofAU`
    - Font `THChakraPetch`
    - Font `THBaijam`
    - Font `AngsanaNew`
    - Font `Webdings`

Code Analysis

Views touched (0)

No views found for this module.

HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (2)

New fields (1)
  • font Selection
    selection_add=[('THSrisakdi', 'THSrisakdi'), ('THSarabunNew', 'THSarabunNew'), ('THSarabun', 'THSarabun'), ('THNiramitAS', 'THNiramitAS'), ('THMaliGrade6', 'THMaliGrade6'), ('THKrub', 'THKrub'), ('THKoHo', 'THKoHo'), ('THKodchasal', 'THKodchasal'), ('THK2DJuly8', 'THK2DJuly8'), ('THFahkwang', 'THFahkwang'), ('THCharmonman', 'THCharmonman'), ('THCharmofAU', 'THCharmofAU'), ('THChakraPetch', 'THChakraPetch'), ('THBaijam', 'THBaijam'), ('AngsanaNew', 'AngsanaNew'), ('Webdings', 'Webdings')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (4)
  • format_thai_date(self, date_obj, month_format='full', buddhist_year=True, format_date='{day} {month} {year}', include_time=False, time_format='%H:%M')
    @api.model
    Format a date or datetime object to Thai date string. Args: date_obj: date object month_format: "full" → มกราคม "short" → ม.ค. "numeric" → 01, 02, 03 buddhist_year (bool): True = พ.ศ., False = ค.ศ. format_date (str): format custom include_time: append time part if datetime
  • thai_month_name(self, month, short=False)
    @api.model
    Convert month number (1-12) to Thai month name.
  • to_arabic_number(self, value)
    @api.model
    Convert Thai numerals to Arabic numerals (0-9).
  • to_thai_number(self, value)
    @api.model
    Convert Arabic numerals to Thai numerals (0-9).

Loading…