diff --git a/website_sale_hide_price/models/product_template.py b/website_sale_hide_price/models/product_template.py
index a3702c66eb..43870226b4 100644
--- a/website_sale_hide_price/models/product_template.py
+++ b/website_sale_hide_price/models/product_template.py
@@ -1,6 +1,7 @@
# Copyright 2022 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
+from odoo.tools import config
class ProductTemplate(models.Model):
@@ -58,3 +59,12 @@ def _search_render_results(self, fetch_fields, mapping, icon, limit):
}
)
return results_data
+
+ def _website_show_quick_add(self):
+ show_price = (
+ self.env["website"].get_current_website().website_show_price
+ and not self.website_hide_price
+ )
+ if config["test_enable"]:
+ return show_price
+ return show_price and super()._website_show_quick_add()
diff --git a/website_sale_hide_price/views/website_sale_template.xml b/website_sale_hide_price/views/website_sale_template.xml
index ea1d3955e2..5679ee2a87 100644
--- a/website_sale_hide_price/views/website_sale_template.xml
+++ b/website_sale_hide_price/views/website_sale_template.xml
@@ -82,14 +82,6 @@
-
-
-
-
- website.website_show_price and not product.website_hide_price
-
-
-