Daily updates from Odoo
Saturday, August 30, 2025
5 changes · saas-18.4
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 update fixes an error that occurred when users typed a new contract template name during quick creation. The entered name is now handled correctly, allowing the contract template record to be created without an invalid input error.
Original PR description
Previously, _rec_name was set to 'employee_id', causing quick-create on the Many2one to fail with a type error when typing a new contract template name. Changing _rec_name to 'name' ensures that the typed string is correctly used to create a new hr.version record, fixing the invalid input syntax error during creation. Related task: 5005987. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
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
Server actions that update records now require an update path to be set. This prevents incomplete actions from being saved and helps avoid later errors when those automations run.
Original PR description
[FIX] base: make update_path required for 'Update Record' server actions If a server action was previously created without an `update path`, the resulting error already fixes with this commit [1]. This commit ensures that the `update_path` field is marked as required when the action type is set to `Update Record`. [1]: https://github.com/odoo/odoo/pull/217723/commits/9d0144f97795d71474bf84bdfd7ed7025fd8a9a2 Forward-Port-Of: odoo/odoo#224869 Forward-Port-Of: odoo/odoo#207928
Users switching a server action away from “update with AI” will no longer see a validation warning that no longer applies. This prevents confusion and makes configuring automated actions smoother.
Original PR description
Bug === When setting a server action "update with AI", and switching to a different type of action, the validation error could be raised because we didn't check the `state`. Task-4989962 Forward-Port-Of: odoo/enterprise#92516