summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2016-09-09 09:29:00 +0200
committerNicolas Lempereur <nle@odoo.com>2016-09-09 09:45:00 +0200
commite0d4dd01cc44261930bfd77d5b6cd651c13fbc75 (patch)
tree4f194cdcdeebcd3df9b68ed554dbd21956bb0dba
parent1d4f2a59e1ede46a506f27d92c45aee0d31a3ade (diff)
[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
-rw-r--r--addons/website_sale/static/src/js/website_sale.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_sale/static/src/js/website_sale.js b/addons/website_sale/static/src/js/website_sale.js
index 5d01e05759e..cb78afe7e9f 100644
--- a/addons/website_sale/static/src/js/website_sale.js
+++ b/addons/website_sale/static/src/js/website_sale.js
@@ -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();