Sunday, April 5, 2026
2 changes · saas-19.2
Resolved issues and error corrections
This update significantly improves the speed and efficiency of loading product attributes on the shop page, especially when displaying a large number of products. The change optimizes how product information is retrieved, reducing memory usage and dramatically speeding up loading times. This results in a smoother and more responsive shopping experience for customers.
Original PR description
Before this commit, fetching product template attributes was slow and memory-intensive when handling a large number of products. The domain included IDs of all fetched products, leading to high memory usage and slow performance. To fix this, use the product domain directly instead of passing product IDs. Below is the performance comparison for the read_group used for attribute fetching: | Products | Before (Memory) | Before (Time) | After (Time) | | -------- | --------------- | ------------- | ------------ | | 900K | 113MB | 2.5s | 2ms | | 2M | 200MB | 7s | 2.5ms | | 9M | OOM | +15s (OOM) | 11ms | opw-5949132 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 Forward-Port-Of: odoo/odoo#256124
This update corrects a validation error that prevented users from being correctly linked to employees within the company. The issue stemmed from a miscalculation of employee IDs during user setup, particularly in a non-sudo environment. The fix ensures accurate employee linking by consistently performing searches within a sudo environment.
Original PR description
**Steps to reproduce** - Install `pos_hr` with demo data - Open Settings > Manage Users - Validation Error: A user cannot be linked to multiple employees in the same company **Cause** `employee_id`…
**Steps to reproduce** - Install `pos_hr` with demo data - Open Settings > Manage Users - Validation Error: A user cannot be linked to multiple employees in the same company **Cause** `employee_id` for the current user was computed as False here: https://github.com/odoo/odoo/blob/361aa8505506f9686b1cdb244ba1723ee3f06f7b/addons/pos_hr/models/pos_config.py#L27 Despite an employee already existing, which led to the error here: https://github.com/odoo/odoo/blob/361aa8505506f9686b1cdb244ba1723ee3f06f7b/addons/pos_hr/models/pos_config.py#L30 This exposes an issue with `_compute_company_employee`: - the compute is called a first time on multiple users, including the current user, in a non-sudo environment - the `employee_id` field for the current user is accessed in a sudo environment The problem comes from the search in non-sudo, which uses an `ir.rule` that evaluates `user.employee_id` in sudo while we are computing `user.employee_id`. **Fix** We avoid the cache issue by always performing the search in sudo. opw-6046297 Forward-Port-Of: odoo/odoo#256624