[FIX] website_sale: trigger the change event on the right node
This commit is contained in:
parent
ed18ab7649
commit
258a4cac82
|
@ -169,12 +169,15 @@ $('.oe_website_sale').each(function () {
|
|||
$select.find("option:not(:first)").hide();
|
||||
var nb = $select.find("option[data-country_id="+($(this).val() || 0)+"]").show().size();
|
||||
$select.parent().toggle(nb>1);
|
||||
}).change();
|
||||
});
|
||||
$(oe_website_sale).find("select[name='country_id']").change();
|
||||
|
||||
$(oe_website_sale).on('change', "select[name='shipping_country_id']", function () {
|
||||
var $select = $("select[name='shipping_state_id']");
|
||||
$select.find("option:not(:first)").hide();
|
||||
var nb = $select.find("option[data-country_id="+($(this).val() || 0)+"]").show().size();
|
||||
$select.parent().toggle(nb>1);
|
||||
}).change();
|
||||
});
|
||||
$(oe_website_sale).find("select[name='shipping_country_id']").change();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue