[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) <rde@odoo.com>
This commit is contained in:
Benjamin Vray
2021-09-29 15:56:34 +00:00
parent 5afaeef864
commit 03e3c8aa7f
@@ -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);