This module refactor the ir.sequence allowing more legends to be added with minimal code duplication and adding preview fields on both ir.sequence and ir.sequence.date_range models. the preview field is a computed fields that only visible in edit-mode of the form view works with range_ and range_end_. It helps users to check and validate the prefix, suffix, and padding configuration easily without a need to actually generate an actual document.
Adding more legends to ir.sequence requires an extension of an inner method _interpolation_dict() of the _get_prefix_suffix() method. An extension of an inner method is impractical, therefore this module override the _get_prefix_suffix() method by moving the inner private method _interpolation_dict() to a private method. Therefore, this allows another module to add more legends to the ir.sequence.
This modules works as a base module to other modules to add more legends to ir.sequence. and extends the ir.sequence allowing range_end_ , range_period_ and qoy legends. It adds the following legends:
- The end of date_range year with century: %(range_end_year)s
- The end of date_range year without century: %(range_end_y)s
- The end of date_range month: %(range_end_month)s
- The end of date_range day: %(range_end_day)s
- The end of date_range day of the year: %(range_end_doy)s
- The end of date_range week of the year: %(range_end_woy)s
- The end of date_range weekday: %(range_end_weekday)s
- The end of date_range hour in 24-hour: %(range_end_h24)s
- The end of date_range hour in 12-hour: %(range_end_h12)s
- The end of date_range minute: %(range_end_min)s
- The end of date_range second: %(range_end_sec)s
- The period of date_range month: %(range_period_month)s
- Quarter of the Year: %(qoy)s
- The begin of date_range quarter of the Year: %(range_qoy)s
- The end of date_range quarter of the Year: %(range_end_qoy)s
- Current Buddhist Era (BE) year with century: %(year_be)s
- Current Buddhist Era (BE) year without century: %(y_be)s
- The begin of date_range Buddhist Era (BE) year with century: %(range_year_be)s
- The begin of date_range Buddhist Era (BE) year without century: %(range_y_be)s
- The end of date_range Buddhist Era (BE) year with century: %(range_end_year_be)s
- The end of date_range Buddhist Era (BE) year without century: %(range_end_y_be)s
auto_awesome What this module does
AI-generated from the code · Odoo 19.0Adds a live preview of the next sequence number on sequence screens and supports extra date placeholders, including Thai Buddhist Era years and quarter of the year.
This module improves how numbering sequences are configured in Odoo. On the sequence form, a new Preview field shows what the next number will look like based on the current prefix, suffix and padding, so users can check their setup without generating a real document. For sequences that use date ranges, the preview also appears on each date range line.
The module adds new placeholders that can be used in prefixes and suffixes: - Quarter of the year (%(qoy)s) - Buddhist Era year with century (%(year_be)s) and without century (%(y_be)s) - Range and current variants of these placeholders, such as range_year_be, current_year_be, range_end_year_be, range_qoy and range_period_month
It also makes the placeholder system easier to extend for other modules. If a prefix or suffix uses an unknown placeholder, Odoo raises a clear error instead of failing silently. The changes apply to the sequence configuration screens under Settings, and affect the ir.sequence and ir.sequence.date_range models.
Depends on
Models and fields (2)
- ir.sequence · extends an existing modelpreview
- ir.sequence.date_range · extends an existing modelpreview
Text generated by AI (DeepSeek) from reading the Odoo 19.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-03Confirmation status: 5 confirmed, 4 with no information of 9 versions.
Sources · Odoo 19.0
Confirmed on 2026-11-03 in branch 19.0 of OCA/l10n-thailand.
terminal Installation and usage
No verified informationInstallation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
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.