[FIX] website_sale_option: force price for qty 1
Display the price for 1 product only
This commit is contained in:
@@ -128,6 +128,8 @@ class WebsiteSale(http.Controller):
|
||||
(variant id, [visible attribute ids], variant price, variant sale price)
|
||||
"""
|
||||
# product attributes with at least two choices
|
||||
product = product.with_context(quantity=1)
|
||||
|
||||
visible_attrs_ids = product.attribute_line_ids.filtered(lambda l: len(l.value_ids) > 1).mapped('attribute_id').ids
|
||||
to_currency = request.website.get_current_pricelist().currency_id
|
||||
attribute_value_ids = []
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
}'/>
|
||||
<span class="oe_price" style="white-space: nowrap;"
|
||||
t-att-data-product-id="product.id"
|
||||
t-field="product.price"
|
||||
t-field="product.with_context(quantity=1).website_price"
|
||||
t-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": website.currency_id
|
||||
|
||||
Reference in New Issue
Block a user