cb789579d25e1549b348ed16e4cf08ddaf0c9fbf
Steps to reproduce:
- Install website_sale module
- Create a new company X
- Create a new product Y and set company to X
- Create a website Z and ensure it's linked to a company but NOT X
- Go to website Z homepage and edit it
- Add a `Products` block then save
(should be by default on filter `Newest`)
- Select product Y in the block
Issue:
The product should not be displayed and when clicking on it, we have
an access right error.
Cause:
Not taking into account the company of the website when preparing
values to render in the snippet therefore the product is displayed
while it should not.
Solution:
Update `_prepare_values` to add the website company to the domain if
the filter's model has a company_id field.
Same issue occure with latest_sold filter (for ex.) so must
apply same fix to `_get_products` for filters that use a server action.
opw-2956186
closes odoo/odoo#99181
X-original-commit: dab7fed0c396d3dd6e2e2ad8560c706d5c2e89fb
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
…
…
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%