[17.0][REF] account_caba_payment_date: absorb account_cash_basis_lock_date task#32267 - #9
Merged
Conversation
…task#32267 Merge the functionality of the mtnmx module account_cash_basis_lock_date, which overlapped with this module on the same flow (the date of the tax cash basis entry vs the lock dates): - Include the tax lock date in the effective lock date used by the standard _create_tax_cash_basis_moves fallback (context key cash_basis_check_tax_lock), so document-vs-document reconciliations (e.g. a credit note applied to an invoice of a closed month) date the entry on the operation date instead of failing to post, subject to the existing lock policy. - Apply the same criterion to the exchange rate difference entry generated by the reconciliation. - Post a traceability message on the shifted entries and their source documents (expected date vs applied date). The account.move write guard of the absorbed module is dropped: it only defended against this module rewriting the entry date after the fact, which the lock policy now handles at the source. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Linked to Odoo task #32267 |
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.
Merges the functionality of the
account_cash_basis_lock_datemodule (mtnmx repo, task#31178) intoaccount_caba_payment_date, so a single module with a single configuration governs the date of the cash basis entry.Why
Both modules manipulate the date of the tax cash basis (CABA) entry and overlapped:
account_caba_payment_datedates the entry on the payment date, with a configurable policy when that date falls in a locked period.account_cash_basis_lock_date(mtnmx) made the reconciliation work when the source documents' period is closed through the tax lock date, which standard Odoo ignores when choosing the entry date (_get_user_fiscal_lock_dateonly considers fiscal/period locks), plus exchange difference handling and chatter traceability.The absorbed behavior operates at a layer the lock policy cannot reach: the failure happens inside
super()._create_tax_cash_basis_moves(), before the policy code runs.Changes
res.company._get_user_fiscal_lock_datenow includes the tax lock date under thecash_basis_check_tax_lockcontext key, making the standard fallback (date the entry on the operation date) trigger for tax-locked periods.account.move.writeguard of the absorbed module is dropped: it only defended against this module rewriting the entry date after the fact, which the lock policy now handles at the source.Companion
The mtnmx MR removing
account_cash_basis_lock_datefollows; that module must be uninstalled from the databases before deploying the removal.🤖 Generated with Claude Code