Skip to content

Commit 3eb1fbe

Browse files
committed
[REF] website_sale: convert SnippetSave patch to OWL
task-3850413
1 parent 078c847 commit 3eb1fbe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

addons/website_sale/static/src/js/website_sale.editor.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import options from "@web_editor/js/editor/snippets.options.legacy";
44
import { MediaDialog } from "@web_editor/components/media_dialog/media_dialog";
5+
import { SnippetSave } from "@web_editor/js/editor/snippets.options";
56
import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog";
67
import { _t } from "@web/core/l10n/translation";
78
import "@website/js/editor/snippets.options";
@@ -736,12 +737,12 @@ options.registry.WebsiteSaleProductAttribute = options.Class.extend({
736737
});
737738

738739
// Disable save for alternative products snippet
739-
options.registry.SnippetSave.include({
740+
patch(SnippetSave.prototype, {
740741
/**
741742
* @override
742743
*/
743744
async _computeVisibility() {
744-
return await this._super(...arguments)
745+
return await super._computeVisibility(...arguments)
745746
&& !this.$target.hasClass('o_wsale_alternative_products');
746747
}
747748
});

0 commit comments

Comments
 (0)