Saturday, August 30, 2025
3 changes · saas-18.4
New functionality added to Odoo
Adds a new Polish localization module to record and display the taxable supply date on invoices, helping businesses meet local VAT reporting requirements. The change also adjusts accounting behavior and invoice reporting so Polish companies can manage this date consistently, including around lock dates.
Original PR description
This new module aims at adding support for taxable supply date in Poland. task-4829233 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224888 Forward-Port-Of: odoo/odoo#212362
Resolved issues and error corrections
This fix ensures temporarily deleted mail records are no longer treated as active records by internal business logic. It prevents crashes and incorrect data reuse during record deletion and recreation, improving reliability in mail-related features.
Original PR description
Before this commit, business code could leak records that are soft deleted, i.e. the representation of the record is still in the store but conceptually this record is deleted. These soft-deleted…
Before this commit, business code could leak records that are soft deleted, i.e. the representation of the record is still in the store but conceptually this record is deleted. These soft-deleted records are present in the code for a very short time, just enough time to warn business code in the onDelete() hooks. The problem for Model.records and Model.get() to return these records, is that the business code thinks these records are not deleted, which can lead to misuses and crashes. For example: if a computed field returns this soft-deleted record, then the field value has this soft-deleted record. When the record is hard-deleted, this field will be recomputed, but when diffing with its old this will crash because it will still have a trace of the record in the internal code. This commit fixes the issue by removing the record from Model.records when soft-deleted, so that Model.records and Model.get() doesn't return this record. The onDelete() hooks will returned the soft-deleted like before because the deleted records are stored in the data queue of the hooks. This solution also solves another problem: if a record is deleted and there's an immediate side-effect computed field to insert this record, the previous implementation would hard-delete the record at the end which is wrong: the record should be deleted but the insert part should apply, thus the resulting record is a fresh one with same identity but only partial data from the insert. All other field values must be lost from the deletion. The changes in this commit also fixes this issue. Commit also fixes issue for `.exists()` that should be `false` for soft-deleted records. Task-4860196 Forward-Port-Of: odoo/odoo#224892 Forward-Port-Of: odoo/odoo#224485
This fix prevents loyalty points from being counted twice when a coupon confirmation is repeated, such as after a connection issue. It helps keep customer rewards balances accurate and avoids unintended extra discounts or points.
Original PR description
Before this commit, if the `confirm_coupon_programs` method was called twice (e.g., due to an internet issue), the loyalty points were calculated incorrectly. This commit fixes the issue by checking the existing loyalty history to prevent duplicate point calculations. To enable this, the creation of oyalty history records has been moved into the `confirm_coupon_programs` function. opw-4877599 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224694 Forward-Port-Of: odoo/odoo#222372