[IMP] website_sale: _onChangeCountry improvements
Changed _onChangeCountry and _changeCountry from website_sale.js to make them inheritable by returning the value of the promise instead of returning nothing. closes odoo/odoo#137480 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -238,7 +238,7 @@ export const WebsiteSale = publicWidget.Widget.extend(VariantMixin, cartHandlerM
|
||||
if (!$("#country_id").val()) {
|
||||
return;
|
||||
}
|
||||
this.rpc("/shop/country_infos/" + $("#country_id").val(), {
|
||||
return this.rpc("/shop/country_infos/" + $("#country_id").val(), {
|
||||
mode: $("#country_id").attr('mode'),
|
||||
}).then(function (data) {
|
||||
// placeholder phone_code
|
||||
@@ -628,7 +628,7 @@ export const WebsiteSale = publicWidget.Widget.extend(VariantMixin, cartHandlerM
|
||||
if (!this.$('.checkout_autoformat').length) {
|
||||
return;
|
||||
}
|
||||
this._changeCountry();
|
||||
return this._changeCountry();
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user