odoo/odoo#257553
Created by fw-bot
Merged
at 9fca84b6ff791e04b81eaf57f8b7a2889da2f59f
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: (runtime 1124s)
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:saas-19.2-saas-18.3-opw-6065319-rating-avg-access-issue-krip-514472-fw
- head
- 9f2f8cb6c5f65cd3de2606f2660c68ff3aa6fe79
- merged
- 5 months ago by Krishna Arvindkumar Patel (krip)
| odoo/odoo | |
|---|---|
| saas-18.3 | #256570 |
| saas-18.4 | #257381 |
| 19.0 | #257400 |
| saas-19.1 | #257507 |
| saas-19.2 | #257553 |
| master | #257681 |
[FIX] website_sale: fix ecommerce product rating acl check
Steps to produce:
- Install the Ecommerce module.
- Create a product.
- In the Sales tab, set an alternative product and ensure both are published.
- Open the product page on the website and enable reviews from the editor.
- Open the same product page in incognito mode.
Issue:
AccessError: You do not have enough rights to access the field "rating_avg"
on Product Variant (product.product).
Root cause:
- Currently, product records in dynamic snippets to be fetched without
superuser privileges. Since therating_avgfield is restricted to
internal users, public visitors encounter anAccessErrorwhen
viewing snippets with ratings enabled. - Similar approach used here.
opw-6065319
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr