[FIX] website_sale: restore visibility on products snippet

Since [1] the visibility options were removed from the products snippet.

This commit restores the visibility options.

Steps to reproduce:
- Drop a products snippet.
- Select it.
=> The visibility options were not shown.

[1]: https://github.com/odoo/odoo/commit/57a1776c3695b1fec6ffa0b6ec3de59518b8a0a9

task-2930503

X-original-commit: 47172c76f8020abdab2a7bd7bdfece6760b8316f
Part-of: odoo/odoo#103637
This commit is contained in:
Benoit Socias
2022-10-25 13:03:18 +02:00
parent 6104af8881
commit 51a006673c
@@ -928,22 +928,6 @@ options.registry.WebsiteSaleProductAttribute = options.Class.extend({
},
});
// Disable "Shown on Mobile/Desktop" option if for dynamic product snippets
options.registry.DeviceVisibility.include({
//--------------------------------------------------------------------------
// Private
//--------------------------------------------------------------------------
/**
* @override
*/
async _computeVisibility() {
return await this._super(...arguments)
&& !this.$target.hasClass('s_dynamic_snippet_products');
},
});
// Disable save for alternative products snippet
options.registry.SnippetSave.include({
/**