Skip to content

Commit

Permalink
[FIX] website_sale_options: prevent concurent t-if on same element
Browse files Browse the repository at this point in the history
  - Install website_sale_coupon
  - Install website_sale_options (in that order)
  - Create a promotion code
  - Add item to cart and go to checkout
  - Add promotion code
  - The quantity for the promotion code is now duplicate and one of them
    can be changed (which is not supposed to be)

Website_sale_options and website_sale_coupon both xpath and t-if the same
element.
The module that has been installed last will have the upper hand on the
condition and only its condition will be applied.

Now, it correctly take care of both conditions.
  • Loading branch information
rdeodoo committed Oct 23, 2017
1 parent cd5f61d commit d92491f
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -11,7 +11,7 @@

<template id="optional_products" inherit_id="website_sale.cart_lines" name="Optional products">
<xpath expr="//table[@id='cart_products']/tbody//td[hasclass('td-qty')]/div" position="attributes">
<attribute name="t-if">not line.linked_line_id</attribute>
<attribute name="t-if" add="(not line.linked_line_id)" separator=" and "></attribute>
</xpath>
<xpath expr="//table[@id='cart_products']/tbody//tr" position="attributes">
<attribute name="t-att-class">'optional_product info' if line.linked_line_id else None</attribute>
Expand Down

0 comments on commit d92491f

Please sign in to comment.