[16.0][ADD] withholding_tax_remittance_kmitl: batch clear WHT payable - #1248
Open
n3n wants to merge 8 commits into
Open
[16.0][ADD] withholding_tax_remittance_kmitl: batch clear WHT payable#1248n3n wants to merge 8 commits into
n3n wants to merge 8 commits into
Conversation
Adds a WHT Remittance document that lets an accountant select withholding tax certificates for one ภ.ง.ด. form and post a single journal entry (Dr WHT payable / Cr bank) when the office remits the tax to the Revenue Department, marking those certificates "นำส่งแล้ว" so the รอนำส่ง balance no longer accumulates unchecked.
… by 'string'
Odoo rejects a translated attribute (string) as an inheritance selector at
module install ("View inheritance may not use attribute 'string' as a
selector"). Anchor the new group-by filter on the sibling filter's name
instead.
…ains bank_account_id and journal_id both filter on company_id in their domain. Gating the field itself behind base.group_multi_company made it absent from the view for single-company installs, which Odoo's view validation rejects. Keep it always present but invisible instead.
… period and per-cert analytic lines Fixes 7 review bugs: missing test date fixtures, wrong reversal assertion, action_cancel wiping cert history without a trace, certs being snatched across draft remittances, missing copy=False on cert_ids, certs without a ภ.ง.ด. form slipping past validation, and the cert_ids one2many widget deleting certificates instead of unlinking them. Also adds new business requirements: the remittance period (period_month/ period_year) is now a user-entered input validated against certificate dates, at most one non-cancelled remittance may exist per form per month, and the clearing journal entry splits into one Dr/Cr line pair per certificate per analytic distribution (read back from each certificate's source entry) so both sides of the entry stay attributable.
…ource, book cheque through both bank accounts A remittance is now also scoped by source_analytic_id (แหล่งเงิน) so the same form/month can be filed separately per funding source, per ADR-0003. Certificates with more than one source on their WHT lines are rejected rather than split. The clearing JE replaces the single bank_account_id with savings_account_id/current_account_id and books both the cheque (WHT payable / current account) and the bank's sweep that funds it (current account / savings account), so each account reconciles against its own statement.
…nslate to Thai via i18n Field string=/help=, Selection option labels, button/menu/action names, and error messages were hardcoded Thai. Convert them to English source text and move the Thai text into i18n/th.po as translations, so the module follows the standard Odoo convention of English source + locale .po files instead of baking one language into the code. Business data lookups (the กรมสรรพากร partner-name match) and developer comments/docstrings are unaffected.
…th.po Fill in the remaining untranslated entries (standard mail.thread fields, selection labels, error messages) so th.po has full Thai coverage instead of falling back to the English source for anything not touched by the earlier label-to-English pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
withholding_tax_remittance_kmitl, depending onfinance_kmitl+l10n_th_account_tax, no changes to either.withholding.tax.remittance): selectwithholding.tax.certrecords for one ภ.ง.ด. form, post a single balanced JE (Dr WHT payable / Cr bank), and durably mark the certs "นำส่งแล้ว" viacert.remittance_id.Test plan
withholding_tax_remittance_kmitlon a test DB and confirm existing WHT cert flows are unaffected