Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][FIX] website_event_meet, *: properly await edit option before reload #159574

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/website_event_meet/static/src/js/snippets/options.js
Expand Up @@ -22,9 +22,9 @@ options.registry.WebsiteEvent.include({
* @see this.selectClass for parameters
*/
allowRoomCreation(previewMode, widgetValue, params) {
this.orm.write("event.event", [this.eventId], {
return this.orm.write("event.event", [this.eventId], {
meeting_room_allow_creation: widgetValue,
}).then(() => this.trigger_up('request_save', {reload: true, optionSelector: this.data.selector}));
});
},

//--------------------------------------------------------------------------
Expand Down
9 changes: 5 additions & 4 deletions addons/website_sale/static/src/js/website_sale.editor.js
Expand Up @@ -220,7 +220,7 @@ options.registry.WebsiteSaleProductsItem = options.Class.extend({
* @see this.selectClass for params
*/
changeSequence: function (previewMode, widgetValue, params) {
rpc('/shop/config/product', {
return rpc('/shop/config/product', {
product_id: this.productTemplateID,
sequence: widgetValue,
}).then(() => this._reloadEditable());
Expand Down Expand Up @@ -424,6 +424,7 @@ options.registry.WebsiteSaleProductsItem = options.Class.extend({
var $td = $(ev.currentTarget);
var x = $td.index() + 1;
var y = $td.parent().index() + 1
// TODO this should be awaited somehow
rpc('/shop/config/product', {
product_id: this.productTemplateID,
x: x,
Expand Down Expand Up @@ -642,7 +643,7 @@ options.registry.WebsiteSaleProductPage = options.Class.extend({
* Removes all extra-images from the product.
*/
clearImages: function () {
rpc(`/shop/product/clear-images`, {
return rpc(`/shop/product/clear-images`, {
model: this.mode,
product_product_id: this.productProductID,
product_template_id: this.productTemplateID,
Expand Down Expand Up @@ -736,7 +737,7 @@ options.registry.WebsiteSaleProductAttribute = options.Class.extend({
* @see this.selectClass for params
*/
setDisplayType: function (previewMode, widgetValue, params) {
rpc('/shop/config/attribute', {
return rpc('/shop/config/attribute', {
attribute_id: this.attributeID,
display_type: widgetValue,
}).then(() => this.trigger_up('request_save', {reload: true, optionSelector: this.data.selector}));
Expand Down Expand Up @@ -798,7 +799,7 @@ options.registry.ReplaceMedia.include({
*
*/
async setPosition(previewMode, widgetValue, params) {
rpc('/shop/product/resequence-image', {
return rpc('/shop/product/resequence-image', {
image_res_model: this.recordModel,
image_res_id: this.recordId,
move: widgetValue,
Expand Down