Search 1.9 billion lines of Odoo code on GitHub

l10n_th_sequence_refactored

Author: Sansiri Tanachutiwat, Odoo Community Association (OCA)
License: AGPL-3
Branch: 15.0-add-l10n_th_account_tax_report_2
Repository: ecosoft-odoo/l10n-thailand
Dependencies: base
Languages: HTML (345, 41.6%), Python (398, 48.0%), XML (31, 3.7%), and reStructuredText (55, 6.6%)
Other branches: 14.0-add-l10n_th_account_asset_management, 14.0-add-l10n_th_account_payment_deduction, 14.0-add-l10n_th_account_tax, 14.0-add-l10n_th_check_ktb, 14.0-add-l10n_th_company_novat_cosmetic, 14.0-add-l10n_th_export_payment, 14.0-add-l10n_th_gov_purchase_agreement, 14.0-add-l10n_th_gov_purchase_request, 14.0-add-l10n_th_gov_work_acceptance, 14.0-add-l10n_th_purchase_guarantee, 14.0-add-sequence_refactored, 14.0-copier, 14.0-enh-l10n_th_account_asset_management, 14.0-enh-l10n_th_partner-title_config, 14.0-enh-partner_title, 14.0-fix-l10n_th_sequence-add_sudo, 14.0-l10n_th_gov_work_acceptance, 14.0-mig-l10n_th_withholding_tax_report, 14.0-upd-copier, 14.0-upd-test_script_error, 15.0-add-l10n_th_bank_payment_export, 15.0-add-l10n_th_gov_account_asset_management, 15.0-add-l10n_th_gov_hr_expense, 15.0-fix-account_tax_report_date-not_late, 15.0-fix-compute-tax_base, 15.0-fix-l10n_th_account_asset_management-change_image, 15.0-fix-l10n_th_account_tax_expense-show_reference, 15.0-fix-l10n_th_gov_purchase_guarantee-compute_sudo, 15.0-fix-partner_search_error, 15.0-fix-purchase_guarantee-compute_sudo, 15.0-imp-l10n_th_account_asset_management-allow_select_asset_on_je, 15.0-mig-l10n_th_account_asset_management, 15.0-mig-l10n_th_gov_purchase_agreement, 15.0-mig-l10n_th_gov_purchase_guarantee, 15.0-mig-l10n_th_gov_purchase_request, 15.0-mig-l10n_th_purchase_work_acceptance, 15.0-mig-l10n_th_sequence_be, 15.0-mig-l10n_th_sequence_branch, 15.0-mig-l10n_th_sequence_qoy, 15.0-mig-l10n_th_sequence_range_end, 15.0-mig-l10n_th_sequence_refactored, 15.0-update-copier, kittiu-remove-check-tax, and test_purchase_agreement
Other repositories: OCA/l10n-thailand, kurogeek/l10n-thailand, newtratip/l10n-thailand, and sansirit/l10n-thailand

<h1 class="title">Base Sequence</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/l10n-thailand/tree/15.0/l10n_th_sequence_refactored"><img alt="OCA/l10n-thailand" src="https://img.shields.io/badge/github-OCA%2Fl10n--thailand-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-thailand-15-0/l10n-thailand-15-0-l10n_th_sequence_refactored"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/238/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>This module refactor the <cite>ir.sequence</cite> allowing more legends to be added with minimal code duplication and adding <cite>preview</cite> fields on both <cite>ir.sequence</cite> and <cite>ir.sequence.date_range</cite> models. the <cite>preview</cite> field is a computed fields that only visible in edit-mode of the form view works with <cite>range_</cite> and <cite>range_end_</cite>. It helps users to check and validate the prefix, suffix, and padding configuration easily without a need to actually generate an actual document.</p> <p>Adding more legends to <cite>ir.sequence</cite> requires an extension of an inner method <cite>_interpolation_dict()</cite> of the <cite>_get_prefix_suffix()</cite> method. An extension of an inner method is impractical, therefore this module override the <cite>_get_prefix_suffix()</cite> method by moving the inner private method <cite>_interpolation_dict()</cite> to a private method. Therefore, this allows another module to add more legends to the <cite>ir.sequence</cite>.</p> <p>This modules works as a base module to other modules to add more legends to <cite>ir.sequence</cite>.</p> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id2">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id3">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li> <li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li> </ul> </li> </ul> </div> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id1">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-thailand/issues">GitHub Issues</a>. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed <a class="reference external" href="https://github.com/OCA/l10n-thailand/issues/new?body=module:%20l10n_th_sequence_refactored%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h2><a class="toc-backref" href="#id2">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id3">Authors</a></h3> <ul class="simple"> <li>Sansiri Tanachutiwat</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id4">Contributors</a></h3> <ul class="simple"> <li><a class="reference external" href="http://tggs.kmtunb.ac.th">TGGS KMUTNB</a>:<ul> <li>Sansiri Tanachutiwat &lt;<a class="reference external" href="mailto:sansiri.t&#64;tggs.kmutnb.ac.th">sansiri.t&#64;tggs.kmutnb.ac.th</a>&gt;</li> </ul> </li> <li><a class="reference external" href="http://ecosoft.co.th">Ecosoft</a>:<ul> <li>Saran Lim. &lt;<a class="reference external" href="mailto:saranl&#64;ecosoft.co.th">saranl&#64;ecosoft.co.th</a>&gt;</li> </ul> </li> </ul> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id5">Maintainers</a></h3> <p>This module is maintained by the OCA.</p> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-thailand/tree/15.0/l10n_th_sequence_refactored">OCA/l10n-thailand</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>