From f642fbe807d12bcaff92e55dfc6f3831bb8095c3 Mon Sep 17 00:00:00 2001 From: pilarvargas-tecnativa Date: Tue, 8 Aug 2023 17:40:47 +0200 Subject: [PATCH] [MIG] website_form_require_legal: Migration to version 16.0 TT44376 --- website_form_require_legal/__manifest__.py | 7 ++++--- website_form_require_legal/static/src/js/options.js | 8 ++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/website_form_require_legal/__manifest__.py b/website_form_require_legal/__manifest__.py index 046fad6835..7210fbf821 100644 --- a/website_form_require_legal/__manifest__.py +++ b/website_form_require_legal/__manifest__.py @@ -3,18 +3,19 @@ { "name": "Website Form Require Legal", "summary": "Add possibility to require confirm legal terms.", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "category": "Website", "license": "LGPL-3", "website": "https://github.com/OCA/website", "author": "Tecnativa, Odoo Community Association (OCA)", "application": False, "installable": True, - "depends": ["website"], + "depends": ["web_editor", "website"], "data": ["views/snippets.xml"], "assets": { "website.assets_wysiwyg": [ - "website_form_require_legal/static/src/js/options.js" + "website_form_require_legal/static/src/js/options.js", + "website_form_require_legal/static/src/xml/website_form_editor.xml", ], "web.assets_frontend": [ "website_form_require_legal/static/src/scss/website_form_legal.scss" diff --git a/website_form_require_legal/static/src/js/options.js b/website_form_require_legal/static/src/js/options.js index 1b66d2902c..2b19b21731 100644 --- a/website_form_require_legal/static/src/js/options.js +++ b/website_form_require_legal/static/src/js/options.js @@ -3,15 +3,11 @@ odoo.define("website_form_require_legal.form_editor", function (require) { const core = require("web.core"); const options = require("web_editor.snippets.options"); - require("website.editor.snippets.options"); + require("website.form_editor_registry"); const qweb = core.qweb; - const WebsiteFormEditor = options.registry.WebsiteFormEditor; - WebsiteFormEditor.include({ - xmlDependencies: (WebsiteFormEditor.prototype.xmlDependencies || []).concat([ - "/website_form_require_legal/static/src/xml/website_form_editor.xml", - ]), + options.registry.WebsiteFormEditor.include({ /** * @override */