[FIX] web_editor: allow translations of hidden blocks
Steps to reproduce: - Drop a block, hide it on desktop and save - Add a second language and click on translate => This raises an error. The bug happened after the forward-port of [1] to 16.3, because `_updateInvisibleDOM` was called prior to `_loadSnippetsTemplates`: it then tried to `_createSnippetEditor`, requiring `templateOptions` while they were still undefined. opw-3383659 [1]: https://github.com/odoo/odoo/commit/959ea3d361f closes odoo/odoo#127139 X-original-commit: c92ea9f10cdd38b275157e1ba7e79b84e3e45cbb Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
@@ -1925,8 +1925,8 @@ var SnippetsMenu = Widget.extend({
|
||||
|
||||
if (this.options.enableTranslation) {
|
||||
// Load the sidebar with the style tab only.
|
||||
defs.push(this._updateInvisibleDOM());
|
||||
await this._loadSnippetsTemplates();
|
||||
defs.push(this._updateInvisibleDOM());
|
||||
this.$el.find('.o_we_website_top_actions').removeClass('d-none');
|
||||
this.$('.o_snippet_search_filter').addClass('d-none');
|
||||
this.$('#o_scroll').addClass('d-none');
|
||||
|
||||
Reference in New Issue
Block a user