[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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user