Monday, April 25, 2022
9 changes · master
Enhancements to existing features
Odoo now handles missing default values more efficiently when many records are created at once. This prevents duplicate sequence numbers in batch-created records and reduces repeated database lookups, especially for product and partner-related workflows.
Original PR description
`_add_missing_default_values` is made to work in batch. Models with a sequence can take advantage of that to increase the sequence for each new record in the batch. Before this commit, all records…
`_add_missing_default_values` is made to work in batch. Models with a sequence can take advantage of that to increase the sequence for each new record in the batch. Before this commit, all records created in a batch would have the same sequence if no sequence was provided to `create`. The new sequence is computed after the parent `_add_missing_default_values` instead of before (or instead of in `create`) to keep the possibility to have the default value coming from other means, as computed in `default_get`. The opportunity is also taken to change the definition of some defaults methods that would lead to the execution of queries, because those queries would be done for each record in the batch. This is typically the case for defaults that use `ref` which does an `exists` (as opposed to `xmlid_to_res_model_res_id`) or it is obviously also the case for the defaults doing a `search` directly. Indeed the result of these queries would then either be read or be added as a many2one, both of which will already check the existence of the resource. The focus of this commit was on products and partners, but the same logic can be applied to other models if they have such defaults and the performance of their batch create is important.
Product variant records will now prevent missing combination information, reducing the chance of duplicate or inconsistent variants after migrations or external database updates. This helps keep product catalogs more reliable without changing day-to-day workflows.
Original PR description
On [1] it was wrongly assumed that `required` was unnecessary because the field is computed and the compute method never set NULL. However [2] highlighted cases where the field was NULL in database. This can especially happen after a migration, or more generally for any database change made outside the ORM. To avoid issues, we need to ensure the same product.template does not have two variants one with empty string and one with NULL, thus making the field required to prevent NULL values. [1] 22a11a6f4d0b08a56712fafd0f87a2e7bb5b00ec [2] 03e7efc3b4592c5f063c665130011a91fcc4d683
The chatter area now makes the attachment action easier to recognize and use. This helps users find and manage document attachments more confidently during everyday communication workflows.
Original PR description
task-2413814
This update adds test coverage to help ensure timesheet reminders, attendance reporting, multi-company timesheets, and time off-related timesheet entries behave correctly. It reduces the risk of payroll, approval, and absence-tracking issues by validating important business scenarios such as holidays overlapping with approved time off.
Original PR description
Reminders- - employee reminder: an email should be sent when the employee has timesheet less hours than he should have - manager reminder: an email should be sent when the manager has not validated timesheets within the corresponding timeframe. Timesheet / attendance report Time off - public holidays should not generate an entry if the employee is already on time off - the project and task set on the time off type should be set on the generated timesheets task-2727561
This update aligns the activity component with Odoo interface guidelines in Mail and eLearning slides. Users get a more consistent experience when viewing and managing activities across these areas.
Original PR description
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
Project task starring is now presented as priority, making the purpose clearer for users. Task assignment dates are cleaned up when assignees are removed, collaborators gain a helpful action shortcut, and task calendars can now be viewed by year for broader planning.
Original PR description
- The starred field was renamed as priority. - The assigned date is now set back to False when the user is unassigned from the task - An action helper was added to the collaborators view - The year mode was added to the calendar view of tasks task-2802506 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update adds checks to ensure timesheet reminder emails are sent when employees are short on hours and when managers have pending validations. It also improves testing around resetting validated timesheets back to draft, helping protect key timesheet approval workflows from regressions.
Original PR description
Reminders- - employee reminder: an email should be sent when the employee has timesheet less hours than he should have - manager reminder: an email should be sent when the manager has not validated timesheets within the corresponding timeframe. Timesheets validation - reset a timesheet to draft task-2727561
New PLM engineering change records created together now receive separate sequence numbers instead of sharing the same order. This improves list ordering and helps teams distinguish and manage newly created records more reliably.
Original PR description
`_add_missing_default_values` was made to work in batch, and this commit takes advantage of that to increase the sequence for each new record in the batch. Before this commit, all records created in a batch would have the same sequence. Enterprise counterpart of odoo/odoo#36704
Activity cards have been updated to follow the latest interface guidelines in Approvals, Documents, Sign, and VoIP. This creates a more consistent experience for users when reviewing and acting on activities across these apps.
Original PR description
* = approvals, documents, sign, voip