Skip to content
Snippets Groups Projects
Commit e0d4dd01 authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] website_sale: toggle shipping state display

In 1ef52c9c the code displaying state of a given country was improved
for some incompatibilities.

But, if when setting the billing informations we choose to create a new
shipping address, the shipping state* would not be displayed even when it
should be (currently, if the shipping country is Australia or U.S.).

opw-687948

*a state being a subdivision of a country
parent 1d4f2a59
No related branches found
No related tags found
No related merge requests found
......@@ -332,7 +332,7 @@ $('.oe_website_sale').each(function () {
$('input.js_variant_change, select.js_variant_change', this).first().trigger('change');
});
var state_options = $("select[name='state_id']:enabled option:not(:first)");
var state_options = $("select[name='state_id'] option:not(:first)");
$(oe_website_sale).on('change', "select[name='country_id']", function () {
var select = $("select[name='state_id']");
state_options.detach();
......@@ -342,7 +342,7 @@ $('.oe_website_sale').each(function () {
});
$(oe_website_sale).find("select[name='country_id']").change();
var shipping_state_options = $("select[name='shipping_state_id']:enabled option:not(:first)");
var shipping_state_options = $("select[name='shipping_state_id'] option:not(:first)");
$(oe_website_sale).on('change', "select[name='shipping_country_id']", function () {
var select = $("select[name='shipping_state_id']");
shipping_state_options.detach();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment