2228b92f467db40ea1d12879266591b935e7ee8d
**Current behavior:**
Enabling the 'Comparison Price' setting and filling out the
field will result in this strikethrough price appearing even
after disabling the setting.
**Expected behavior:**
The strikethrough comparison price will only appear when the
corresponding setting is enabled in the database settings.
**Steps to reproduce:**
1. Enable the 'Comparison Price' setting in website settings
2. Select a product on the 'Shop' page of the website and edit
it so it has a comparison price != to its regular one
3. Save product changes, go back to the db settings and disable
the 'Comparison Price' setting
4. Go back to the website 'Shop' page and observe that the
strikethrough comparison price is still displayed
**Cause of the issue:**
In the product.template model in website_sale, the price values
are modified to those informed by the compare_list_price value
independent of the current value of the corresponding database
setting. It only checks if there is non-False value in the
field.
**Fix:**
Check if the user belongs to the group corresponding to this db
settings prior to modifying the product template to display the
strikethrough compare price.
opw-3705079
closes odoo/odoo#154573
X-original-commit: 0d76bdb23d26f777587c9c30d5479fdf3c694937
Signed-off-by: Vincent Ethan <etvi@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@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%