Skip to content

Commit

Permalink
[FIX] website_sale_options: striked price
Browse files Browse the repository at this point in the history
- Set the 'Public Pricelist' with 'Discount Policy: Discount included
  in the price'.
- Go to the shop and search the product 'iPad Retina Display'
- Add product to cart by using the quick add to cart button

The 'Add to Cart' modal show public price & discount to the customer.

Closes odoo#31378
opw-1944362

closes odoo#32114

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
  • Loading branch information
nim-odoo committed Mar 26, 2019
1 parent 2fa9e88 commit 24961b9
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,15 @@
<td class="text-center td-price" name="price">
<ul class="hidden js_add_cart_variants" t-att-data-attribute_value_ids="json.dumps(main_product_attr_ids)"></ul>
<div class="hidden oe_unchanged_value_ids" t-att-data-unchanged_value_ids="main_product_attr_ids[0][1]" ></div>
<span t-attf-class="text-danger oe_default_price oe_striked_price {{ (compute_currency(product.lst_price) - product.website_price) &lt; 0.01 and 'hidden' }}"
t-field="product.lst_price"
t-options='{
"widget": "monetary",
"from_currency": product.currency_id,
"display_currency": website.currency_id
}'/>
<t t-if="website.get_current_pricelist().discount_policy=='without_discount'">
<span t-attf-class="text-danger oe_default_price oe_striked_price {{ (compute_currency(product.lst_price) - product.website_price) &lt; 0.01 and 'hidden' }}"
t-field="product.lst_price"
t-options='{
"widget": "monetary",
"from_currency": product.currency_id,
"display_currency": website.currency_id
}'/>
</t>
<span class="oe_price product_id" style="white-space: nowrap;"
t-att-data-product-id="product.id"
t-esc="product.website_price / quantity"
Expand Down

0 comments on commit 24961b9

Please sign in to comment.