[FIX] website_sale: remove race condition on variant tour

Before this commit, there was a possible race condition in the
`tour_shop_dynamic_variants` tour. Indeed, the `click add to cart` would be
triggered before the `click on the second variant` RPCs are done.

Trigger on `.oe_price .oe_currency_value:contains("0.00")` was supposed to
check that condition but it was not strong enough.

Then, clicking on add to cart would not call `create_product_variant` as it
would still have the first variant id in the hidden input instead of "0".

closes odoo/odoo#31670

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
Romain Derie
2019-03-07 15:12:43 +00:00
parent 8c91670a77
commit edfa62bbae
@@ -26,6 +26,7 @@ tour.register('tour_shop_dynamic_variants', {
},
{
content: "click add to cart",
extra_trigger: 'body:has(input[type="hidden"][name="product_id"][value=0])',
trigger: '#add_to_cart',
},
{