From 03e3c8aa7f8e824bc1c649c5c5cd4e6c0efd2832 Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Tue, 7 Sep 2021 14:32:42 +0000 Subject: [PATCH] [FIX] website_sale: fix create a new ribbon Before this commit, when creating a new ribbon after selecting an existing ribbon, the style of the selected ribbon was added to the new ribbon in addition to the default style. task-2501515 closes odoo/odoo#77412 X-original-commit: 10867860489214b956fbe7fac5ff36f24c94c46d Signed-off-by: Romain Derie (rde) --- addons/website_sale/static/src/js/website_sale.editor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/website_sale/static/src/js/website_sale.editor.js b/addons/website_sale/static/src/js/website_sale.editor.js index 5d068b7416d..231899f7883 100644 --- a/addons/website_sale/static/src/js/website_sale.editor.js +++ b/addons/website_sale/static/src/js/website_sale.editor.js @@ -468,6 +468,7 @@ options.registry.WebsiteSaleProductsItem = options.Class.extend({ */ createRibbon(previewMode, widgetValue, params) { this.saveMethod = 'create'; + this.setRibbon(false); this.$ribbon.html('Ribbon text'); this.$ribbon.addClass('bg-primary o_ribbon_left'); this._toggleEditingUI(true);