diff --git a/addons/account/__manifest__.py b/addons/account/__manifest__.py index 48ca3195fc0..5518bce7bba 100644 --- a/addons/account/__manifest__.py +++ b/addons/account/__manifest__.py @@ -100,6 +100,7 @@ You could use this simplified accounting in case you work with an (external) acc 'account/static/src/js/legacy_account_move_form.js', 'account/static/src/components/**/*', 'account/static/src/js/tours/account.js', + 'account/static/src/xml/**/*', ], 'web.assets_frontend': [ 'account/static/src/js/account_portal_sidebar.js', @@ -111,10 +112,6 @@ You could use this simplified accounting in case you work with an (external) acc 'web.qunit_suite_tests': [ 'account/static/tests/*.js', ], - 'web.assets_qweb': [ - 'account/static/src/xml/**/*', - 'account/static/src/components/**/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/base_automation/__manifest__.py b/addons/base_automation/__manifest__.py index 12b7cf164f2..2b2c2e980f5 100644 --- a/addons/base_automation/__manifest__.py +++ b/addons/base_automation/__manifest__.py @@ -22,11 +22,9 @@ trigger an automatic reminder email. 'views/base_automation_views.xml', ], 'assets': { - 'web.assets_qweb': [ - 'base_automation/static/src/xml/*.xml', - ], 'web.assets_backend': [ 'base_automation/static/src/js/**/*', + 'base_automation/static/src/xml/*.xml', ], 'web.qunit_suite_tests': [ 'base_automation/static/tests/**/*', diff --git a/addons/base_import/__manifest__.py b/addons/base_import/__manifest__.py index 5a0f33b46ca..6afb4288e83 100644 --- a/addons/base_import/__manifest__.py +++ b/addons/base_import/__manifest__.py @@ -30,13 +30,11 @@ Re-implement Odoo's file import system: 'security/ir.model.access.csv', ], 'assets': { - 'web.assets_qweb': [ - 'base_import/static/src/**/*.xml', - ], 'web.assets_backend': [ 'base_import/static/lib/javascript-state-machine/state-machine.js', 'base_import/static/src/**/*.scss', 'base_import/static/src/**/*.js', + 'base_import/static/src/**/*.xml', ], 'web.qunit_suite_tests': [ 'base_import/static/tests/**/*', diff --git a/addons/board/__manifest__.py b/addons/board/__manifest__.py index c9b8dae28d5..5cb23ba5b2a 100644 --- a/addons/board/__manifest__.py +++ b/addons/board/__manifest__.py @@ -23,13 +23,11 @@ Allows users to create custom dashboard. 'web.assets_backend': [ 'board/static/src/**/*.scss', 'board/static/src/**/*.js', + 'board/static/src/**/*.xml', ], 'web.qunit_suite_tests': [ 'board/static/tests/**/*', ], - 'web.assets_qweb': [ - 'board/static/src/**/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/calendar/__manifest__.py b/addons/calendar/__manifest__.py index 5b64740b2e9..db175f20256 100644 --- a/addons/calendar/__manifest__.py +++ b/addons/calendar/__manifest__.py @@ -45,20 +45,18 @@ If you need to manage your meetings, you should install the CRM module. 'web.assets_backend': [ 'calendar/static/src/scss/calendar.scss', 'calendar/static/src/js/base_calendar.js', + 'calendar/static/src/xml/base_calendar.xml', 'calendar/static/src/js/calendar_renderer.js', 'calendar/static/src/js/calendar_controller.js', 'calendar/static/src/js/calendar_model.js', 'calendar/static/src/js/calendar_view.js', 'calendar/static/src/js/services/calendar_notification_service.js', 'calendar/static/src/views/**/*', + 'calendar/static/src/components/*/*.xml', ], 'web.qunit_suite_tests': [ 'calendar/static/tests/**/*', ], - 'web.assets_qweb': [ - 'calendar/static/src/xml/base_calendar.xml', - 'calendar/static/src/components/*/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/crm/__manifest__.py b/addons/crm/__manifest__.py index a247d683053..c97b1722055 100644 --- a/addons/crm/__manifest__.py +++ b/addons/crm/__manifest__.py @@ -73,10 +73,6 @@ 'mail.assets_messaging': [ 'crm/static/src/models/*.js', ], - 'web.assets_qweb': [ - 'crm/static/src/xml/crm_kanban.xml', - 'crm/static/src/xml/forecast_kanban.xml', - ], 'web.assets_backend': [ 'crm/static/src/js/crm_form.js', 'crm/static/src/js/crm_kanban.js', @@ -84,6 +80,8 @@ 'crm/static/src/js/tours/crm.js', 'crm/static/src/scss/crm.scss', 'crm/static/src/scss/crm_team_member_views.scss', + 'crm/static/src/xml/crm_kanban.xml', + 'crm/static/src/xml/forecast_kanban.xml', ], 'web.assets_tests': [ 'crm/static/tests/tours/**/*', diff --git a/addons/crm_iap_mine/__manifest__.py b/addons/crm_iap_mine/__manifest__.py index c00386253a3..1ba5163a420 100644 --- a/addons/crm_iap_mine/__manifest__.py +++ b/addons/crm_iap_mine/__manifest__.py @@ -27,8 +27,6 @@ 'assets': { 'web.assets_backend': [ 'crm_iap_mine/static/src/js/**/*', - ], - 'web.assets_qweb': [ 'crm_iap_mine/static/src/xml/**/*', ], }, diff --git a/addons/data_recycle/__manifest__.py b/addons/data_recycle/__manifest__.py index d1acdf7f32e..8de01188115 100644 --- a/addons/data_recycle/__manifest__.py +++ b/addons/data_recycle/__manifest__.py @@ -22,8 +22,6 @@ 'assets': { 'web.assets_backend': [ 'data_recycle/static/src/views/*.js', - ], - 'web.assets_qweb': [ 'data_recycle/static/src/views/*.xml', ], }, diff --git a/addons/event/__manifest__.py b/addons/event/__manifest__.py index f33b5a6f7bd..a8b9be90e0d 100644 --- a/addons/event/__manifest__.py +++ b/addons/event/__manifest__.py @@ -50,13 +50,11 @@ Key Features 'web.assets_backend': [ 'event/static/src/scss/event.scss', 'event/static/src/icon_selection_field/icon_selection_field.js', + 'event/static/src/icon_selection_field/icon_selection_field.xml', ], 'web.assets_common': [ 'event/static/src/js/tours/**/*', ], - 'web.assets_qweb': [ - 'event/static/src/**/*', - ], 'web.report_assets_common': [ '/event/static/src/scss/event_foldable_badge_report.scss', '/event/static/src/scss/event_full_page_ticket_report.scss', diff --git a/addons/google_calendar/__manifest__.py b/addons/google_calendar/__manifest__.py index ff737785bbc..48c43f00e17 100644 --- a/addons/google_calendar/__manifest__.py +++ b/addons/google_calendar/__manifest__.py @@ -21,6 +21,7 @@ 'google_calendar/static/src/js/google_calendar_popover.js', 'google_calendar/static/src/js/google_calendar.js', 'google_calendar/static/src/scss/google_calendar.scss', + 'google_calendar/static/src/xml/*.xml', ], 'web.qunit_suite_tests': [ 'google_calendar/static/tests/**/*', @@ -28,9 +29,6 @@ 'web.qunit_mobile_suite_tests': [ 'google_calendar/static/tests/mock_server.js', ], - 'web.assets_qweb': [ - 'google_calendar/static/src/xml/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/google_recaptcha/__manifest__.py b/addons/google_recaptcha/__manifest__.py index 234e1349954..6eb476eddd1 100644 --- a/addons/google_recaptcha/__manifest__.py +++ b/addons/google_recaptcha/__manifest__.py @@ -16,6 +16,7 @@ 'web.assets_frontend': [ 'google_recaptcha/static/src/scss/recaptcha.scss', 'google_recaptcha/static/src/js/recaptcha.js', + 'google_recaptcha/static/src/xml/recaptcha.xml', ], }, 'license': 'LGPL-3', diff --git a/addons/google_recaptcha/static/src/js/recaptcha.js b/addons/google_recaptcha/static/src/js/recaptcha.js index 46ec368e6e3..4d7e876d1d8 100644 --- a/addons/google_recaptcha/static/src/js/recaptcha.js +++ b/addons/google_recaptcha/static/src/js/recaptcha.js @@ -1,10 +1,10 @@ odoo.define('google_recaptcha.ReCaptchaV3', function (require) { "use strict"; -const ajax = require('web.ajax'); const Class = require('web.Class'); const core = require('web.core'); const { session } = require('@web/session'); +const { loadJS } = require('@web/core/assets'); const _t = core._t; @@ -22,7 +22,7 @@ const ReCaptcha = Class.extend({ */ loadLibs: function () { if (this._publicKey) { - this._recaptchaReady = ajax.loadJS(`https://www.recaptcha.net/recaptcha/api.js?render=${this._publicKey}`) + this._recaptchaReady = loadJS(`https://www.recaptcha.net/recaptcha/api.js?render=${this._publicKey}`) .then(() => new Promise(resolve => window.grecaptcha.ready(() => resolve()))); return this._recaptchaReady.then(() => !!document.querySelector('.grecaptcha-badge')); } diff --git a/addons/hr/__manifest__.py b/addons/hr/__manifest__.py index c36d371ccee..f170ee9c8fd 100644 --- a/addons/hr/__manifest__.py +++ b/addons/hr/__manifest__.py @@ -55,16 +55,12 @@ 'web.assets_backend': [ 'hr/static/src/mixins/*.js', 'hr/static/src/views/**/*.js', - 'hr/static/src/components/**/*.js', - 'hr/static/src/components/**/*.scss', + 'hr/static/src/components/**/*', 'hr/static/src/user_menu/*.js', 'hr/static/src/scss/hr.scss', 'hr/static/src/js/m2x_avatar_employee.js', 'hr/static/src/js/standalone_m2o_avatar_employee.js', 'hr/static/src/js/work_permit_upload.js', - ], - 'web.assets_qweb': [ - 'hr/static/src/components/**/*.xml', 'hr/static/src/xml/*.xml', ], 'web.qunit_suite_tests': [ diff --git a/addons/hr_attendance/__manifest__.py b/addons/hr_attendance/__manifest__.py index b0cf465a82b..2cc8850ce2f 100644 --- a/addons/hr_attendance/__manifest__.py +++ b/addons/hr_attendance/__manifest__.py @@ -35,13 +35,11 @@ actions(Check in/Check out) performed by them. 'assets': { 'web.assets_backend': [ 'hr_attendance/static/src/**/*', + 'hr_attendance/static/src/xml/**/*', ], 'web.qunit_suite_tests': [ ('after', 'web/static/tests/legacy/views/kanban_tests.js', 'hr_attendance/static/tests/hr_attendance_tests.js'), ], - 'web.assets_qweb': [ - 'hr_attendance/static/src/xml/**/*', - ], }, 'license': 'LGPL-3', } diff --git a/addons/hr_contract/__manifest__.py b/addons/hr_contract/__manifest__.py index f497354bfdd..741c249b614 100644 --- a/addons/hr_contract/__manifest__.py +++ b/addons/hr_contract/__manifest__.py @@ -35,11 +35,7 @@ You can assign several contracts per employee. 'application': True, 'assets': { 'web.assets_backend': [ - 'hr_contract/static/src/scss/*', - 'hr_contract/static/src/js/*', - ], - 'web.assets_qweb': [ - 'hr_contract/static/src/xml/*', + 'hr_contract/static/src/**/*', ], }, 'license': 'LGPL-3', diff --git a/addons/hr_expense/__manifest__.py b/addons/hr_expense/__manifest__.py index 0504030081b..132262cccd8 100644 --- a/addons/hr_expense/__manifest__.py +++ b/addons/hr_expense/__manifest__.py @@ -55,19 +55,17 @@ This module also uses analytic accounting and is compatible with the invoice on 'assets': { 'web.assets_backend': [ 'hr_expense/static/src/components/*.js', + 'hr_expense/static/src/components/*.xml', 'hr_expense/static/src/mixins/*.js', 'hr_expense/static/src/views/*.js', + 'hr_expense/static/src/views/*.xml', 'hr_expense/static/src/scss/hr_expense.scss', + 'hr_expense/static/src/xml/**/*', ], 'web.assets_tests': [ 'hr_expense/static/src/js/tours/hr_expense.js', 'hr_expense/static/tests/tours/expense_upload_tours.js', ], - 'web.assets_qweb': [ - 'hr_expense/static/src/components/*.xml', - 'hr_expense/static/src/views/*.xml', - 'hr_expense/static/src/xml/**/*', - ], }, 'license': 'LGPL-3', } diff --git a/addons/hr_fleet/__manifest__.py b/addons/hr_fleet/__manifest__.py index 86ff8f97cde..7fa9ce07a0a 100644 --- a/addons/hr_fleet/__manifest__.py +++ b/addons/hr_fleet/__manifest__.py @@ -20,8 +20,6 @@ 'assets': { 'web.assets_backend': [ 'hr_fleet/static/src/js/attachment_kanban.js', - ], - 'web.assets_qweb': [ 'hr_fleet/static/src/xml/attachment_kanban.xml', ], }, diff --git a/addons/hr_holidays/__manifest__.py b/addons/hr_holidays/__manifest__.py index e08ad3d6e81..8de38cc3759 100644 --- a/addons/hr_holidays/__manifest__.py +++ b/addons/hr_holidays/__manifest__.py @@ -71,12 +71,17 @@ A synchronization with an internal agenda (Meetings of the CRM module) is also p 'web.assets_backend': [ 'hr_holidays/static/src/js/**/*.js', 'hr_holidays/static/src/components/*/*.scss', + 'hr_holidays/static/src/components/*/*.xml', 'hr_holidays/static/src/dashboard/**/*.js', 'hr_holidays/static/src/dashboard/**/*.scss', + 'hr_holidays/static/src/dashboard/**/*.xml', 'hr_holidays/static/src/leave_stats/**/*.js', + 'hr_holidays/static/src/leave_stats/**/*.xml', 'hr_holidays/static/src/scss/*.scss', + 'hr_holidays/static/src/xml/**/*.xml', 'hr_holidays/static/src/tours/*.js', 'hr_holidays/static/src/radio_image_field/*.js', + 'hr_holidays/static/src/radio_image_field/*.xml', ], 'web.tests_assets': [ 'hr_holidays/static/tests/helpers/**/*', @@ -84,13 +89,6 @@ A synchronization with an internal agenda (Meetings of the CRM module) is also p 'web.qunit_suite_tests': [ 'hr_holidays/static/tests/qunit_suite_tests/**/*.js', ], - 'web.assets_qweb': [ - 'hr_holidays/static/src/components/*/*.xml', - 'hr_holidays/static/src/dashboard/**/*.xml', - 'hr_holidays/static/src/leave_stats/**/*.xml', - 'hr_holidays/static/src/xml/**/*.xml', - 'hr_holidays/static/src/radio_image_field/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/hr_holidays_attendance/__manifest__.py b/addons/hr_holidays_attendance/__manifest__.py index 4415b462667..33851c54c6a 100644 --- a/addons/hr_holidays_attendance/__manifest__.py +++ b/addons/hr_holidays_attendance/__manifest__.py @@ -23,7 +23,7 @@ Convert employee's extra hours to leave allocations. 'data/hr_holidays_attendance_demo.xml', ], 'assets': { - 'web.assets_qweb': [ + 'web.assets_backend': [ 'hr_holidays_attendance/static/src/xml/time_off_calendar.xml', ], }, diff --git a/addons/hr_org_chart/__manifest__.py b/addons/hr_org_chart/__manifest__.py index d4d078e4df6..ba4038c1888 100644 --- a/addons/hr_org_chart/__manifest__.py +++ b/addons/hr_org_chart/__manifest__.py @@ -23,15 +23,11 @@ This module extend the employee form with a organizational chart. 'hr_org_chart/static/src/scss/variables.scss', ], 'web.assets_backend': [ - 'hr_org_chart/static/src/fields/*.scss', - 'hr_org_chart/static/src/fields/*.js', + 'hr_org_chart/static/src/fields/*', ], 'web.qunit_suite_tests': [ 'hr_org_chart/static/tests/**/*', ], - 'web.assets_qweb': [ - 'hr_org_chart/static/src/fields/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/hr_skills/__manifest__.py b/addons/hr_skills/__manifest__.py index c5b9e2d7de3..4b6348431fe 100644 --- a/addons/hr_skills/__manifest__.py +++ b/addons/hr_skills/__manifest__.py @@ -34,13 +34,9 @@ This module introduces skills and resumé management for employees. 'application': True, 'assets': { 'web.assets_backend': [ - 'hr_skills/static/src/fields/*.js', - 'hr_skills/static/src/fields/*.scss', - 'hr_skills/static/src/views/*.js', - ], - 'web.assets_qweb': [ 'hr_skills/static/src/fields/skills_one2many.xml', - 'hr_skills/static/src/fields/*.xml', + 'hr_skills/static/src/fields/*', + 'hr_skills/static/src/views/*.js', 'hr_skills/static/src/xml/**/*', ], 'web.assets_tests': [ diff --git a/addons/hr_skills_slides/__manifest__.py b/addons/hr_skills_slides/__manifest__.py index dc32ead25ba..eefdf6a959a 100644 --- a/addons/hr_skills_slides/__manifest__.py +++ b/addons/hr_skills_slides/__manifest__.py @@ -23,8 +23,6 @@ This module add completed courses to resumé for employees. 'assets': { 'web.assets_backend': [ 'hr_skills_slides/static/src/scss/**/*', - ], - 'web.assets_qweb': [ 'hr_skills_slides/static/src/xml/**/*', ], }, diff --git a/addons/hr_skills_survey/__manifest__.py b/addons/hr_skills_survey/__manifest__.py index d18241e4832..1b4d617c78f 100644 --- a/addons/hr_skills_survey/__manifest__.py +++ b/addons/hr_skills_survey/__manifest__.py @@ -20,7 +20,7 @@ This module adds certification to resumé for employees. ], 'auto_install': True, 'assets': { - 'web.assets_qweb': [ + 'web.assets_backend': [ 'hr_skills_survey/static/src/xml/**/*', ], }, diff --git a/addons/hr_timesheet/__manifest__.py b/addons/hr_timesheet/__manifest__.py index 6ef99c523c1..1e7e722bbe0 100644 --- a/addons/hr_timesheet/__manifest__.py +++ b/addons/hr_timesheet/__manifest__.py @@ -48,9 +48,8 @@ up a management by affair. 'uninstall_hook': '_uninstall_hook', 'assets': { 'web.assets_backend': [ - 'hr_timesheet/static/src/**/*.scss', - 'hr_timesheet/static/src/**/*.js', - ('remove', 'hr_timesheet/static/src/js/*_legacy.js') + 'hr_timesheet/static/src/**/*', + ('remove', 'hr_timesheet/static/src/js/*_legacy.js'), ], "web.assets_backend_legacy_lazy": [ 'hr_timesheet/static/src/js/*_legacy.js', diff --git a/addons/hr_work_entry/__manifest__.py b/addons/hr_work_entry/__manifest__.py index a500bc89b27..100194e0d2a 100644 --- a/addons/hr_work_entry/__manifest__.py +++ b/addons/hr_work_entry/__manifest__.py @@ -19,7 +19,7 @@ 'views/resource_calendar_views.xml', ], 'assets': { - 'web.assets_qweb': [ + 'web.assets_backend': [ 'hr_work_entry/static/**/*', ], }, diff --git a/addons/iap/__manifest__.py b/addons/iap/__manifest__.py index 45b8d4b9804..8a7a8445d59 100644 --- a/addons/iap/__manifest__.py +++ b/addons/iap/__manifest__.py @@ -23,13 +23,11 @@ to support In-App purchases inside Odoo. """, 'assets': { 'web.assets_backend': [ 'iap/static/src/**/*.js', + 'iap/static/src/**/*.xml', ], 'web.tests_assets': [ 'iap/static/tests/**/*', ], - 'web.assets_qweb': [ - 'iap/static/src/**/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/im_livechat/__manifest__.py b/addons/im_livechat/__manifest__.py index 5a9fa271dcf..f5c85a73204 100644 --- a/addons/im_livechat/__manifest__.py +++ b/addons/im_livechat/__manifest__.py @@ -67,6 +67,7 @@ Help your customers with this chat, and analyse their feedback. 'im_livechat/static/src/components/*/*.js', 'im_livechat/static/src/scss/im_livechat_history.scss', 'im_livechat/static/src/scss/im_livechat_form.scss', + 'im_livechat/static/src/components/*/*.xml', ], 'web.tests_assets': [ 'im_livechat/static/tests/helpers/**/*.js', @@ -78,9 +79,6 @@ Help your customers with this chat, and analyse their feedback. 'web.assets_tests': [ 'im_livechat/static/tests/tours/**/*', ], - 'web.assets_qweb': [ - 'im_livechat/static/src/components/*/*.xml', - ], 'mail.assets_messaging': [ 'im_livechat/static/src/legacy/models/*', 'im_livechat/static/src/legacy/widgets/*', @@ -108,7 +106,6 @@ Help your customers with this chat, and analyse their feedback. 'web/static/src/legacy/js/promise_extension.js', 'web/static/src/boot.js', 'web/static/src/legacy/legacy_component.js', - 'web/static/src/core/assets.js', 'web/static/src/core/browser/browser.js', 'web/static/src/core/browser/feature_detection.js', 'web/static/src/core/dialog/dialog.js', @@ -122,6 +119,7 @@ Help your customers with this chat, and analyse their feedback. 'web/static/src/core/l10n/translation.js', 'web/static/src/core/main_components_container.js', 'web/static/src/core/network/rpc_service.js', + 'web/static/src/core/assets.js', 'web/static/src/core/notifications/notification.js', 'web/static/src/core/notifications/notification_container.js', 'web/static/src/core/notifications/notification_service.js', diff --git a/addons/im_livechat/static/src/js/ajax_external.js b/addons/im_livechat/static/src/js/ajax_external.js index debe12492bc..1ef672b8ec2 100644 --- a/addons/im_livechat/static/src/js/ajax_external.js +++ b/addons/im_livechat/static/src/js/ajax_external.js @@ -1,12 +1,12 @@ /** @odoo-module **/ -import ajax from 'web.ajax'; +import { assets } from "@web/core/assets"; /** * This file should be used in the context of an external widget loading (e.g: live chat in a non-Odoo website) * It overrides the 'loadJS' method that is supposed to load additional scripts, based on a relative URL (e.g: '/web/webclient/locale/en_US') * As we're not in an Odoo website context, the calls will not work, and we avoid a 404 request. */ -ajax.loadJS = function (url) { +assets.loadJS = function (url) { console.log('Tried to load the following script on an external website: ' + url); }; diff --git a/addons/l10n_co_pos/__manifest__.py b/addons/l10n_co_pos/__manifest__.py index f5b9b29c0b4..6a775c40391 100644 --- a/addons/l10n_co_pos/__manifest__.py +++ b/addons/l10n_co_pos/__manifest__.py @@ -18,8 +18,6 @@ 'assets': { 'point_of_sale.assets': [ 'l10n_co_pos/static/src/js/**/*', - ], - 'web.assets_qweb': [ 'l10n_co_pos/static/src/xml/**/*', ], }, diff --git a/addons/l10n_fr_pos_cert/__manifest__.py b/addons/l10n_fr_pos_cert/__manifest__.py index 46df5dde437..84d42429a42 100644 --- a/addons/l10n_fr_pos_cert/__manifest__.py +++ b/addons/l10n_fr_pos_cert/__manifest__.py @@ -40,8 +40,6 @@ The module adds following features: 'point_of_sale.assets': [ 'l10n_fr_pos_cert/static/src/js/**/*', 'l10n_fr_pos_cert/static/src/css/pos.css', - ], - 'web.assets_qweb': [ 'l10n_fr_pos_cert/static/src/xml/**/*', ], }, diff --git a/addons/l10n_gcc_pos/__manifest__.py b/addons/l10n_gcc_pos/__manifest__.py index 147748c0c2c..34c3e0b8c23 100644 --- a/addons/l10n_gcc_pos/__manifest__.py +++ b/addons/l10n_gcc_pos/__manifest__.py @@ -11,12 +11,10 @@ GCC POS Localization 'license': 'LGPL-3', 'depends': ['point_of_sale', 'l10n_gcc_invoice'], 'assets': { - 'web.assets_qweb': [ - 'l10n_gcc_pos/static/src/xml/OrderReceipt.xml', - ], 'point_of_sale.assets': [ 'l10n_gcc_pos/static/src/js/OrderReceipt.js', 'l10n_gcc_pos/static/src/css/OrderReceipt.css', + 'l10n_gcc_pos/static/src/xml/OrderReceipt.xml', ] }, 'auto_install': True, diff --git a/addons/l10n_in_pos/__manifest__.py b/addons/l10n_in_pos/__manifest__.py index 3e882e777fc..c3e64818117 100644 --- a/addons/l10n_in_pos/__manifest__.py +++ b/addons/l10n_in_pos/__manifest__.py @@ -18,8 +18,6 @@ 'assets': { 'point_of_sale.assets': [ 'l10n_in_pos/static/src/js/**/*', - ], - 'web.assets_qweb': [ 'l10n_in_pos/static/src/xml/**/*', ], }, diff --git a/addons/l10n_sa_pos/__manifest__.py b/addons/l10n_sa_pos/__manifest__.py index df99fcadc62..25e75d33c35 100644 --- a/addons/l10n_sa_pos/__manifest__.py +++ b/addons/l10n_sa_pos/__manifest__.py @@ -14,12 +14,10 @@ K.S.A. POS Localization 'l10n_sa', ], 'assets': { - 'web.assets_qweb': [ - 'l10n_sa_pos/static/src/xml/OrderReceipt.xml', - ], 'point_of_sale.assets': [ 'web/static/lib/zxing-library/zxing-library.js', 'l10n_sa_pos/static/src/js/models.js', + 'l10n_sa_pos/static/src/xml/OrderReceipt.xml', ] }, 'auto_install': True, diff --git a/addons/loyalty/__manifest__.py b/addons/loyalty/__manifest__.py index 50e33b4a69e..59ddcc94418 100644 --- a/addons/loyalty/__manifest__.py +++ b/addons/loyalty/__manifest__.py @@ -30,8 +30,6 @@ 'loyalty/static/src/js/loyalty_list_view.js', 'loyalty/static/src/scss/loyalty.scss', 'loyalty/static/src/js/filterable_selection_field/filterable_selection_field.js', - ], - 'web.assets_qweb': [ 'loyalty/static/src/xml/loyalty_templates.xml', ], 'web.qunit_suite_tests': [ diff --git a/addons/lunch/__manifest__.py b/addons/lunch/__manifest__.py index 3d4c5589bc9..78f22addc75 100644 --- a/addons/lunch/__manifest__.py +++ b/addons/lunch/__manifest__.py @@ -42,10 +42,9 @@ If you want to save your employees' time and avoid them to always have coins in 'application': True, 'assets': { 'web.assets_backend': [ - 'lunch/static/src/components/*.js', - 'lunch/static/src/components/*.scss', + 'lunch/static/src/components/*', 'lunch/static/src/mixins/*.js', - 'lunch/static/src/views/*.js', + 'lunch/static/src/views/*', 'lunch/static/src/scss/lunch_view.scss', 'lunch/static/src/scss/lunch_kanban.scss', ], @@ -55,10 +54,6 @@ If you want to save your employees' time and avoid them to always have coins in 'web.qunit_suite_tests': [ 'lunch/static/tests/lunch_kanban_tests.js', ], - 'web.assets_qweb': [ - 'lunch/static/src/components/*.xml', - 'lunch/static/src/views/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/mail/__manifest__.py b/addons/mail/__manifest__.py index 1fd5aa1a154..e4e5898d1e4 100644 --- a/addons/mail/__manifest__.py +++ b/addons/mail/__manifest__.py @@ -191,11 +191,14 @@ For more specific needs, you may also assign custom-defined actions 'mail/static/src/components/notification_list/notification_list_item.scss', 'mail/static/src/js/**/*.js', 'mail/static/src/fields/*.js', + 'mail/static/src/fields/*.xml', 'mail/static/src/utils/*.js', 'mail/static/src/scss/*.scss', + 'mail/static/src/xml/*.xml', 'mail/static/src/component_hooks/*.js', 'mail/static/src/components/*/*.js', 'mail/static/src/components/*/*.scss', + 'mail/static/src/components/*/*.xml', ('include', 'mail.assets_messaging'), 'mail/static/src/services/*.js', 'mail/static/src/views/**/*.js', @@ -223,11 +226,6 @@ For more specific needs, you may also assign custom-defined actions 'web.qunit_mobile_suite_tests': [ 'mail/static/tests/qunit_mobile_suite_tests/**/*.js', ], - 'web.assets_qweb': [ - 'mail/static/src/xml/*.xml', - 'mail/static/src/fields/*.xml', - 'mail/static/src/components/*/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/mass_mailing/__manifest__.py b/addons/mass_mailing/__manifest__.py index 78ec56e4a35..874eb9f2bb2 100644 --- a/addons/mass_mailing/__manifest__.py +++ b/addons/mass_mailing/__manifest__.py @@ -97,6 +97,8 @@ 'mass_mailing/static/src/js/mass_mailing_html_field.js', 'mass_mailing/static/src/js/mailing_mailing_view_form_full_width.js', 'mass_mailing/static/src/js/mailing_portal.js', + 'mass_mailing/static/src/xml/*.xml', + 'mass_mailing/static/src/views/*.xml', ], 'mass_mailing.assets_mail_themes': [ 'mass_mailing/static/src/scss/themes/**/*', @@ -122,10 +124,6 @@ 'mass_mailing/static/src/snippets/s_rating/options.js', 'mass_mailing/static/tests/mass_mailing_html_tests.js', ], - 'web.assets_qweb': [ - 'mass_mailing/static/src/xml/*.xml', - 'mass_mailing/static/src/views/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/mass_mailing/static/src/js/mass_mailing_html_field.js b/addons/mass_mailing/static/src/js/mass_mailing_html_field.js index a379ce314a3..1a2549f6474 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_html_field.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_html_field.js @@ -5,7 +5,7 @@ import { _lt } from "@web/core/l10n/translation"; import { standardFieldProps } from "@web/views/fields/standard_field_props"; import { initializeDesignTabCss } from "mass_mailing.design_constants"; import { toInline } from "web_editor.convertInline"; -import { loadLibs, loadXML } from "web.ajax"; +import { loadBundle } from "@web/core/assets"; import { qweb } from 'web.core'; import { useService } from "@web/core/utils/hooks"; import { buildQuery } from "web.rpc"; @@ -107,8 +107,7 @@ export class MassMailingHtmlField extends HtmlField { async startWysiwyg(...args) { await super.startWysiwyg(...args); - await loadXML('/mass_mailing/static/src/xml/mass_mailing.xml', qweb); - await loadLibs({ + await loadBundle({ jsLibs: [ '/mass_mailing/static/src/js/mass_mailing_link_dialog_fix.js', '/mass_mailing/static/src/js/mass_mailing_snippets.js', diff --git a/addons/microsoft_calendar/__manifest__.py b/addons/microsoft_calendar/__manifest__.py index 7bf9b3a6aad..21e4419f1ce 100644 --- a/addons/microsoft_calendar/__manifest__.py +++ b/addons/microsoft_calendar/__manifest__.py @@ -21,8 +21,6 @@ 'microsoft_calendar/static/src/js/microsoft_calendar_popover.js', 'microsoft_calendar/static/src/js/microsoft_calendar.js', 'microsoft_calendar/static/src/scss/microsoft_calendar.scss', - ], - 'web.assets_qweb': [ 'microsoft_calendar/static/src/xml/*.xml', ], }, diff --git a/addons/mrp/__manifest__.py b/addons/mrp/__manifest__.py index 5c0730b95d6..398395012d2 100644 --- a/addons/mrp/__manifest__.py +++ b/addons/mrp/__manifest__.py @@ -58,15 +58,11 @@ 'uninstall_hook': 'uninstall_hook', 'assets': { 'web.assets_backend': [ - 'mrp/static/src/**/*.js', - 'mrp/static/src/**/*.scss', + 'mrp/static/src/**/*', ], 'web.qunit_suite_tests': [ 'mrp/static/tests/**/*', ], - 'web.assets_qweb': [ - 'mrp/static/src/**/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/mrp_subcontracting/__manifest__.py b/addons/mrp_subcontracting/__manifest__.py index 958c4372997..1d9009276db 100644 --- a/addons/mrp_subcontracting/__manifest__.py +++ b/addons/mrp_subcontracting/__manifest__.py @@ -34,23 +34,12 @@ 'mrp_subcontracting/static/tests/tours/subcontracting_portal_tour.js', ], 'web.assets_backend': [ - 'mrp_subcontracting/static/src/components/**/*.js', - ], - 'web.assets_qweb': [ - 'mrp_subcontracting/static/**/*.xml', - ], - 'mrp_subcontracting.assets_qweb': [ - ('include', 'web.assets_qweb'), - 'mrp_subcontracting/static/src/subcontracting_portal/subcontracting_portal.xml', - 'mrp_subcontracting/static/src/subcontracting_portal/picking_form_controller.xml', + 'mrp_subcontracting/static/src/components/**/*', ], 'mrp_subcontracting.webclient': [ ('include', 'web.assets_backend'), ('remove', 'web/static/src/webclient/menus/*.js'), - 'mrp_subcontracting/static/src/subcontracting_portal/main.js', - 'mrp_subcontracting/static/src/subcontracting_portal/subcontracting_portal.js', - 'mrp_subcontracting/static/src/subcontracting_portal/picking_form_controller.js', - 'mrp_subcontracting/static/src/subcontracting_portal/move_list_view.js', + 'mrp_subcontracting/static/src/subcontracting_portal/*', 'web/static/src/start.js', 'web/static/src/legacy/legacy_setup.js', ], diff --git a/addons/note/__manifest__.py b/addons/note/__manifest__.py index bb4ecebaee3..68446bef823 100644 --- a/addons/note/__manifest__.py +++ b/addons/note/__manifest__.py @@ -29,15 +29,12 @@ 'note/static/src/models/*.js', ], 'web.assets_backend': [ - 'note/static/src/components/*/*.js', + 'note/static/src/components/**/*', 'note/static/src/scss/note.scss', ], 'web.qunit_suite_tests': [ 'note/static/tests/**/*', ], - 'web.assets_qweb': [ - 'note/static/src/components/*/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/partner_autocomplete/__manifest__.py b/addons/partner_autocomplete/__manifest__.py index 8ff8337e075..72cdffb709b 100644 --- a/addons/partner_autocomplete/__manifest__.py +++ b/addons/partner_autocomplete/__manifest__.py @@ -28,6 +28,7 @@ 'partner_autocomplete/static/src/js/partner_autocomplete_fieldchar.js', 'partner_autocomplete/static/src/js/partner_autocomplete_many2one.js', 'partner_autocomplete/static/src/js/web_company_autocomplete.js', + 'partner_autocomplete/static/src/xml/**/*', ], 'web.tests_assets': [ 'partner_autocomplete/static/lib/**/*', @@ -35,9 +36,6 @@ 'web.qunit_suite_tests': [ 'partner_autocomplete/static/tests/**/*', ], - 'web.assets_qweb': [ - 'partner_autocomplete/static/src/xml/**/*', - ], }, 'license': 'LGPL-3', } diff --git a/addons/payment/__manifest__.py b/addons/payment/__manifest__.py index bbfd968c880..36a377a2903 100644 --- a/addons/payment/__manifest__.py +++ b/addons/payment/__manifest__.py @@ -41,6 +41,7 @@ 'payment/static/src/js/manage_form.js', 'payment/static/src/js/payment_form_mixin.js', 'payment/static/src/js/post_processing.js', + 'payment/static/src/xml/payment_post_processing.xml', ], 'web.assets_backend': [ 'payment/static/src/scss/payment_provider.scss', diff --git a/addons/payment/static/src/js/post_processing.js b/addons/payment/static/src/js/post_processing.js index 9af3d9eed61..f397cb7f306 100644 --- a/addons/payment/static/src/js/post_processing.js +++ b/addons/payment/static/src/js/post_processing.js @@ -13,7 +13,6 @@ odoo.define('payment.post_processing', function (require) { publicWidget.registry.PaymentPostProcessing = publicWidget.Widget.extend({ selector: 'div[name="o_payment_status"]', - xmlDependencies: ['/payment/static/src/xml/payment_post_processing.xml'], _pollCount: 0, diff --git a/addons/payment_authorize/static/src/js/payment_form.js b/addons/payment_authorize/static/src/js/payment_form.js index bd564fc0322..e1a23d80d71 100644 --- a/addons/payment_authorize/static/src/js/payment_form.js +++ b/addons/payment_authorize/static/src/js/payment_form.js @@ -3,7 +3,7 @@ odoo.define('payment_authorize.payment_form', require => { 'use strict'; const core = require('web.core'); - const ajax = require('web.ajax'); + const { loadJS } = require('@web/core/assets'); const checkoutForm = require('payment.checkout_form'); const manageForm = require('payment.manage_form'); @@ -102,7 +102,7 @@ odoo.define('payment_authorize.payment_form', require => { } this.authorizeInfo = providerInfo; }).then(() => { - ajax.loadJS(acceptJSUrl); + loadJS(acceptJSUrl); }).guardedCatch((error) => { error.event.preventDefault(); this._displayError( diff --git a/addons/point_of_sale/__manifest__.py b/addons/point_of_sale/__manifest__.py index eeb37400e5c..73e763c2afc 100644 --- a/addons/point_of_sale/__manifest__.py +++ b/addons/point_of_sale/__manifest__.py @@ -59,8 +59,7 @@ ## ## 1. When defining new component, put the .js files in `point_of_sale/static/src/js/` ## and the corresponding .xml files in `point_of_sale/static/src/xml/` - ## * POS is setup to automatically include the .xml files in `web.assets_qweb` and the `.js` files - ## * in `point_of_sale.assets`. + ## * POS is setup to automatically include the .xml and `.js` files in `point_of_sale.assets`. ## 2. When adding new tour tests, put the .js files in `point_of_sale/static/tests/tours/`. ## 3. When adding new qunit tests, put the .js files in `point_of_sale/static/tests/unit/`. ## @@ -84,9 +83,6 @@ 'web.assets_tests': [ 'point_of_sale/static/tests/tours/**/*', ], - 'web.assets_qweb': [ - 'point_of_sale/static/src/xml/**/*.xml', - ], #################################################### ## Exclusive POS Assets 1: For running the POS UI ## @@ -128,6 +124,7 @@ 'web_editor/static/lib/html2canvas.js', 'point_of_sale/static/src/js/**/*.js', 'web/static/lib/zxing-library/zxing-library.js', + 'point_of_sale/static/src/xml/**/*.xml', ], # This bundle contains the code responsible for starting the POS UI. # It is practically the entry point. diff --git a/addons/point_of_sale/static/src/js/Chrome.js b/addons/point_of_sale/static/src/js/Chrome.js index 908a836951e..d0d7039d4f3 100644 --- a/addons/point_of_sale/static/src/js/Chrome.js +++ b/addons/point_of_sale/static/src/js/Chrome.js @@ -1,7 +1,7 @@ odoo.define('point_of_sale.Chrome', function(require) { 'use strict'; - const { loadCSS } = require('web.ajax'); + const { loadCSS } = require('@web/core/assets'); const { useListener } = require("@web/core/utils/hooks"); const BarcodeParser = require('barcodes.BarcodeParser'); const PosComponent = require('point_of_sale.PosComponent'); diff --git a/addons/portal/__manifest__.py b/addons/portal/__manifest__.py index 3d11a22f5fe..46e14fff2ab 100644 --- a/addons/portal/__manifest__.py +++ b/addons/portal/__manifest__.py @@ -40,17 +40,16 @@ a dependency towards website editing and customization capabilities.""", 'portal/static/src/scss/portal.scss', 'portal/static/src/js/portal.js', 'portal/static/src/js/portal_chatter.js', + 'portal/static/src/xml/portal_chatter.xml', 'portal/static/src/js/portal_composer.js', 'portal/static/src/js/portal_signature.js', + 'portal/static/src/xml/portal_signature.xml', 'portal/static/src/js/portal_sidebar.js', + 'portal/static/src/xml/portal_security.xml', ], 'web.assets_tests': [ 'portal/static/tests/**/*', ], - 'web.assets_qweb': [ - 'portal/static/src/xml/portal_chatter.xml', - 'portal/static/src/xml/portal_signature.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/portal/static/src/js/portal.js b/addons/portal/static/src/js/portal.js index fff2910367d..37ac3e5a66b 100644 --- a/addons/portal/static/src/js/portal.js +++ b/addons/portal/static/src/js/portal.js @@ -4,7 +4,6 @@ odoo.define('portal.portal', function (require) { var publicWidget = require('web.public.widget'); const Dialog = require('web.Dialog'); const {_t, qweb} = require('web.core'); -const ajax = require('web.ajax'); const session = require('web.session'); publicWidget.registry.portalDetails = publicWidget.Widget.extend({ @@ -198,7 +197,6 @@ publicWidget.registry.NewAPIKeyButton = publicWidget.Widget.extend({ method: 'api_key_wizard', args: [session.user_id], })); - await ajax.loadXML('/portal/static/src/xml/portal_security.xml', qweb); const self = this; const d_description = new Dialog(self, { title: _t('New API Key'), @@ -304,7 +302,7 @@ function handleCheckIdentity(rpc, wrapped) { return r; } const check_id = r.res_id; - return ajax.loadXML('/portal/static/src/xml/portal_security.xml', qweb).then(() => new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { const d = new Dialog(null, { title: _t("Security Control"), $content: qweb.render('portal.identitycheck'), @@ -355,7 +353,7 @@ function handleCheckIdentity(rpc, wrapped) { }); }); d.open(); - })); + }); }); } return { diff --git a/addons/portal/static/src/js/portal_chatter.js b/addons/portal/static/src/js/portal_chatter.js index 26f404e5a0d..3a34228ece3 100644 --- a/addons/portal/static/src/js/portal_chatter.js +++ b/addons/portal/static/src/js/portal_chatter.js @@ -20,7 +20,6 @@ var _t = core._t; */ var PortalChatter = publicWidget.Widget.extend({ template: 'portal.Chatter', - xmlDependencies: ['/portal/static/src/xml/portal_chatter.xml'], events: { 'click .o_portal_chatter_pager_btn': '_onClickPager', 'click .o_portal_chatter_js_is_internal': 'async _onClickUpdateIsInternal', diff --git a/addons/portal/static/src/js/portal_composer.js b/addons/portal/static/src/js/portal_composer.js index 1622f34bda0..1925a8a4c2f 100644 --- a/addons/portal/static/src/js/portal_composer.js +++ b/addons/portal/static/src/js/portal_composer.js @@ -16,7 +16,6 @@ var _t = core._t; */ var PortalComposer = publicWidget.Widget.extend({ template: 'portal.Composer', - xmlDependencies: ['/portal/static/src/xml/portal_chatter.xml'], events: { 'change .o_portal_chatter_file_input': '_onFileInputChange', 'click .o_portal_chatter_attachment_btn': '_onAttachmentButtonClick', diff --git a/addons/portal/static/src/js/portal_signature.js b/addons/portal/static/src/js/portal_signature.js index eac46519172..cfb7a457323 100644 --- a/addons/portal/static/src/js/portal_signature.js +++ b/addons/portal/static/src/js/portal_signature.js @@ -15,7 +15,6 @@ var _t = core._t; */ var SignatureForm = publicWidget.Widget.extend({ template: 'portal.portal_signature', - xmlDependencies: ['/portal/static/src/xml/portal_signature.xml'], events: { 'click .o_portal_sign_submit': 'async _onClickSignSubmit', }, diff --git a/addons/portal_rating/__manifest__.py b/addons/portal_rating/__manifest__.py index 2ffa6deccc6..a751e41bb13 100644 --- a/addons/portal_rating/__manifest__.py +++ b/addons/portal_rating/__manifest__.py @@ -23,8 +23,11 @@ inclusion of rating directly within the customer portal discuss widget. 'web.assets_frontend': [ 'portal_rating/static/src/scss/portal_rating.scss', 'portal_rating/static/src/js/portal_chatter.js', + 'portal_rating/static/src/xml/portal_chatter.xml', 'portal_rating/static/src/js/portal_composer.js', 'portal_rating/static/src/js/portal_rating_composer.js', + 'portal_rating/static/src/xml/portal_rating_composer.xml', + 'portal_rating/static/src/xml/portal_tools.xml', ], }, 'license': 'LGPL-3', diff --git a/addons/portal_rating/static/src/js/portal_chatter.js b/addons/portal_rating/static/src/js/portal_chatter.js index c57b4faa179..caeb6667dbd 100644 --- a/addons/portal_rating/static/src/js/portal_chatter.js +++ b/addons/portal_rating/static/src/js/portal_chatter.js @@ -27,12 +27,6 @@ PortalChatter.include({ 'click .o_wrating_js_publisher_comment_submit': '_onClickPublisherCommentSubmit', 'click .o_wrating_js_publisher_comment_cancel': '_onClickPublisherCommentCancel', }), - xmlDependencies: (PortalChatter.prototype.xmlDependencies || []) - .concat([ - '/portal_rating/static/src/xml/portal_tools.xml', - '/portal_rating/static/src/xml/portal_chatter.xml' - ]), - /** * @constructor */ diff --git a/addons/portal_rating/static/src/js/portal_rating_composer.js b/addons/portal_rating/static/src/js/portal_rating_composer.js index 96139fb1be7..08e723a7430 100644 --- a/addons/portal_rating/static/src/js/portal_rating_composer.js +++ b/addons/portal_rating/static/src/js/portal_rating_composer.js @@ -19,12 +19,6 @@ const RatingPopupComposer = publicWidget.Widget.extend({ custom_events: { reload_rating_popup_composer: '_onReloadRatingPopupComposer', }, - xmlDependencies: [ - '/portal/static/src/xml/portal_chatter.xml', - '/portal_rating/static/src/xml/portal_chatter.xml', - '/portal_rating/static/src/xml/portal_tools.xml', - '/portal_rating/static/src/xml/portal_rating_composer.xml', - ], willStart: function (parent) { const def = this._super.apply(this, arguments); diff --git a/addons/pos_discount/__manifest__.py b/addons/pos_discount/__manifest__.py index ba31f26e74f..e35125e312a 100644 --- a/addons/pos_discount/__manifest__.py +++ b/addons/pos_discount/__manifest__.py @@ -23,8 +23,6 @@ discount to a customer. 'assets': { 'point_of_sale.assets': [ 'pos_discount/static/src/js/**/*', - ], - 'web.assets_qweb': [ 'pos_discount/static/src/xml/**/*', ], }, diff --git a/addons/pos_epson_printer/__manifest__.py b/addons/pos_epson_printer/__manifest__.py index 7c5bca007c7..778d142a801 100644 --- a/addons/pos_epson_printer/__manifest__.py +++ b/addons/pos_epson_printer/__manifest__.py @@ -22,8 +22,6 @@ Use Epson ePOS Printers without the IoT Box in the Point of Sale 'assets': { 'point_of_sale.assets': [ 'pos_epson_printer/static/src/js/**/*', - ], - 'web.assets_qweb': [ 'pos_epson_printer/static/src/xml/**/*', ], }, diff --git a/addons/pos_hr/__manifest__.py b/addons/pos_hr/__manifest__.py index 79bd54a2755..82945f8ecbf 100644 --- a/addons/pos_hr/__manifest__.py +++ b/addons/pos_hr/__manifest__.py @@ -31,13 +31,11 @@ The actual till still requires one user but an unlimited number of employees can 'pos_hr/static/src/js/CashierName.js', 'pos_hr/static/src/js/LoginScreen.js', 'pos_hr/static/src/js/PaymentScreen.js', + 'pos_hr/static/src/xml/**/*', ], 'web.assets_tests': [ 'pos_hr/static/tests/**/*', ], - 'web.assets_qweb': [ - 'pos_hr/static/src/xml/**/*', - ], }, 'license': 'LGPL-3', } diff --git a/addons/pos_loyalty/__manifest__.py b/addons/pos_loyalty/__manifest__.py index 2e613d159f8..ddaa682d047 100644 --- a/addons/pos_loyalty/__manifest__.py +++ b/addons/pos_loyalty/__manifest__.py @@ -37,13 +37,11 @@ 'pos_loyalty/static/src/js/ControlButtons/PromoCodeButton.js', 'pos_loyalty/static/src/js/ControlButtons/RewardButton.js', 'pos_loyalty/static/src/js/Popups/GiftCardPopup.js', + 'pos_loyalty/static/src/xml/**/*', ], 'web.assets_tests': [ 'pos_loyalty/static/src/js/tours/**/*', ], - 'web.assets_qweb': [ - 'pos_loyalty/static/src/xml/**/*', - ], }, 'license': 'LGPL-3', } diff --git a/addons/pos_mercury/__manifest__.py b/addons/pos_mercury/__manifest__.py index eeb331403d3..a94fca12f9e 100644 --- a/addons/pos_mercury/__manifest__.py +++ b/addons/pos_mercury/__manifest__.py @@ -42,8 +42,6 @@ following: 'pos_mercury/static/src/js/PaymentTransactionPopup.js', 'pos_mercury/static/src/js/ProductScreen.js', 'pos_mercury/static/src/css/pos_mercury.css', - ], - 'web.assets_qweb': [ 'pos_mercury/static/src/xml/**/*', ], }, diff --git a/addons/pos_restaurant/__manifest__.py b/addons/pos_restaurant/__manifest__.py index 5a075470505..b8b945f9ffa 100644 --- a/addons/pos_restaurant/__manifest__.py +++ b/addons/pos_restaurant/__manifest__.py @@ -33,6 +33,7 @@ This module adds several features to the Point of Sale that are specific to rest 'pos_restaurant/static/lib/**/*.js', 'pos_restaurant/static/src/js/**/*.js', ('after', 'point_of_sale/static/src/scss/pos.scss', 'pos_restaurant/static/src/scss/restaurant.scss'), + 'pos_restaurant/static/src/xml/**/*', ], 'web.assets_backend': [ 'point_of_sale/static/src/scss/pos_dashboard.scss', @@ -40,9 +41,6 @@ This module adds several features to the Point of Sale that are specific to rest 'web.assets_tests': [ 'pos_restaurant/static/tests/tours/**/*', ], - 'web.assets_qweb': [ - 'pos_restaurant/static/src/xml/**/*', - ], }, 'license': 'LGPL-3', } diff --git a/addons/pos_sale/__manifest__.py b/addons/pos_sale/__manifest__.py index 84540100104..ed121f6f668 100644 --- a/addons/pos_sale/__manifest__.py +++ b/addons/pos_sale/__manifest__.py @@ -37,8 +37,6 @@ This module adds a custom Sales Team for the Point of Sale. This enables you to 'pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementControlPanel.js', 'pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementScreen.js', 'pos_sale/static/src/js/OrderManagementScreen/SaleOrderRow.js', - ], - 'web.assets_qweb': [ 'pos_sale/static/src/xml/**/*', ], }, diff --git a/addons/pos_sale_product_configurator/__manifest__.py b/addons/pos_sale_product_configurator/__manifest__.py index fa847551424..28c5b54389d 100644 --- a/addons/pos_sale_product_configurator/__manifest__.py +++ b/addons/pos_sale_product_configurator/__manifest__.py @@ -18,8 +18,6 @@ This module adds features depending on both modules. 'point_of_sale.assets': [ 'pos_sale_product_configurator/static/src/js/models.js', 'pos_sale_product_configurator/static/src/css/popups/product_info_popup.css', - ], - 'web.assets_qweb': [ 'pos_sale_product_configurator/static/src/xml/**/*' ] }, diff --git a/addons/pos_six/__manifest__.py b/addons/pos_six/__manifest__.py index 79ff4e14434..e52f2f99ee4 100644 --- a/addons/pos_six/__manifest__.py +++ b/addons/pos_six/__manifest__.py @@ -19,8 +19,6 @@ 'pos_six/static/src/js/Chrome.js', 'pos_six/static/src/js/models.js', 'pos_six/static/src/js/payment_six.js', - ], - 'web.assets_qweb': [ 'pos_six/static/src/xml/**/*', ], } diff --git a/addons/product/__manifest__.py b/addons/product/__manifest__.py index 584e1292d6e..e99a32a1618 100644 --- a/addons/product/__manifest__.py +++ b/addons/product/__manifest__.py @@ -60,6 +60,7 @@ Print product labels with barcode. 'assets': { 'web.assets_backend': [ 'product/static/src/js/**/*', + 'product/static/src/xml/**/*', ], 'web.report_assets_common': [ 'product/static/src/scss/report_label_sheet.scss', @@ -67,9 +68,6 @@ Print product labels with barcode. 'web.qunit_suite_tests': [ 'product/static/tests/**/*', ], - 'web.assets_qweb': [ - 'product/static/src/xml/**/*', - ], }, 'license': 'LGPL-3', } diff --git a/addons/product_matrix/__manifest__.py b/addons/product_matrix/__manifest__.py index 9501afbdceb..d43d245d31d 100644 --- a/addons/product_matrix/__manifest__.py +++ b/addons/product_matrix/__manifest__.py @@ -22,8 +22,6 @@ Please refer to Sale Matrix or Purchase Matrix for the use of this module. 'web.assets_backend': [ 'product_matrix/static/src/js/section_and_note_widget.js', 'product_matrix/static/src/scss/product_matrix.scss', - ], - 'web.assets_qweb': [ 'product_matrix/static/src/xml/**/*', ], }, diff --git a/addons/project/__manifest__.py b/addons/project/__manifest__.py index ed881247ff4..f5e122d456e 100644 --- a/addons/project/__manifest__.py +++ b/addons/project/__manifest__.py @@ -78,6 +78,7 @@ 'project/static/src/scss/project_dashboard.scss', 'project/static/src/scss/project_form.scss', 'project/static/src/scss/project_widgets.scss', + 'project/static/src/xml/**/*', ], "web.assets_backend_legacy_lazy": [ 'project/static/src/js/*_legacy.js', @@ -86,11 +87,6 @@ 'project/static/src/scss/portal_rating.scss', 'project/static/src/js/portal_rating.js', ], - 'web.assets_qweb': [ - 'project/static/src/xml/**/*', - 'project/static/src/components/**/*.xml', - 'project/static/src/views/**/*.xml', - ], 'web.qunit_suite_tests': [ 'project/static/tests/project_test_utils.js', 'project/static/tests/burndown_chart_tests.js', @@ -99,10 +95,6 @@ 'web.assets_tests': [ 'project/static/tests/tours/**/*', ], - 'project.assets_qweb': [ - ('include', 'web.assets_qweb'), - 'project/static/src/project_sharing/**/*.xml', - ], 'project.webclient': [ ('include', 'web.assets_backend'), @@ -120,6 +112,9 @@ 'project/static/src/scss/project_sharing/*', 'web/static/src/start.js', 'web/static/src/legacy/legacy_setup.js', + + 'project/static/src/project_sharing/**/*.xml', + 'portal/static/src/xml/portal_chatter.xml', ], }, 'license': 'LGPL-3', diff --git a/addons/purchase/__manifest__.py b/addons/purchase/__manifest__.py index 31243b81fa4..44745fe2114 100644 --- a/addons/purchase/__manifest__.py +++ b/addons/purchase/__manifest__.py @@ -43,14 +43,12 @@ 'purchase/static/src/views/*.scss', 'purchase/static/src/js/purchase_toaster_button.js', 'purchase/static/src/js/tours/purchase.js', + 'purchase/static/src/**/*.xml', ], 'web.assets_frontend': [ 'purchase/static/src/js/purchase_datetimepicker.js', 'purchase/static/src/js/purchase_portal_sidebar.js', ], - 'web.assets_qweb': [ - 'purchase/static/src/**/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/purchase/static/src/js/purchase_toaster_button.js b/addons/purchase/static/src/js/purchase_toaster_button.js index cddf26c0bd7..f4128838f9e 100644 --- a/addons/purchase/static/src/js/purchase_toaster_button.js +++ b/addons/purchase/static/src/js/purchase_toaster_button.js @@ -7,7 +7,6 @@ odoo.define('purchase.ToasterButton', function (require) { const ToasterButton = Widget.extend({ template: 'purchase.ToasterButton', - xmlDependencies: ['/purchase/static/src/xml/purchase_toaster_button.xml'], events: Object.assign({}, Widget.prototype.events, { 'click .fa-info-circle': '_onClickButton', }), diff --git a/addons/purchase_requisition/__manifest__.py b/addons/purchase_requisition/__manifest__.py index 921e4025b7c..66802a19092 100644 --- a/addons/purchase_requisition/__manifest__.py +++ b/addons/purchase_requisition/__manifest__.py @@ -32,8 +32,6 @@ are agreements you have with vendors to benefit from a predetermined pricing. 'purchase_requisition/static/src/js/purchase_order_line_compare_list_controller.js', 'purchase_requisition/static/src/js/purchase_order_line_compare_list_renderer.js', 'purchase_requisition/static/src/js/purchase_order_line_compare_list_view.js', - ], - 'web.assets_qweb': [ 'purchase_requisition/static/src/xml/purchase_order_line_compare.xml', ], }, diff --git a/addons/rating/__manifest__.py b/addons/rating/__manifest__.py index 4ccee1f5574..58cb0563576 100644 --- a/addons/rating/__manifest__.py +++ b/addons/rating/__manifest__.py @@ -25,13 +25,11 @@ This module allows a customer to give rating. 'web.assets_backend': [ 'rating/static/src/scss/rating_rating_views.scss', 'rating/static/src/components/*/*.scss', + 'rating/static/src/components/*/*.xml', ], 'web.assets_frontend': [ 'rating/static/src/scss/rating_templates.scss', ], - 'web.assets_qweb': [ - 'rating/static/src/components/*/*.xml', - ], 'web.tests_assets': [ 'rating/static/tests/helpers/*.js', ], diff --git a/addons/resource/__manifest__.py b/addons/resource/__manifest__.py index abffc221c01..2d310c58a7a 100644 --- a/addons/resource/__manifest__.py +++ b/addons/resource/__manifest__.py @@ -27,9 +27,6 @@ associated to every resource. It also manages the leaves of every resource. 'web.qunit_suite_tests': [ 'resource/static/tests/components/*.js', ], - 'web.assets_qweb': [ - 'resource/static/src/**/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/sale/__manifest__.py b/addons/sale/__manifest__.py index 5e1d6549f5a..569f3640da1 100644 --- a/addons/sale/__manifest__.py +++ b/addons/sale/__manifest__.py @@ -72,6 +72,7 @@ This module contains all the common features of Sales Management and eCommerce. 'sale/static/src/js/sale_order_controller.js', 'sale/static/src/js/sale_order_view.js', 'sale/static/src/js/product_discount_widget.js', + 'sale/static/src/xml/**/*', ], 'web.assets_frontend': [ 'sale/static/src/scss/sale_portal.scss', @@ -89,9 +90,6 @@ This module contains all the common features of Sales Management and eCommerce. 'web.report_assets_common': [ 'sale/static/src/scss/sale_report.scss', ], - 'web.assets_qweb': [ - 'sale/static/src/xml/**/*', - ], }, 'post_init_hook': '_synchronize_cron', 'license': 'LGPL-3', diff --git a/addons/sale_project/__manifest__.py b/addons/sale_project/__manifest__.py index 62e8563dd8b..bc713118894 100644 --- a/addons/sale_project/__manifest__.py +++ b/addons/sale_project/__manifest__.py @@ -25,9 +25,6 @@ This module allows to generate a project/task from sales orders. 'web.assets_backend': [ 'sale_project/static/src/components/project_right_side_panel/**/*', ], - 'web.assets_qweb': [ - 'sale_project/static/src/components/project_right_side_panel/**/*.xml', - ], }, 'auto_install': True, 'license': 'LGPL-3', diff --git a/addons/sale_stock/__manifest__.py b/addons/sale_stock/__manifest__.py index 657512f3cf7..704e3e9d1b2 100644 --- a/addons/sale_stock/__manifest__.py +++ b/addons/sale_stock/__manifest__.py @@ -47,8 +47,6 @@ Preferences 'assets': { 'web.assets_backend': [ 'sale_stock/static/src/js/**/*', - ], - 'web.assets_qweb': [ 'sale_stock/static/src/xml/**/*', ], }, diff --git a/addons/sale_timesheet/__manifest__.py b/addons/sale_timesheet/__manifest__.py index b825719b507..c58214ce70b 100644 --- a/addons/sale_timesheet/__manifest__.py +++ b/addons/sale_timesheet/__manifest__.py @@ -45,13 +45,11 @@ have real delivered quantities in sales orders. 'web.assets_backend': [ 'sale_timesheet/static/src/components/**/*', 'sale_timesheet/static/src/js/so_line_one2many.js', + 'sale_timesheet/static/src/xml/**/*', ], 'web.assets_tests': [ 'sale_timesheet/static/tests/**/*', ], - 'web.assets_qweb': [ - 'sale_timesheet/static/src/xml/**/*', - ], }, 'license': 'LGPL-3', 'post_init_hook': '_sale_timesheet_post_init', diff --git a/addons/sms/__manifest__.py b/addons/sms/__manifest__.py index cce1acbcde5..a0c04bb9e7f 100644 --- a/addons/sms/__manifest__.py +++ b/addons/sms/__manifest__.py @@ -44,8 +44,7 @@ The service is provided by the In App Purchase Odoo platform. 'sms/static/src/models/*.js', ], 'mail.assets_discuss_public': [ - 'sms/static/src/components/*/*', - ('remove', 'sms/static/src/components/phone_field/*'), + 'sms/static/src/components/sms_button/*', ], 'web.assets_backend': [ 'sms/static/src/js/fields_phone_widget.js', @@ -56,9 +55,6 @@ The service is provided by the In App Purchase Odoo platform. 'sms/static/tests/sms_widget_test.js', 'sms/static/tests/qunit_suite_tests/**/*.js', ], - 'web.assets_qweb': [ - 'sms/static/src/components/*/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/snailmail/__manifest__.py b/addons/snailmail/__manifest__.py index 0079a1ca7b8..4d450500a4d 100644 --- a/addons/snailmail/__manifest__.py +++ b/addons/snailmail/__manifest__.py @@ -38,6 +38,7 @@ Allows users to send documents by post 'web.assets_backend': [ 'snailmail/static/src/components/*/*.js', 'snailmail/static/src/components/*/*.scss', + 'snailmail/static/src/components/*/*.xml', ], 'web.tests_assets': [ 'snailmail/static/tests/helpers/*.js', @@ -45,9 +46,6 @@ Allows users to send documents by post 'web.qunit_suite_tests': [ 'snailmail/static/tests/qunit_suite_tests/**/*.js', ], - 'web.assets_qweb': [ - 'snailmail/static/src/components/*/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/spreadsheet/__manifest__.py b/addons/spreadsheet/__manifest__.py index c8a1684ef85..84ec95d8380 100644 --- a/addons/spreadsheet/__manifest__.py +++ b/addons/spreadsheet/__manifest__.py @@ -15,17 +15,18 @@ 'assets': { 'spreadsheet.o_spreadsheet': [ 'spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js', + # Load all o_spreadsheet templates first to allow to inherit them + 'spreadsheet/static/src/o_spreadsheet/o_spreadsheet.xml', + 'spreadsheet/static/src/chart/odoo_menu/chart_figure.xml', 'spreadsheet/static/src/**/*.js', - ('remove', 'spreadsheet/static/src/assets_backend/**/*.js') + ('remove', 'spreadsheet/static/src/assets_backend/**/*') ], 'web.assets_backend': [ 'spreadsheet/static/src/**/*.scss', - 'spreadsheet/static/src/assets_backend/**/*.js' - ], - 'web.assets_qweb': [ - # Load all o_spreadsheet templates first to allow to inherit them - 'spreadsheet/static/src/o_spreadsheet/o_spreadsheet.xml', 'spreadsheet/static/src/**/*.xml', + 'spreadsheet/static/src/assets_backend/**/*', + ('remove', 'spreadsheet/static/src/o_spreadsheet/o_spreadsheet.xml'), + ('remove', 'spreadsheet/static/src/chart/odoo_menu/chart_figure.xml') ], 'web.qunit_suite_tests': [ 'spreadsheet/static/tests/**/*', diff --git a/addons/spreadsheet/static/src/assets_backend/spreadsheet_action_loader.js b/addons/spreadsheet/static/src/assets_backend/spreadsheet_action_loader.js index d85a0319f99..138c9c3cb58 100644 --- a/addons/spreadsheet/static/src/assets_backend/spreadsheet_action_loader.js +++ b/addons/spreadsheet/static/src/assets_backend/spreadsheet_action_loader.js @@ -1,7 +1,7 @@ /** @odoo-module **/ import { registry } from "@web/core/registry"; -import { loadBundle } from "@web/core/assets"; +import { getBundle, loadBundle } from "@web/core/assets"; import { sprintf } from "@web/core/utils/strings"; const actionRegistry = registry.category("actions"); @@ -13,7 +13,8 @@ const actionRegistry = registry.category("actions"); * @param {function} actionLazyLoader */ export async function loadSpreadsheetAction(env, actionName, actionLazyLoader) { - await loadBundle("spreadsheet.o_spreadsheet"); + const desc = await getBundle("spreadsheet.o_spreadsheet"); + await loadBundle(desc); if (actionRegistry.get(actionName) === actionLazyLoader) { // At this point, the real spreadsheet client action should be loaded and have diff --git a/addons/spreadsheet/static/tests/utils/ui.js b/addons/spreadsheet/static/tests/utils/ui.js index d296f1f547b..24acf92b838 100644 --- a/addons/spreadsheet/static/tests/utils/ui.js +++ b/addons/spreadsheet/static/tests/utils/ui.js @@ -3,7 +3,7 @@ import spreadsheet from "@spreadsheet/o_spreadsheet/o_spreadsheet_extended"; import { registerCleanup } from "@web/../tests/helpers/cleanup"; import { getFixture } from "@web/../tests/helpers/utils"; -import { loadJS } from "@web/core/assets"; +import { loadJS, templates } from "@web/core/assets"; const { App } = owl; const { Spreadsheet } = spreadsheet; @@ -20,7 +20,7 @@ export async function mountSpreadsheet(model) { await loadJS("/web/static/lib/Chart/Chart.js"); const app = new App(Spreadsheet, { props: { model }, - templates: window.__OWL_TEMPLATES__, + templates: templates, env: model.config.evalContext.env, test: true, }); diff --git a/addons/spreadsheet_dashboard/__manifest__.py b/addons/spreadsheet_dashboard/__manifest__.py index 4863720fd51..90848adf0f4 100644 --- a/addons/spreadsheet_dashboard/__manifest__.py +++ b/addons/spreadsheet_dashboard/__manifest__.py @@ -25,8 +25,6 @@ "web.assets_backend": [ "spreadsheet_dashboard/static/src/assets/**/*.js", "spreadsheet_dashboard/static/src/**/*.scss", - ], - "web.assets_qweb": [ "spreadsheet_dashboard/static/src/**/*.xml", ], "web.qunit_suite_tests": [ diff --git a/addons/spreadsheet_dashboard_event_sale/__manifest__.py b/addons/spreadsheet_dashboard_event_sale/__manifest__.py index e3e0feadf5b..abd06b69c16 100644 --- a/addons/spreadsheet_dashboard_event_sale/__manifest__.py +++ b/addons/spreadsheet_dashboard_event_sale/__manifest__.py @@ -17,7 +17,6 @@ 'assets': { 'spreadsheet_dashboard.o_spreadsheet': [], 'web.assets_backend': [], - 'web.assets_qweb': [], 'web.qunit_suite_tests': [], 'web.assets_tests': [ 'spreadsheet_dashboard_event_sale/static/tests/**/*', diff --git a/addons/spreadsheet_dashboard_hr_expense/__manifest__.py b/addons/spreadsheet_dashboard_hr_expense/__manifest__.py index d164d36c4b1..709d5bcb6c0 100644 --- a/addons/spreadsheet_dashboard_hr_expense/__manifest__.py +++ b/addons/spreadsheet_dashboard_hr_expense/__manifest__.py @@ -17,7 +17,6 @@ 'assets': { 'spreadsheet_dashboard.o_spreadsheet': [], 'web.assets_backend': [], - 'web.assets_qweb': [], 'web.qunit_suite_tests': [], 'web.assets_tests': [ 'spreadsheet_dashboard_hr_expense/static/tests/**/*', diff --git a/addons/spreadsheet_dashboard_pos_hr/__manifest__.py b/addons/spreadsheet_dashboard_pos_hr/__manifest__.py index a17a095ed6e..c94598a8d6b 100644 --- a/addons/spreadsheet_dashboard_pos_hr/__manifest__.py +++ b/addons/spreadsheet_dashboard_pos_hr/__manifest__.py @@ -17,7 +17,6 @@ 'assets': { 'spreadsheet_dashboard.o_spreadsheet': [], 'web.assets_backend': [], - 'web.assets_qweb': [], 'web.qunit_suite_tests': [], 'web.assets_tests': [ 'spreadsheet_dashboard_pos_hr/static/tests/**/*', diff --git a/addons/spreadsheet_dashboard_sale/__manifest__.py b/addons/spreadsheet_dashboard_sale/__manifest__.py index 22d4593f429..13dc9b8e121 100644 --- a/addons/spreadsheet_dashboard_sale/__manifest__.py +++ b/addons/spreadsheet_dashboard_sale/__manifest__.py @@ -17,7 +17,6 @@ 'assets': { 'spreadsheet_dashboard.o_spreadsheet': [], 'web.assets_backend': [], - 'web.assets_qweb': [], 'web.qunit_suite_tests': [], 'web.assets_tests': [ 'spreadsheet_dashboard_sale/static/tests/**/*', diff --git a/addons/stock/__manifest__.py b/addons/stock/__manifest__.py index 6e895a32700..d50d6710513 100644 --- a/addons/stock/__manifest__.py +++ b/addons/stock/__manifest__.py @@ -110,10 +110,10 @@ ], 'web.assets_backend': [ 'stock/static/src/**/*.js', + 'stock/static/src/**/*.xml', 'stock/static/src/scss/forecast_widget.scss', 'stock/static/src/scss/stock_empty_screen.scss', - 'stock/static/src/views/**/*.js', - 'stock/static/src/views/**/**.scss', + 'stock/static/src/views/**/*', ], 'web.assets_tests': [ 'stock/static/tests/tours/stock_report_tests.js', @@ -124,10 +124,6 @@ 'stock/static/tests/lazy_column_list_tests.js', 'stock/static/tests/stock_traceability_report_backend_tests.js', ], - 'web.assets_qweb': [ - 'stock/static/src/**/*.xml', - 'stock/static/src/views/**/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/stock/static/src/js/report_stock_forecasted.js b/addons/stock/static/src/js/report_stock_forecasted.js index a6aedc07d40..df148ab384b 100644 --- a/addons/stock/static/src/js/report_stock_forecasted.js +++ b/addons/stock/static/src/js/report_stock_forecasted.js @@ -50,7 +50,7 @@ const ReplenishReport = clientAction.extend({ return Promise.all([ this._super.apply(this, arguments), loadWarehouses, - loadLegacyViews({ rpc: this._rpc.bind(this) }), + loadLegacyViews(), ]); }, diff --git a/addons/stock_account/__manifest__.py b/addons/stock_account/__manifest__.py index f1b67867cd2..5e5055ef5fa 100644 --- a/addons/stock_account/__manifest__.py +++ b/addons/stock_account/__manifest__.py @@ -44,8 +44,6 @@ Dashboard / Reports for Warehouse Management includes: 'assets': { 'web.assets_backend': [ 'stock_account/static/src/js/report_stock_forecasted.js', - ], - 'web.assets_qweb': [ 'stock_account/static/src/xml/inventory_report.xml', ], }, diff --git a/addons/stock_account/static/src/xml/inventory_report.xml b/addons/stock_account/static/src/xml/inventory_report.xml index e4c6cce3f1e..288e08ab6ea 100644 --- a/addons/stock_account/static/src/xml/inventory_report.xml +++ b/addons/stock_account/static/src/xml/inventory_report.xml @@ -1,12 +1,12 @@ - - + + Valuation at Date - + diff --git a/addons/survey/__manifest__.py b/addons/survey/__manifest__.py index dc54e3b80df..7eb18c4ffb4 100644 --- a/addons/survey/__manifest__.py +++ b/addons/survey/__manifest__.py @@ -62,6 +62,7 @@ sent mails with personal token for the invitation of the survey. 'survey.survey_assets': [ 'web/static/lib/Chart/Chart.js', 'survey/static/src/js/survey_image_zoomer.js', + '/survey/static/src/xml/survey_image_zoomer_templates.xml', 'survey/static/src/js/survey_quick_access.js', 'survey/static/src/js/survey_timer.js', 'survey/static/src/js/survey_breadcrumb.js', @@ -75,6 +76,7 @@ sent mails with personal token for the invitation of the survey. 'web/static/lib/bootstrap/scss/_variables.scss', 'survey/static/src/scss/survey_templates_form.scss', 'survey/static/src/scss/survey_templates_results.scss', + 'survey/static/src/xml/survey_breadcrumb_templates.xml', ], 'survey.survey_user_input_session_assets': [ 'survey/static/src/js/libs/chartjs-plugin-datalabels.min.js', @@ -83,12 +85,13 @@ sent mails with personal token for the invitation of the survey. 'survey/static/src/js/survey_session_text_answers.js', 'survey/static/src/js/survey_session_leaderboard.js', 'survey/static/src/js/survey_session_manage.js', + 'survey/static/src/xml/survey_session_text_answer_template.xml', ], 'web.report_assets_common': [ 'survey/static/src/scss/survey_reports.scss', ], 'web.assets_backend': [ - 'survey/static/src/question_page/*.js', + 'survey/static/src/question_page/*', 'survey/static/src/js/fields_section_one2many.js', 'survey/static/src/js/fields_form_page_description.js', 'survey/static/src/views/*.js', @@ -105,9 +108,6 @@ sent mails with personal token for the invitation of the survey. 'web.assets_common': [ 'survey/static/src/js/tours/survey_tour.js', ], - 'web.assets_qweb': [ - 'survey/static/src/question_page/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/survey/static/src/js/survey_breadcrumb.js b/addons/survey/static/src/js/survey_breadcrumb.js index 4cc3796f9cb..a04b678d3c4 100644 --- a/addons/survey/static/src/js/survey_breadcrumb.js +++ b/addons/survey/static/src/js/survey_breadcrumb.js @@ -4,7 +4,6 @@ odoo.define('survey.breadcrumb', function (require) { var publicWidget = require('web.public.widget'); publicWidget.registry.SurveyBreadcrumbWidget = publicWidget.Widget.extend({ - xmlDependencies: ['/survey/static/src/xml/survey_breadcrumb_templates.xml'], template: "survey.survey_breadcrumb_template", events: { 'click .breadcrumb-item a': '_onBreadcrumbClick', diff --git a/addons/survey/static/src/js/survey_image_zoomer.js b/addons/survey/static/src/js/survey_image_zoomer.js index 5a7b446a7ac..cd31005cea1 100644 --- a/addons/survey/static/src/js/survey_image_zoomer.js +++ b/addons/survey/static/src/js/survey_image_zoomer.js @@ -4,7 +4,6 @@ import publicWidget from 'web.public.widget'; export const SurveyImageZoomer = publicWidget.Widget.extend({ template: 'survey.survey_image_zoomer', - xmlDependencies: ['/survey/static/src/xml/survey_image_zoomer_templates.xml'], events: { 'wheel .o_survey_img_zoom_image': '_onImgScroll', 'click': '_onZoomerClick', diff --git a/addons/survey/static/src/js/survey_result.js b/addons/survey/static/src/js/survey_result.js index c05a138d790..83b41713ba5 100644 --- a/addons/survey/static/src/js/survey_result.js +++ b/addons/survey/static/src/js/survey_result.js @@ -2,7 +2,7 @@ odoo.define('survey.result', function (require) { 'use strict'; var _t = require('web.core')._t; -var ajax = require('web.ajax'); +const { loadJS } = require('@web/core/assets'); var publicWidget = require('web.public.widget'); // The given colors are the same as those used by D3 @@ -427,7 +427,7 @@ publicWidget.registry.SurveyResultWidget = publicWidget.Widget.extend({ */ willStart: function () { var url = '/web/webclient/locale/' + (document.documentElement.getAttribute('lang') || 'en_US').replace('-', '_'); - var localeReady = ajax.loadJS(url); + var localeReady = loadJS(url); return Promise.all([this._super.apply(this, arguments), localeReady]); }, diff --git a/addons/survey/static/src/js/survey_session_text_answers.js b/addons/survey/static/src/js/survey_session_text_answers.js index 4e669c17ea0..5649f9ae6a6 100644 --- a/addons/survey/static/src/js/survey_session_text_answers.js +++ b/addons/survey/static/src/js/survey_session_text_answers.js @@ -9,7 +9,6 @@ var SESSION_CHART_COLORS = require('survey.session_colors'); var QWeb = core.qweb; publicWidget.registry.SurveySessionTextAnswers = publicWidget.Widget.extend({ - xmlDependencies: ['/survey/static/src/xml/survey_session_text_answer_template.xml'], init: function (parent, options) { this._super.apply(this, arguments); diff --git a/addons/web/__manifest__.py b/addons/web/__manifest__.py index 9eaeafc82ea..4c59c64ff9e 100644 --- a/addons/web/__manifest__.py +++ b/addons/web/__manifest__.py @@ -38,21 +38,6 @@ This module provides the core of the Odoo Web Client. # Exemples: # > web.assets_common = assets common to both frontend and backend clients. # > web_editor.assets_wysiwyg = assets needed by components defined in the "web_editor" module. - - 'web.assets_qweb': [ - 'web/static/src/**/*.xml', - ('remove', 'web/static/src/legacy/**/*.xml'), - 'web/static/src/legacy/xml/base.xml', - 'web/static/src/legacy/xml/control_panel.xml', - 'web/static/src/legacy/xml/chart.xml', - 'web/static/src/legacy/xml/fields.xml', - 'web/static/src/legacy/xml/kanban.xml', - 'web/static/src/legacy/xml/pivot.xml', - 'web/static/src/legacy/xml/web_calendar.xml', - 'web/static/src/legacy/xml/graph.xml', - 'web/static/src/legacy/xml/search_panel.xml', - 'web/static/src/legacy/xml/week_days.xml', - ], 'web.assets_common_minimal': [ 'web/static/src/legacy/js/promise_extension.js', 'web/static/src/boot.js', @@ -94,15 +79,17 @@ This module provides the core of the Odoo Web Client. 'web/static/src/core/**/*', 'web/static/src/legacy/legacy_fields.scss', 'web/static/src/search/**/*', + 'web/static/src/webclient/icons.scss', # variables required in list_controller.scss + 'web/static/src/views/**/*', 'web/static/src/webclient/**/*', ('remove', 'web/static/src/webclient/navbar/navbar.scss'), # already in _assets_common_styles ('remove', 'web/static/src/webclient/clickbot/clickbot.js'), # lazy loaded - 'web/static/src/views/**/*', ('remove', 'web/static/src/views/form/button_box/*.scss'), # remove the report code and whitelist only what's needed ('remove', 'web/static/src/webclient/actions/reports/**/*'), 'web/static/src/webclient/actions/reports/*.js', + 'web/static/src/webclient/actions/reports/*.xml', 'web/static/src/env.js', @@ -195,6 +182,18 @@ This module provides the core of the Odoo Web Client. 'web/static/src/legacy/js/owl_compatibility.js', ("remove", 'web/static/src/legacy/js/views/graph/**/*'), ("remove", 'web/static/src/legacy/js/views/pivot/**/*'), + + 'web/static/src/legacy/xml/base.xml', + 'web/static/src/legacy/xml/ribbon.xml', + 'web/static/src/legacy/xml/control_panel.xml', + 'web/static/src/legacy/xml/chart.xml', + 'web/static/src/legacy/xml/fields.xml', + 'web/static/src/legacy/xml/kanban.xml', + 'web/static/src/legacy/xml/pivot.xml', + 'web/static/src/legacy/xml/web_calendar.xml', + 'web/static/src/legacy/xml/graph.xml', + 'web/static/src/legacy/xml/search_panel.xml', + 'web/static/src/legacy/xml/week_days.xml', ], "web.assets_backend_legacy_lazy": [ ("include", "web._assets_helpers"), @@ -204,6 +203,7 @@ This module provides the core of the Odoo Web Client. # graph 'web/static/src/legacy/js/views/graph/**/*', 'web/static/src/legacy/scss/graph_view.scss', + 'web/static/src/legacy/xml/graph.xml', # pivot 'web/static/src/legacy/js/views/pivot/**/*', 'web/static/src/legacy/scss/pivot_view.scss', @@ -427,6 +427,7 @@ This module provides the core of the Odoo Web Client. 'web/static/src/legacy/js/core/collections.js', 'web/static/src/legacy/js/core/concurrency.js', 'web/static/src/legacy/js/core/dialog.js', + 'web/static/src/legacy/xml/dialog.xml', 'web/static/src/legacy/js/core/owl_dialog.js', 'web/static/src/legacy/js/core/popover.js', 'web/static/src/legacy/js/core/dom.js', @@ -450,9 +451,12 @@ This module provides the core of the Odoo Web Client. 'web/static/src/legacy/js/services/session_storage_service.js', 'web/static/src/legacy/js/common_env.js', 'web/static/src/legacy/js/widgets/name_and_signature.js', + 'web/static/src/legacy/xml/name_and_signature.xml', 'web/static/src/legacy/js/core/smooth_scroll_on_drag.js', 'web/static/src/legacy/js/widgets/colorpicker.js', + 'web/static/src/legacy/xml/colorpicker.xml', 'web/static/src/legacy/js/widgets/translation_dialog.js', + 'web/static/src/legacy/xml/translation_dialog.xml', ], # Used during the transition of the web architecture @@ -491,14 +495,20 @@ This module provides the core of the Odoo Web Client. 'web/static/lib/fullcalendar/daygrid/main.js', 'web/static/lib/fullcalendar/timegrid/main.js', 'web/static/lib/fullcalendar/list/main.js', + 'web/static/lib/ace/ace.js', 'web/static/lib/ace/javascript_highlight_rules.js', 'web/static/lib/ace/mode-python.js', 'web/static/lib/ace/mode-xml.js', 'web/static/lib/ace/mode-js.js', + 'web/static/lib/ace/mode-qweb.js', 'web/static/lib/nearest/jquery.nearest.js', 'web/static/lib/daterangepicker/daterangepicker.js', + 'web/static/src/legacy/js/libs/daterangepicker.js', 'web/static/lib/stacktracejs/stacktrace.js', + 'web/static/lib/Chart/Chart.js', + + '/web/static/lib/daterangepicker/daterangepicker.js', # 'web/static/tests/legacy/main_tests.js', 'web/static/tests/helpers/**/*.js', diff --git a/addons/web/static/src/legacy/js/core/dialog.js b/addons/web/static/src/legacy/js/core/dialog.js index a95a1271ec4..2232225433a 100644 --- a/addons/web/static/src/legacy/js/core/dialog.js +++ b/addons/web/static/src/legacy/js/core/dialog.js @@ -19,7 +19,6 @@ var _t = core._t; **/ var Dialog = Widget.extend({ tagName: 'main', - xmlDependencies: ['/web/static/src/legacy/xml/dialog.xml'], custom_events: _.extend({}, Widget.prototype.custom_events, { focus_control_button: '_onFocusControlButton', close_dialog: '_onCloseDialog', @@ -116,7 +115,7 @@ var Dialog = Widget.extend({ var self = this; return this._super.apply(this, arguments).then(function () { // Render modal once xml dependencies are loaded - self.$modal = $(QWeb.render('Dialog', { + self.$modal = $(QWeb.render('web.DialogWidget', { fullscreen: self.fullscreen, title: self.title, subtitle: self.subtitle, diff --git a/addons/web/static/src/legacy/js/core/mvc.js b/addons/web/static/src/legacy/js/core/mvc.js index 23f2b44b274..e85e238206f 100644 --- a/addons/web/static/src/legacy/js/core/mvc.js +++ b/addons/web/static/src/legacy/js/core/mvc.js @@ -29,11 +29,11 @@ odoo.define('web.mvc', function (require) { * simple as possible. */ -var ajax = require('web.ajax'); var Class = require('web.Class'); var mixins = require('web.mixins'); var ServicesMixin = require('web.ServicesMixin'); var Widget = require('web.Widget'); +const { loadBundle } = require('@web/core/assets'); /** @@ -179,7 +179,7 @@ var Factory = Class.extend({ getController: function (parent) { var self = this; var model = this.getModel(parent); - return Promise.all([this._loadData(model), ajax.loadLibs(this)]).then(function (result) { + return Promise.all([this._loadData(model), loadBundle(this)]).then(function (result) { const { state, handle } = result[0]; var renderer = self.getRenderer(parent, state); var Controller = self.Controller || self.config.Controller; diff --git a/addons/web/static/src/legacy/js/core/profiling_qweb_view.js b/addons/web/static/src/legacy/js/core/profiling_qweb_view.js index ff443dff40d..487faf19946 100644 --- a/addons/web/static/src/legacy/js/core/profiling_qweb_view.js +++ b/addons/web/static/src/legacy/js/core/profiling_qweb_view.js @@ -13,7 +13,6 @@ const qweb = core.qweb; */ const ProfilingQwebView = basicFfields.AceEditor.extend({ template: "web.ProfilingQwebView", - xmlDependencies: ["/web/static/src/xml/debug.xml"], events: _.extend({}, basicFfields.AceEditor.prototype.events, { "click .dropdown-menu a": "_onSelectView", }), diff --git a/addons/web/static/src/legacy/js/core/session.js b/addons/web/static/src/legacy/js/core/session.js index 8edb1186aeb..e4b276215d8 100644 --- a/addons/web/static/src/legacy/js/core/session.js +++ b/addons/web/static/src/legacy/js/core/session.js @@ -6,6 +6,8 @@ var core = require('web.core'); var mixins = require('web.mixins'); var utils = require('web.utils'); const { session } = require('@web/session'); +const { loadJS } = require('@web/core/assets'); + var _t = core._t; var qweb = core.qweb; @@ -203,7 +205,7 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, { if (files.length !== 0) { var file = files.shift(); var url = self.url(file, null); - ajax.loadJS(url).then(resolve); + loadJS(url).then(resolve); } else { resolve(); } diff --git a/addons/web/static/src/legacy/js/public/public_root.js b/addons/web/static/src/legacy/js/public/public_root.js index 1ea86fdb070..a755bc81964 100644 --- a/addons/web/static/src/legacy/js/public/public_root.js +++ b/addons/web/static/src/legacy/js/public/public_root.js @@ -1,6 +1,5 @@ /** @odoo-module alias=web.public.root */ -import ajax from 'web.ajax'; import dom from 'web.dom'; import legacyEnv from 'web.public_env'; import session from 'web.session'; @@ -22,7 +21,7 @@ import { import { standaloneAdapter } from "web.OwlCompatibility"; import { makeEnv, startServices } from "@web/env"; -import { assets, templates } from '@web/core/assets'; +import { setLoadXmlDefaultApp, loadJS, templates } from '@web/core/assets'; import { MainComponentsContainer } from "@web/core/main_components_container"; import { browser } from '@web/core/browser/browser'; import { jsonrpc } from '@web/core/network/rpc_service'; @@ -40,7 +39,7 @@ function getLang() { } var lang = utils.get_cookie('frontend_lang') || getLang(); // FIXME the cookie value should maybe be in the ctx? // momentjs don't have config for en_US, so avoid useless RPC -var localeDef = lang !== 'en_US' ? ajax.loadJS('/web/webclient/locale/' + lang.replace('-', '_')) : Promise.resolve(); +var localeDef = lang !== 'en_US' ? loadJS('/web/webclient/locale/' + lang.replace('-', '_')) : Promise.resolve(); /** @@ -417,7 +416,7 @@ export async function createPublicRoot(RootWidget) { translateFn: _t, translatableAttributes: ["data-tooltip"], }); - assets.defaultApp = app; + setLoadXmlDefaultApp(app); await Promise.all([ app.mount(document.body), publicRoot.attachTo(document.body), diff --git a/addons/web/static/src/legacy/js/views/abstract_controller.js b/addons/web/static/src/legacy/js/views/abstract_controller.js index 75b4d967c16..81bd4c7d42c 100644 --- a/addons/web/static/src/legacy/js/views/abstract_controller.js +++ b/addons/web/static/src/legacy/js/views/abstract_controller.js @@ -12,7 +12,7 @@ */ import ActionMixin from 'web.ActionMixin'; -import ajax from 'web.ajax'; +import { loadCSS, loadJS } from "@web/core/assets"; import concurrency from 'web.concurrency'; import { ComponentWrapper } from 'web.OwlCompatibility'; import mvc from 'web.mvc'; @@ -355,11 +355,11 @@ var AbstractController = mvc.Controller.extend(ActionMixin, { // Css and js are moved to var defs = []; $('link[rel="stylesheet"]', $banner).each(function (i, link) { - defs.push(ajax.loadCSS(link.href)); + defs.push(loadCSS(link.href)); link.remove(); }); $('script[type="text/javascript"]', $banner).each(function (i, js) { - defs.push(ajax.loadJS(js.src)); + defs.push(loadJS(js.src)); js.remove(); }); await Promise.all(defs); diff --git a/addons/web/static/src/legacy/js/views/signature_dialog.js b/addons/web/static/src/legacy/js/views/signature_dialog.js index 6530a67d99f..6a77b5105c7 100644 --- a/addons/web/static/src/legacy/js/views/signature_dialog.js +++ b/addons/web/static/src/legacy/js/views/signature_dialog.js @@ -10,9 +10,6 @@ var _t = core._t; // It uses @see SignNameAndSignature for the name and signature fields. var SignatureDialog = Dialog.extend({ template: 'web.signature_dialog', - xmlDependencies: Dialog.prototype.xmlDependencies.concat( - ['/web/static/src/legacy/xml/name_and_signature.xml'] - ), custom_events: { 'signature_changed': '_onChangeSignature', }, diff --git a/addons/web/static/src/legacy/js/widgets/colorpicker.js b/addons/web/static/src/legacy/js/widgets/colorpicker.js index d0745f2a454..2200e55aac4 100644 --- a/addons/web/static/src/legacy/js/widgets/colorpicker.js +++ b/addons/web/static/src/legacy/js/widgets/colorpicker.js @@ -9,7 +9,6 @@ var Widget = require('web.Widget'); var _t = core._t; var ColorpickerWidget = Widget.extend({ - xmlDependencies: ['/web/static/src/legacy/xml/colorpicker.xml'], template: 'Colorpicker', events: { 'click': '_onClick', diff --git a/addons/web/static/src/legacy/js/widgets/name_and_signature.js b/addons/web/static/src/legacy/js/widgets/name_and_signature.js index ac773b66e57..8b8543bf460 100644 --- a/addons/web/static/src/legacy/js/widgets/name_and_signature.js +++ b/addons/web/static/src/legacy/js/widgets/name_and_signature.js @@ -14,7 +14,6 @@ var Widget = require('web.Widget'); */ var NameAndSignature = Widget.extend({ template: 'web.sign_name_and_signature', - xmlDependencies: ['/web/static/src/legacy/xml/name_and_signature.xml'], events: { // name 'input .o_web_sign_name_input': '_onInputSignName', diff --git a/addons/web/static/src/legacy/js/widgets/pie_chart.js b/addons/web/static/src/legacy/js/widgets/pie_chart.js index d1847ca6cdd..3183ce77ca3 100644 --- a/addons/web/static/src/legacy/js/widgets/pie_chart.js +++ b/addons/web/static/src/legacy/js/widgets/pie_chart.js @@ -16,7 +16,6 @@ var qweb = core.qweb; var PieChart = Widget.extend({ className: 'o_pie_chart', - xmlDependencies: ['/web/static/src/legacy/xml/chart.xml'], /** * @override @@ -70,7 +69,7 @@ var PieChart = Widget.extend({ willStart: async function () { var self = this; const _super = this._super.bind(this, ...arguments); - await loadLegacyViews({ rpc: this._rpc.bind(this) }); + await loadLegacyViews(); var def1 = _super(); var SubView = viewRegistry.get('graph'); diff --git a/addons/web/static/src/legacy/js/widgets/ribbon.js b/addons/web/static/src/legacy/js/widgets/ribbon.js index c0d8b3452b9..1c616a84ac6 100644 --- a/addons/web/static/src/legacy/js/widgets/ribbon.js +++ b/addons/web/static/src/legacy/js/widgets/ribbon.js @@ -20,7 +20,6 @@ odoo.define('web.ribbon', function (require) { var RibbonWidget = Widget.extend({ template: 'web.ribbon', - xmlDependencies: ['/web/static/src/legacy/xml/ribbon.xml'], /** * @param {Object} options diff --git a/addons/web/static/src/legacy/js/widgets/translation_dialog.js b/addons/web/static/src/legacy/js/widgets/translation_dialog.js index 899b5d7079a..4e145bff33e 100644 --- a/addons/web/static/src/legacy/js/widgets/translation_dialog.js +++ b/addons/web/static/src/legacy/js/widgets/translation_dialog.js @@ -8,9 +8,7 @@ odoo.define('web.TranslationDialog', function (require) { var _t = core._t; var TranslationDialog = Dialog.extend({ - xmlDependencies: (Dialog.prototype.xmlDependencies || []) - .concat(['/web/static/src/legacy/xml/translation_dialog.xml']), - template: 'TranslationDialog', + template: 'web.TranslationDialogWidget', /** * @constructor diff --git a/addons/web/static/src/legacy/xml/dialog.xml b/addons/web/static/src/legacy/xml/dialog.xml index d79ec05ca9e..0b615dbcf24 100644 --- a/addons/web/static/src/legacy/xml/dialog.xml +++ b/addons/web/static/src/legacy/xml/dialog.xml @@ -3,7 +3,7 @@ - +
-
+
diff --git a/addons/web/static/src/start.js b/addons/web/static/src/start.js index 88f4de7d443..59201815592 100644 --- a/addons/web/static/src/start.js +++ b/addons/web/static/src/start.js @@ -6,7 +6,7 @@ import { mapLegacyEnvToWowlEnv } from "./legacy/utils"; import { localization } from "@web/core/l10n/localization"; import { session } from "@web/session"; import { renderToString } from "./core/utils/render"; -import { assets, templates } from "@web/core/assets"; +import { setLoadXmlDefaultApp, templates } from "@web/core/assets"; const { App, whenReady } = owl; @@ -43,7 +43,7 @@ export async function startWebClient(Webclient) { translateFn: env._t, }); renderToString.app = app; - assets.defaultApp = app; + setLoadXmlDefaultApp(app); const root = await app.mount(document.body); const classList = document.body.classList; if (localization.direction === "rtl") { diff --git a/addons/web/static/src/views/fields/journal_dashboard_graph/journal_dashboard_graph_field.js b/addons/web/static/src/views/fields/journal_dashboard_graph/journal_dashboard_graph_field.js index 2bc13322efe..711fdaf743a 100644 --- a/addons/web/static/src/views/fields/journal_dashboard_graph/journal_dashboard_graph_field.js +++ b/addons/web/static/src/views/fields/journal_dashboard_graph/journal_dashboard_graph_field.js @@ -12,7 +12,7 @@ export class JournalDashboardGraphField extends Component { this.canvasRef = useRef("canvas"); this.data = JSON.parse(this.props.value); - onWillStart(() => loadJS(["/web/static/lib/Chart/Chart.js"])); + onWillStart(() => loadJS("/web/static/lib/Chart/Chart.js")); useEffect(() => { this.renderChart(); diff --git a/addons/web/static/src/views/graph/graph_renderer.js b/addons/web/static/src/views/graph/graph_renderer.js index 01d596396d9..6b26d84b887 100644 --- a/addons/web/static/src/views/graph/graph_renderer.js +++ b/addons/web/static/src/views/graph/graph_renderer.js @@ -50,7 +50,7 @@ export class GraphRenderer extends Component { this.tooltip = null; this.legendTooltip = null; - onWillStart(() => loadJS(["/web/static/lib/Chart/Chart.js"])); + onWillStart(() => loadJS("/web/static/lib/Chart/Chart.js")); useEffect(() => this.renderChart()); onWillUnmount(this.onWillUnmount); diff --git a/addons/web/static/tests/legacy/fields/basic_fields_tests.js b/addons/web/static/tests/legacy/fields/basic_fields_tests.js index 3fd0d843acc..17b41385726 100644 --- a/addons/web/static/tests/legacy/fields/basic_fields_tests.js +++ b/addons/web/static/tests/legacy/fields/basic_fields_tests.js @@ -1,7 +1,6 @@ odoo.define('web.basic_fields_tests', function (require) { "use strict"; -var ajax = require('web.ajax'); var basicFields = require('web.basic_fields'); var concurrency = require('web.concurrency'); var config = require('web.config'); @@ -9071,12 +9070,6 @@ QUnit.module('Legacy basic_fields', { form.destroy(); }); - QUnit.module('FieldColor', { - before: function () { - return ajax.loadXML('/web/static/src/legacy/xml/colorpicker.xml', core.qweb); - }, - }); - QUnit.test('Field Color: default widget state', async function (assert) { assert.expect(4); diff --git a/addons/web/static/tests/legacy/fields/signature_tests.js b/addons/web/static/tests/legacy/fields/signature_tests.js index ad4375c475b..c2c1e23ec6c 100644 --- a/addons/web/static/tests/legacy/fields/signature_tests.js +++ b/addons/web/static/tests/legacy/fields/signature_tests.js @@ -1,8 +1,6 @@ odoo.define('web.signature_field_tests', function (require) { "use strict"; -var ajax = require('web.ajax'); -var core = require('web.core'); var FormView = require('web.FormView'); var testUtils = require('web.test_utils'); @@ -38,13 +36,6 @@ QUnit.module('signature', { }; } }, function () { - - QUnit.module('Signature Field', { - before: function () { - return ajax.loadXML('/web/static/src/legacy/xml/name_and_signature.xml', core.qweb); - }, - }); - QUnit.test('Set simple field in "full_name" node option', async function (assert) { assert.expect(3); diff --git a/addons/web/static/tests/legacy/helpers/test_env.js b/addons/web/static/tests/legacy/helpers/test_env.js index ac6bded5b7b..cededce739e 100644 --- a/addons/web/static/tests/legacy/helpers/test_env.js +++ b/addons/web/static/tests/legacy/helpers/test_env.js @@ -4,7 +4,7 @@ odoo.define('web.test_env', async function (require) { const Bus = require('web.Bus'); const session = require('web.session'); const { makeTestEnvServices } = require('@web/../tests/legacy/helpers/test_services'); - const { templates } = require("@web/core/assets"); + const { templates, setLoadXmlDefaultApp } = require("@web/core/assets"); const { renderToString } = require('@web/core/utils/render'); const { App, Component } = owl; @@ -23,6 +23,7 @@ odoo.define('web.test_env', async function (require) { if (!app) { app = new App(null, { templates, test: true }); renderToString.app = app; + setLoadXmlDefaultApp(app); } const defaultTranslationParamters = { diff --git a/addons/web/static/tests/legacy/helpers/test_utils.js b/addons/web/static/tests/legacy/helpers/test_utils.js index cd021609026..7a3e9ac9161 100644 --- a/addons/web/static/tests/legacy/helpers/test_utils.js +++ b/addons/web/static/tests/legacy/helpers/test_utils.js @@ -10,8 +10,6 @@ odoo.define('web.test_utils', async function (require) { * instance of a view, appended in the dom, ready to be tested. */ - const ajax = require('web.ajax'); - const core = require('web.core'); const relationalFields = require('web.relational_fields'); const session = require('web.session'); const testUtilsCreate = require('web.test_utils_create'); @@ -121,12 +119,9 @@ odoo.define('web.test_utils', async function (require) { // before starting the qunit test suite. // (session.js is in charge of loading the static xml bundle and we also have // to load xml files that are normally lazy loaded by specific widgets). - await Promise.all([ - session.is_bound, - ajax.loadXML('/web/static/src/legacy/frontend/debug_manager/debug.xml', core.qweb), - ajax.loadXML('/web/static/src/legacy/xml/dialog.xml', core.qweb), - ajax.loadXML('/web/static/src/legacy/xml/translation_dialog.xml', core.qweb), - ]); + // Assets can also contain static xml files. They are loaded when the session + // is launched. + await session.is_bound; setTimeout(function () { // jquery autocomplete refines the search in a setTimeout() parameterized // with a delay, so we force this delay to 0 s.t. the dropdown is filtered diff --git a/addons/web/static/tests/legacy/views/abstract_view_tests.js b/addons/web/static/tests/legacy/views/abstract_view_tests.js index 37427e7a0b0..a5ec9923362 100644 --- a/addons/web/static/tests/legacy/views/abstract_view_tests.js +++ b/addons/web/static/tests/legacy/views/abstract_view_tests.js @@ -1,15 +1,11 @@ odoo.define('web.abstract_view_tests', function (require) { "use strict"; -var AbstractView = require('web.AbstractView'); -var ajax = require('web.ajax'); -var testUtils = require('web.test_utils'); const { registry } = require('@web/core/registry'); const legacyViewRegistry = require('web.view_registry'); var ListView = require('web.ListView'); const { createWebClient, doAction } = require('@web/../tests/webclient/helpers'); -var createView = testUtils.createView; QUnit.module('LegacyViews', { beforeEach: function () { @@ -34,91 +30,6 @@ QUnit.module('LegacyViews', { QUnit.module('AbstractView'); - QUnit.test('lazy loading of js libs (in parallel)', async function (assert) { - var done = assert.async(); - assert.expect(6); - - var prom = testUtils.makeTestPromise(); - var loadJS = ajax.loadJS; - const libraryLoadingStartedPromise = testUtils.makeTestPromise(); - - var View = AbstractView.extend({ - jsLibs: [['a', 'b']], - }); - createView({ - View: View, - arch: '', - data: this.data, - model: 'fake_model', - mockFetch: function (url) { - libraryLoadingStartedPromise.resolve(); - assert.step(url); - return prom.then(function () { - assert.step(url + ' loaded'); - return true; - }); - }, - }).then(function (view) { - assert.verifySteps(['a loaded', 'b loaded'], - "should wait for both libs to be loaded"); - ajax.loadJS = loadJS; - view.destroy(); - done(); - }); - - await libraryLoadingStartedPromise; - assert.verifySteps(['a', 'b'], "both libs should be loaded in parallel"); - prom.resolve(); - }); - - QUnit.test('lazy loading of js libs (sequentially)', async function (assert) { - var done = assert.async(); - assert.expect(10); - - var proms = { - a: testUtils.makeTestPromise(), - b: testUtils.makeTestPromise(), - c: testUtils.makeTestPromise(), - }; - var loadJS = ajax.loadJS; - const libraryLoadingStartedPromise = testUtils.makeTestPromise(); - - var View = AbstractView.extend({ - jsLibs: [ - ['a', 'b'], - 'c', - ], - }); - createView({ - View: View, - arch: '', - data: this.data, - model: 'fake_model', - mockFetch: function (url) { - libraryLoadingStartedPromise.resolve(); - assert.step(url); - return proms[url].then(function () { - assert.step(url + ' loaded'); - return true; - }); - }, - }).then(function (view) { - assert.verifySteps(['c loaded'], "should wait for all libs to be loaded"); - ajax.loadJS = loadJS; - view.destroy(); - done(); - }); - await libraryLoadingStartedPromise; - assert.verifySteps(['a', 'b'], "libs 'a' and 'b' should be loaded in parallel"); - await proms.b.resolve(); - await testUtils.nextTick(); - assert.verifySteps(['b loaded'], "should wait for 'a' and 'b' to be loaded before loading 'c'"); - await proms.a.resolve(); - await testUtils.nextTick(); - assert.verifySteps(['a loaded', 'c'], "should load 'c' when 'a' and 'b' are loaded"); - await proms.c.resolve(); - }); - QUnit.test('group_by from context can be a string, instead of a list of strings', async function (assert) { assert.expect(1); diff --git a/addons/web_editor/__manifest__.py b/addons/web_editor/__manifest__.py index ca60cd7d040..84790d04101 100644 --- a/addons/web_editor/__manifest__.py +++ b/addons/web_editor/__manifest__.py @@ -22,12 +22,6 @@ Odoo Web Editor widget. # MAIN BUNDLES #---------------------------------------------------------------------- - 'web.assets_qweb': [ - ('include', 'web_editor.assets_media_dialog_templates'), - 'web_editor/static/src/xml/*.xml', - 'web_editor/static/src/components/**/*.xml', - 'web_editor/static/src/js/backend/**/*', - ], 'web_editor.assets_wysiwyg': [ # lib 'web_editor/static/lib/cropperjs/cropper.css', @@ -87,18 +81,14 @@ Odoo Web Editor widget. # Launcher 'web_editor/static/src/js/wysiwyg/wysiwyg.js', 'web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js', - ], - # TODO: Move those dialog assets in assets_common and make the public - # root fetch templates from the common assets - 'web_editor.assets_media_dialog_templates': [ - 'web_editor/static/src/components/media_dialog/*.xml', - 'web_editor/static/src/components/upload_progress_toast/*.xml', + + 'web_editor/static/src/xml/editor.xml', + 'web_editor/static/src/xml/snippets.xml', + 'web_editor/static/src/xml/wysiwyg.xml', + 'web_editor/static/src/xml/wysiwyg_colorpicker.xml', ], 'web_editor.assets_media_dialog': [ - 'web_editor/static/src/components/media_dialog/*.js', - 'web_editor/static/src/components/media_dialog/*.scss', - 'web_editor/static/src/components/upload_progress_toast/*.js', - 'web_editor/static/src/components/upload_progress_toast/*.scss', + 'web_editor/static/src/components/**/*', ], 'web_editor.assets_tests_styles': [ 'web_editor/static/src/js/editor/odoo-editor/src/base_style.scss', @@ -110,6 +100,7 @@ Odoo Web Editor widget. 'web_editor/static/src/js/common/**/*', 'web_editor/static/src/js/editor/odoo-editor/src/utils/utils.js', 'web_editor/static/src/js/wysiwyg/fonts.js', + 'web_editor/static/src/xml/ace.xml', ], 'web.assets_backend': [ ('include', 'web_editor.assets_media_dialog'), @@ -120,12 +111,12 @@ Odoo Web Editor widget. 'web_editor/static/src/js/wysiwyg/dialog.js', 'web_editor/static/src/js/frontend/loader.js', 'web_editor/static/src/js/backend/**/*', + 'web_editor/static/src/xml/backend.xml', ], 'web.assets_frontend_minimal': [ 'web_editor/static/src/js/frontend/loader_loading.js', ], 'web.assets_frontend': [ - ('include', 'web_editor.assets_media_dialog_templates'), ('include', 'web_editor.assets_media_dialog'), 'web_editor/static/src/scss/web_editor.common.scss', diff --git a/addons/web_editor/static/src/js/common/ace.js b/addons/web_editor/static/src/js/common/ace.js index 313d2d6026c..2322520e77a 100644 --- a/addons/web_editor/static/src/js/common/ace.js +++ b/addons/web_editor/static/src/js/common/ace.js @@ -143,7 +143,6 @@ function formatSCSS(scss) { */ var ViewEditor = Widget.extend({ template: 'web_editor.ace_view_editor', - xmlDependencies: ['/web_editor/static/src/xml/ace.xml'], jsLibs: [ '/web/static/lib/ace/ace.js', [ diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js index 4b1f5320ad3..97aa04f1424 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -130,7 +130,6 @@ var globalSelector = { */ var SnippetEditor = Widget.extend({ template: 'web_editor.snippet_overlay', - xmlDependencies: ['/web_editor/static/src/xml/snippets.xml'], events: { 'click .oe_snippet_remove': '_onRemoveClick', 'wheel': '_onMouseWheel', diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index 37b7dafb895..548b7fbc14e 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -6978,8 +6978,6 @@ registry.BackgroundShape = SnippetOptionWidget.extend({ * Handles the edition of snippets' background image position. */ registry.BackgroundPosition = SnippetOptionWidget.extend({ - xmlDependencies: ['/web_editor/static/src/xml/editor.xml'], - /** * @override */ @@ -7490,8 +7488,6 @@ registry.many2one = SnippetOptionWidget.extend({ * Allows to display a warning message on outdated snippets. */ registry.VersionControl = SnippetOptionWidget.extend({ - xmlDependencies: ['/web_editor/static/src/xml/snippets.xml'], - /** * @override */ @@ -7513,7 +7509,6 @@ registry.VersionControl = SnippetOptionWidget.extend({ * Handle the save of a snippet as a template that can be reused later */ registry.SnippetSave = SnippetOptionWidget.extend({ - xmlDependencies: ['/web_editor/static/src/xml/editor.xml'], isTopOption: true, //-------------------------------------------------------------------------- diff --git a/addons/web_editor/static/src/js/editor/toolbar.js b/addons/web_editor/static/src/js/editor/toolbar.js index 8c72783cbbf..11ccc9c1743 100644 --- a/addons/web_editor/static/src/js/editor/toolbar.js +++ b/addons/web_editor/static/src/js/editor/toolbar.js @@ -4,8 +4,6 @@ odoo.define('web_editor.toolbar', function (require) { var Widget = require('web.Widget'); const Toolbar = Widget.extend({ - xmlDependencies: ['/web_editor/static/src/xml/editor.xml'], - /** * @constructor * @param {Widget} parent diff --git a/addons/web_editor/static/src/js/frontend/loader.js b/addons/web_editor/static/src/js/frontend/loader.js index 74c41c3c3c4..fbe6e2dfca7 100644 --- a/addons/web_editor/static/src/js/frontend/loader.js +++ b/addons/web_editor/static/src/js/frontend/loader.js @@ -1,14 +1,16 @@ odoo.define('web_editor.loader', function (require) { 'use strict'; -var ajax = require('web.ajax'); - -let wysiwygPromises = {}; +const { getBundle, loadBundle } = require('@web/core/assets'); const exports = {}; -function loadWysiwyg(additionnalAssets=[]) { - return ajax.loadLibs({assetLibs: ['web_editor.compiled_assets_wysiwyg', ...additionnalAssets]}, undefined, '/web_editor/public_render_template'); +async function loadWysiwyg(additionnalAssets=[]) { + const xmlids = ['web_editor.assets_wysiwyg', ...additionnalAssets]; + for (const xmlid of xmlids) { + const assets = await getBundle(xmlid); + await loadBundle(assets); + } } exports.loadWysiwyg = loadWysiwyg; @@ -27,25 +29,10 @@ exports.createWysiwyg = async (parent, options = {}) => { }; async function getWysiwygClass({moduleName = 'web_editor.wysiwyg', additionnalAssets = []} = {}) { - if (!wysiwygPromises[moduleName]) { - wysiwygPromises[moduleName] = new Promise(async (resolve) => { - if (odoo.__DEBUG__.services[moduleName]) { - return resolve(); - } - await loadWysiwyg(additionnalAssets); - // Wait the loading of the service and his dependencies (use string to - // avoid parsing of require function). - const stringFunction = `return new Promise(resolve => { - odoo.define('${moduleName}.loaded', require => { - ` + 'require' + `('${moduleName}'); - resolve(); - }); - });`; - await new Function(stringFunction)(); - resolve(); - }); + if (!(await odoo.ready(moduleName))) { + await loadWysiwyg(additionnalAssets); + await odoo.ready(moduleName); } - await wysiwygPromises[moduleName]; return odoo.__DEBUG__.services[moduleName]; } exports.getWysiwygClass = getWysiwygClass; diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/alt_dialog.js b/addons/web_editor/static/src/js/wysiwyg/widgets/alt_dialog.js index 3668636c33a..21b1119df46 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/alt_dialog.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/alt_dialog.js @@ -11,10 +11,6 @@ var _t = core._t; */ var AltDialog = Dialog.extend({ template: 'wysiwyg.widgets.alt', - xmlDependencies: Dialog.prototype.xmlDependencies.concat( - ['/web_editor/static/src/xml/wysiwyg.xml'] - ), - /** * @constructor */ diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/color_palette.js b/addons/web_editor/static/src/js/wysiwyg/widgets/color_palette.js index a18ec70afda..bd56abf1e40 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/color_palette.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/color_palette.js @@ -1,20 +1,15 @@ odoo.define('web_editor.ColorPalette', function (require) { 'use strict'; -const ajax = require('web.ajax'); -const core = require('web.core'); const session = require('web.session'); const {ColorpickerWidget} = require('web.Colorpicker'); const Widget = require('web.Widget'); const customColors = require('web_editor.custom_colors'); const weUtils = require('web_editor.utils'); -const qweb = core.qweb; - let colorpickerArch; const ColorPaletteWidget = Widget.extend({ - // ! for xmlDependencies, see loadDependencies function template: 'web_editor.snippet.option.colorpicker', events: { 'click .o_we_color_btn': '_onColorButtonClick', @@ -1008,8 +1003,6 @@ const ColorPaletteWidget = Widget.extend({ */ let colorpickerTemplateProm; ColorPaletteWidget.loadDependencies = async function (rpcCapableObj) { - const proms = [ajax.loadXML('/web_editor/static/src/xml/snippets.xml', qweb)]; - // Public user using the editor may have a colorpalette but with // the default wysiwyg ones. if (!session.is_website_user) { @@ -1021,10 +1014,8 @@ ColorPaletteWidget.loadDependencies = async function (rpcCapableObj) { args: ['web_editor.colorpicker', {}], }).then(arch => colorpickerArch = arch); } - proms.push(colorpickerTemplateProm); + return colorpickerTemplateProm; } - - return Promise.all(proms); }; return { diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/image_crop_widget.js b/addons/web_editor/static/src/js/wysiwyg/widgets/image_crop_widget.js index f8205b47f3b..cbb418c5dd1 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/image_crop_widget.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/image_crop_widget.js @@ -9,7 +9,6 @@ const _t = core._t; const ImageCropWidget = Widget.extend({ template: ['wysiwyg.widgets.crop'], - xmlDependencies: ['/web_editor/static/src/xml/wysiwyg.xml'], events: { 'click.crop_options [data-action]': '_onCropOptionClick', // zoom event is triggered by the cropperjs library when the user zooms. diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/link.js b/addons/web_editor/static/src/js/wysiwyg/widgets/link.js index e5bd1109470..205ed485ce4 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/link.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/link.js @@ -14,7 +14,6 @@ const _t = core._t; * Allows to customize link content and style. */ const Link = Widget.extend({ - xmlDependencies: ['/web_editor/static/src/xml/wysiwyg.xml'], events: { 'input': '_onAnyChange', 'change': '_onAnyChange', diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js b/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js index 268705a5f88..ce402e754ab 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js @@ -7,7 +7,6 @@ import { ancestors } from '@web_editor/js/common/wysiwyg_utils'; const LinkPopoverWidget = Widget.extend({ template: 'wysiwyg.widgets.link.edit.tooltip', - xmlDependencies: ['/web_editor/static/src/xml/wysiwyg.xml'], events: { 'click .o_we_remove_link': '_onRemoveLinkClick', 'click .o_we_edit_link': '_onEditLinkClick', diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index 739be6e54b4..b3feab5dd75 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -64,8 +64,6 @@ const PTP_CLIENT_DISCONNECTED_STATES = [ ]; const Wysiwyg = Widget.extend({ - xmlDependencies: [ - ], defaultOptions: { lang: 'odoo', colors: customColors, diff --git a/addons/web_unsplash/__manifest__.py b/addons/web_unsplash/__manifest__.py index 034dc2dbb23..e593cea6a4d 100644 --- a/addons/web_unsplash/__manifest__.py +++ b/addons/web_unsplash/__manifest__.py @@ -15,11 +15,9 @@ 'web.assets_frontend': [ 'web_unsplash/static/src/js/unsplash_beacon.js', ], - 'web_editor.assets_media_dialog_templates': [ - 'web_unsplash/static/src/components/media_dialog/*.xml', - ], 'web_editor.assets_media_dialog': [ 'web_unsplash/static/src/components/media_dialog/*.js', + 'web_unsplash/static/src/components/media_dialog/*.xml', 'web_unsplash/static/src/services/unsplash_service.js', ], }, diff --git a/addons/website/__manifest__.py b/addons/website/__manifest__.py index e232a5d55e1..da59d30723c 100644 --- a/addons/website/__manifest__.py +++ b/addons/website/__manifest__.py @@ -31,7 +31,6 @@ 'data/website_data.xml', 'data/website_visitor_cron.xml', 'data/digest_data.xml', - 'views/assets.xml', 'views/website_templates.xml', 'views/snippets/snippets.xml', 'views/snippets/s_title.xml', @@ -129,6 +128,9 @@ 'website/static/src/js/post_link.js', 'website/static/src/js/plausible.js', 'website/static/src/js/user_custom_javascript.js', + 'website/static/src/xml/website.xml', + 'website/static/src/xml/website.background.video.xml', + 'website/static/src/xml/website.share.xml', ], 'web.assets_frontend_minimal': [ 'website/static/src/js/content/inject_dom.js', @@ -160,19 +162,18 @@ 'website/static/src/scss/color_palettes.scss', 'website/static/src/scss/view_hierarchy.scss', 'website/static/src/scss/website.backend.scss', + 'website/static/src/xml/website.backend.xml', 'website/static/src/scss/website_visitor_views.scss', 'website/static/src/scss/website.theme_install.scss', 'website/static/src/js/backend/**/*', - 'website/static/src/client_actions/*/*.js', + 'website/static/src/client_actions/*/*', ('remove', 'website/static/src/client_actions/website_preview/website_preview_test_mode.js'), - 'website/static/src/client_actions/*/*.scss', - 'website/static/src/components/fields/*.js', - 'website/static/src/components/fields/*.scss', + 'website/static/src/components/fields/*', 'website/static/src/components/fullscreen_indication/fullscreen_indication.js', 'website/static/src/components/fullscreen_indication/fullscreen_indication.scss', 'website/static/src/components/website_loader/website_loader.js', 'website/static/src/components/website_loader/website_loader.scss', - 'website/static/src/components/views/*.js', + 'website/static/src/components/views/*', 'website/static/src/services/website_service.js', 'website/static/src/js/utils.js', ], @@ -202,7 +203,10 @@ 'website/static/src/js/editor/snippets.options.js', 'website/static/src/snippets/s_facebook_page/options.js', 'website/static/src/snippets/s_image_gallery/options.js', + 'website/static/src/snippets/s_image_gallery/000.xml', 'website/static/src/snippets/s_countdown/options.js', + 'website/static/src/snippets/s_countdown/000.xml', + 'website/static/src/snippets/s_countdown/options.xml', 'website/static/src/snippets/s_masonry_block/options.js', 'website/static/src/snippets/s_popup/options.js', 'website/static/src/snippets/s_product_catalog/options.js', @@ -218,15 +222,22 @@ 'website/static/src/snippets/s_google_map/options.js', 'website/static/src/snippets/s_map/options.js', 'website/static/src/snippets/s_dynamic_snippet/options.js', + 'website/static/src/snippets/s_dynamic_snippet/000.xml', 'website/static/src/snippets/s_dynamic_snippet_carousel/options.js', + 'website/static/src/snippets/s_dynamic_snippet_carousel/000.xml', 'website/static/src/snippets/s_embed_code/options.js', 'website/static/src/snippets/s_website_form/options.js', + 'website/static/src/xml/website_form.xml', + 'website/static/src/xml/website.editor.xml', + 'website/static/src/xml/website_form_editor.xml', 'website/static/src/snippets/s_searchbar/options.js', + 'website/static/src/snippets/s_searchbar/000.xml', 'website/static/src/snippets/s_social_media/options.js', 'website/static/src/snippets/s_process_steps/options.js', 'website/static/src/js/editor/wysiwyg.js', 'website/static/src/js/editor/widget_link.js', 'website/static/src/js/widgets/link_popover_widget.js', + 'website/static/src/xml/website.cookies_bar.xml', ], 'web_editor.assets_media_dialog': [ 'website/static/src/components/media_dialog/image_selector.js', @@ -239,8 +250,10 @@ 'website/static/src/components/ace_editor/ace_editor.scss', 'website/static/src/components/dialog/*.js', 'website/static/src/components/dialog/*.scss', + 'website/static/src/components/dialog/*.xml', 'website/static/src/components/editor/editor.js', 'website/static/src/components/editor/editor.scss', + 'website/static/src/components/editor/editor.xml', 'website/static/src/components/navbar/navbar.js', 'website/static/src/components/burger_menu/burger_menu.js', 'website/static/src/components/switch/switch.js', @@ -249,23 +262,15 @@ 'website/static/src/components/wysiwyg_adapter/page_options.js', 'website/static/src/components/translator/translator.js', 'website/static/src/components/translator/translator.scss', + 'website/static/src/components/translator/translator.xml', 'website/static/src/js/form_editor_registry.js', 'website/static/src/js/new_content_form.js', 'website/static/src/services/website_custom_menus.js', 'website/static/src/js/tours/homepage.js', - 'website/static/src/systray_items/*.js', - 'website/static/src/systray_items/*.scss', - ], - 'web.assets_qweb': [ + 'website/static/src/systray_items/*', + 'web_editor/static/src/xml/editor.xml', 'website/static/src/client_actions/*/*.xml', - 'website/static/src/components/dialog/*.xml', - 'website/static/src/components/editor/editor.xml', - 'website/static/src/components/fields/*.xml', - 'website/static/src/components/translator/*.xml', 'website/static/src/components/website_loader/*.xml', - 'website/static/src/components/views/*.xml', - 'website/static/src/systray_items/*.xml', - 'website/static/src/xml/website.backend.xml', 'website/static/src/js/backend/**/*', ], 'website.test_bundle': [ diff --git a/addons/website/static/src/js/backend/dashboard.js b/addons/website/static/src/js/backend/dashboard.js index b9b51aad3f1..dbe831c9db7 100644 --- a/addons/website/static/src/js/backend/dashboard.js +++ b/addons/website/static/src/js/backend/dashboard.js @@ -2,7 +2,7 @@ odoo.define('website.backend.dashboard', function (require) { 'use strict'; var AbstractAction = require('web.AbstractAction'); -var ajax = require('web.ajax'); +const { loadBundle } = require("@web/core/assets"); var core = require('web.core'); var field_utils = require('web.field_utils'); var pyUtils = require('web.py_utils'); @@ -53,7 +53,7 @@ var Dashboard = AbstractAction.extend({ willStart: function() { var self = this; - return Promise.all([ajax.loadLibs(this), this._super()]).then(function() { + return Promise.all([loadBundle(this), this._super()]).then(function() { return self.fetch_data(); }).then(function(){ var website = _.findWhere(self.websites, {selected: true}); diff --git a/addons/website/static/src/js/content/snippets.animation.js b/addons/website/static/src/js/content/snippets.animation.js index 9da6095e413..f45fe4445f2 100644 --- a/addons/website/static/src/js/content/snippets.animation.js +++ b/addons/website/static/src/js/content/snippets.animation.js @@ -5,7 +5,7 @@ odoo.define('website.content.snippets.animation', function (require) { * Provides a way to start JS code for snippets' initialization and animations. */ -const ajax = require('web.ajax'); +const { loadJS } = require('@web/core/assets'); var Class = require('web.Class'); var config = require('web.config'); var core = require('web.core'); @@ -624,7 +624,7 @@ const MobileYoutubeAutoplayMixin = { return resolve(); }; }); - ajax.loadJS('https://www.youtube.com/iframe_api'); + loadJS('https://www.youtube.com/iframe_api'); } return promise; @@ -725,7 +725,6 @@ registry.mediaVideo = publicWidget.Widget.extend(MobileYoutubeAutoplayMixin, { registry.backgroundVideo = publicWidget.Widget.extend(MobileYoutubeAutoplayMixin, { selector: '.o_background_video', - xmlDependencies: ['/website/static/src/xml/website.background.video.xml'], disabledInEditableMode: false, /** @@ -849,7 +848,6 @@ registry.backgroundVideo = publicWidget.Widget.extend(MobileYoutubeAutoplayMixin registry.socialShare = publicWidget.Widget.extend({ selector: '.oe_social_share', - xmlDependencies: ['/website/static/src/xml/website.share.xml'], events: { 'mouseenter': '_onMouseEnter', }, diff --git a/addons/website/static/src/js/content/website_root.js b/addons/website/static/src/js/content/website_root.js index 9f8fc815788..2190d838e34 100644 --- a/addons/website/static/src/js/content/website_root.js +++ b/addons/website/static/src/js/content/website_root.js @@ -1,6 +1,6 @@ /** @odoo-module alias=website.root */ -import ajax from 'web.ajax'; +import { loadJS } from "@web/core/assets"; import { _t } from 'web.core'; import KeyboardNavigationMixin from 'web.KeyboardNavigationMixin'; import {Markup} from 'web.utils'; @@ -141,7 +141,7 @@ export const WebsiteRoot = publicRootData.PublicRoot.extend(KeyboardNavigationMi this._gmapAPILoading = false; return; } - await ajax.loadJS(`https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&callback=odoo_gmap_api_post_load&key=${key}`); + await loadJS(`https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&callback=odoo_gmap_api_post_load&key=${key}`); }); } return this._gmapAPILoading; diff --git a/addons/website/static/src/js/editor/snippets.editor.js b/addons/website/static/src/js/editor/snippets.editor.js index 98f9b10c1c2..8b1d907bec9 100644 --- a/addons/website/static/src/js/editor/snippets.editor.js +++ b/addons/website/static/src/js/editor/snippets.editor.js @@ -12,8 +12,6 @@ const getTraversedNodes = OdooEditorLib.getTraversedNodes; const FontFamilyPickerUserValueWidget = wSnippetOptions.FontFamilyPickerUserValueWidget; const wSnippetMenu = weSnippetEditor.SnippetsMenu.extend({ - xmlDependencies: (weSnippetEditor.SnippetsMenu.prototype.xmlDependencies || []) - .concat(['/website/static/src/xml/website.editor.xml']), events: _.extend({}, weSnippetEditor.SnippetsMenu.prototype.events, { 'click .o_we_customize_theme_btn': '_onThemeTabClick', 'click .o_we_animate_text': '_onAnimateTextClick', diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index 864aacdb860..46502c0130f 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -4,6 +4,7 @@ odoo.define('website.editor.snippets.options', function (require) { const {ColorpickerWidget} = require('web.Colorpicker'); var core = require('web.core'); +const { loadBundle } = require("@web/core/assets"); var Dialog = require('web.Dialog'); const {Markup, sprintf} = require('web.utils'); const weUtils = require('web_editor.utils'); @@ -100,8 +101,6 @@ const UrlPickerUserValueWidget = InputUserValueWidget.extend({ }); const FontFamilyPickerUserValueWidget = SelectUserValueWidget.extend({ - xmlDependencies: (SelectUserValueWidget.prototype.xmlDependencies || []) - .concat(['/website/static/src/xml/website.editor.xml']), events: _.extend({}, SelectUserValueWidget.prototype.events || {}, { 'click .o_we_add_google_font_btn': '_onAddGoogleFontClick', 'click .o_we_delete_google_font_btn': '_onDeleteGoogleFontClick', @@ -399,8 +398,6 @@ options.userValueWidgetsRegistry['we-gpspicker'] = GPSPicker; //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: options.Class.include({ - xmlDependencies: (options.Class.prototype.xmlDependencies || []) - .concat(['/website/static/src/xml/website.editor.xml']), custom_events: _.extend({}, options.Class.prototype.custom_events || {}, { 'google_fonts_custo_request': '_onGoogleFontsCustoRequest', }), @@ -1117,7 +1114,7 @@ options.registry.OptionsTab = options.Class.extend({ * @see this.selectClass for parameters */ async openCustomCodeDialog(previewMode, widgetValue, params) { - const libsProm = this._loadLibs({ + const libsProm = loadBundle({ jsLibs: [ '/web/static/lib/ace/ace.js', '/web/static/lib/ace/mode-xml.js', @@ -2526,10 +2523,6 @@ options.registry.HeaderBox = options.registry.Box.extend({ }); options.registry.CookiesBar = options.registry.SnippetPopup.extend({ - xmlDependencies: (options.registry.SnippetPopup.prototype.xmlDependencies || []).concat( - ['/website/static/src/xml/website.cookies_bar.xml'] - ), - //-------------------------------------------------------------------------- // Options //-------------------------------------------------------------------------- diff --git a/addons/website/static/src/js/editor/widget_link.js b/addons/website/static/src/js/editor/widget_link.js index 0006095c4e8..fa846c0a962 100644 --- a/addons/website/static/src/js/editor/widget_link.js +++ b/addons/website/static/src/js/editor/widget_link.js @@ -5,9 +5,6 @@ var weWidgets = require('wysiwyg.widgets'); var wUtils = require('website.utils'); weWidgets.LinkTools.include({ - xmlDependencies: (weWidgets.LinkTools.prototype.xmlDependencies || []).concat( - ['/website/static/src/xml/website.editor.xml'] - ), events: _.extend({}, weWidgets.LinkTools.prototype.events || {}, { 'click we-selection-items[name="link_anchor"] we-button': '_onAnchorChange', 'input input[name="url"]': '_onURLInput', diff --git a/addons/website/static/src/js/utils.js b/addons/website/static/src/js/utils.js index ed9e9c52691..75cef2c55c2 100644 --- a/addons/website/static/src/js/utils.js +++ b/addons/website/static/src/js/utils.js @@ -1,7 +1,6 @@ odoo.define('website.utils', function (require) { 'use strict'; -var ajax = require('web.ajax'); var core = require('web.core'); const { qweb, _t } = core; @@ -165,10 +164,8 @@ function prompt(options, _qweb) { text: options }; } - var xmlDef; if (_.isUndefined(_qweb)) { _qweb = 'website.prompt'; - xmlDef = ajax.loadXML('/website/static/src/xml/website.xml', core.qweb); } options = _.extend({ window_title: '', @@ -185,50 +182,48 @@ function prompt(options, _qweb) { options.field_name = options.field_name || options[type]; var def = new Promise(function (resolve, reject) { - Promise.resolve(xmlDef).then(function () { - var dialog = $(qweb.render(_qweb, options)).appendTo('body'); - options.$dialog = dialog; - var field = dialog.find(options.field_type).first(); - field.val(options['default']); // dict notation for IE<9 - field.fillWith = function (data) { - if (field.is('select')) { - var select = field[0]; - data.forEach(function (item) { - select.options[select.options.length] = new window.Option(item[1], item[0]); - }); - } else { - field.val(data); - } - }; - var init = options.init(field, dialog); - Promise.resolve(init).then(function (fill) { - if (fill) { - field.fillWith(fill); - } - dialog.modal('show'); - field.focus(); - dialog.on('click', '.btn-primary', function () { - var backdrop = $('.modal-backdrop'); - resolve({ val: field.val(), field: field, dialog: dialog }); - dialog.modal('hide').remove(); - backdrop.remove(); + var dialog = $(qweb.render(_qweb, options)).appendTo('body'); + options.$dialog = dialog; + var field = dialog.find(options.field_type).first(); + field.val(options['default']); // dict notation for IE<9 + field.fillWith = function (data) { + if (field.is('select')) { + var select = field[0]; + data.forEach(function (item) { + select.options[select.options.length] = new window.Option(item[1], item[0]); }); - }); - dialog.on('hidden.bs.modal', function () { - var backdrop = $('.modal-backdrop'); - reject(); - dialog.remove(); + } else { + field.val(data); + } + }; + var init = options.init(field, dialog); + Promise.resolve(init).then(function (fill) { + if (fill) { + field.fillWith(fill); + } + dialog.modal('show'); + field.focus(); + dialog.on('click', '.btn-primary', function () { + var backdrop = $('.modal-backdrop'); + resolve({ val: field.val(), field: field, dialog: dialog }); + dialog.modal('hide').remove(); backdrop.remove(); }); - if (field.is('input[type="text"], select')) { - field.keypress(function (e) { - if (e.which === 13) { - e.preventDefault(); - dialog.find('.btn-primary').trigger('click'); - } - }); - } }); + dialog.on('hidden.bs.modal', function () { + var backdrop = $('.modal-backdrop'); + reject(); + dialog.remove(); + backdrop.remove(); + }); + if (field.is('input[type="text"], select')) { + field.keypress(function (e) { + if (e.which === 13) { + e.preventDefault(); + dialog.find('.btn-primary').trigger('click'); + } + }); + } }); return def; diff --git a/addons/website/static/src/services/website_service.js b/addons/website/static/src/services/website_service.js index f2d72dea437..72762c44a45 100644 --- a/addons/website/static/src/services/website_service.js +++ b/addons/website/static/src/services/website_service.js @@ -1,8 +1,6 @@ /** @odoo-module **/ import { registry } from '@web/core/registry'; -import core from 'web.core'; -import ajax from 'web.ajax'; import { getWysiwygClass } from 'web_editor.loader'; import { FullscreenIndication } from '../components/fullscreen_indication/fullscreen_indication'; @@ -196,10 +194,9 @@ export const websiteService = { }, async loadWysiwyg() { if (!Wysiwyg) { - await ajax.loadXML('/website/static/src/xml/website.editor.xml', core.qweb); Wysiwyg = await getWysiwygClass({ moduleName: 'website.wysiwyg', - additionnalAssets: ['website.compiled_assets_wysiwyg'] + additionnalAssets: ['website.assets_wysiwyg'] }); } return Wysiwyg; diff --git a/addons/website/static/src/snippets/s_countdown/000.js b/addons/website/static/src/snippets/s_countdown/000.js index e6b3d5560ae..56b8fe391db 100644 --- a/addons/website/static/src/snippets/s_countdown/000.js +++ b/addons/website/static/src/snippets/s_countdown/000.js @@ -11,7 +11,6 @@ const _t = core._t; const CountdownWidget = publicWidget.Widget.extend({ selector: '.s_countdown', - xmlDependencies: ['/website/static/src/snippets/s_countdown/000.xml'], disabledInEditableMode: false, /** diff --git a/addons/website/static/src/snippets/s_countdown/options.js b/addons/website/static/src/snippets/s_countdown/options.js index 1fefc35f86c..3c1c82a26d3 100644 --- a/addons/website/static/src/snippets/s_countdown/options.js +++ b/addons/website/static/src/snippets/s_countdown/options.js @@ -7,7 +7,6 @@ const options = require('web_editor.snippets.options'); const qweb = core.qweb; options.registry.countdown = options.Class.extend({ - xmlDependencies: ['/website/static/src/snippets/s_countdown/options.xml'], events: _.extend({}, options.Class.prototype.events || {}, { 'click .toggle-edit-message': '_onToggleEndMessageClick', }), diff --git a/addons/website/static/src/snippets/s_dynamic_snippet/000.js b/addons/website/static/src/snippets/s_dynamic_snippet/000.js index 8d8b3f50812..4424ba0c078 100644 --- a/addons/website/static/src/snippets/s_dynamic_snippet/000.js +++ b/addons/website/static/src/snippets/s_dynamic_snippet/000.js @@ -8,7 +8,6 @@ const {Markup} = require('web.utils'); const DynamicSnippet = publicWidget.Widget.extend({ selector: '.s_dynamic_snippet', - xmlDependencies: ['/website/static/src/snippets/s_dynamic_snippet/000.xml'], read_events: { 'click [data-url]': '_onCallToAction', }, diff --git a/addons/website/static/src/snippets/s_dynamic_snippet_carousel/000.js b/addons/website/static/src/snippets/s_dynamic_snippet_carousel/000.js index 07962b41a77..adae0ab86bd 100644 --- a/addons/website/static/src/snippets/s_dynamic_snippet_carousel/000.js +++ b/addons/website/static/src/snippets/s_dynamic_snippet_carousel/000.js @@ -6,10 +6,6 @@ const DynamicSnippet = require('website.s_dynamic_snippet'); const DynamicSnippetCarousel = DynamicSnippet.extend({ selector: '.s_dynamic_snippet_carousel', - xmlDependencies: (DynamicSnippet.prototype.xmlDependencies || []).concat( - ['/website/static/src/snippets/s_dynamic_snippet_carousel/000.xml'] - ), - /** * @override */ diff --git a/addons/website/static/src/snippets/s_embed_code/options.js b/addons/website/static/src/snippets/s_embed_code/options.js index 07faab91e6a..cd05f628828 100644 --- a/addons/website/static/src/snippets/s_embed_code/options.js +++ b/addons/website/static/src/snippets/s_embed_code/options.js @@ -3,6 +3,7 @@ import Dialog from 'web.Dialog'; import core from 'web.core'; import options from 'web_editor.snippets.options'; +import { loadBundle } from "@web/core/assets"; const _t = core._t; @@ -15,7 +16,7 @@ options.registry.EmbedCode = options.Class.extend({ const $container = this.$target.find('.s_embed_code_embedded'); const code = $container.html().trim(); - await this._loadLibs({ + await loadBundle({ jsLibs: [ '/web/static/lib/ace/ace.js', '/web/static/lib/ace/mode-xml.js', diff --git a/addons/website/static/src/snippets/s_image_gallery/000.js b/addons/website/static/src/snippets/s_image_gallery/000.js index 7a57302f6a9..2e778ce72de 100644 --- a/addons/website/static/src/snippets/s_image_gallery/000.js +++ b/addons/website/static/src/snippets/s_image_gallery/000.js @@ -9,7 +9,6 @@ var qweb = core.qweb; const GalleryWidget = publicWidget.Widget.extend({ selector: '.s_image_gallery:not(.o_slideshow)', - xmlDependencies: ['/website/static/src/snippets/s_image_gallery/000.xml'], events: { 'click img': '_onClickImg', }, @@ -73,7 +72,6 @@ const GalleryWidget = publicWidget.Widget.extend({ const GallerySliderWidget = publicWidget.Widget.extend({ selector: '.o_slideshow', - xmlDependencies: ['/website/static/src/snippets/s_image_gallery/000.xml'], disabledInEditableMode: false, /** diff --git a/addons/website/static/src/snippets/s_image_gallery/options.js b/addons/website/static/src/snippets/s_image_gallery/options.js index d90cb1d44a1..070c2df6fd7 100644 --- a/addons/website/static/src/snippets/s_image_gallery/options.js +++ b/addons/website/static/src/snippets/s_image_gallery/options.js @@ -10,8 +10,6 @@ var _t = core._t; var qweb = core.qweb; options.registry.gallery = options.Class.extend({ - xmlDependencies: ['/website/static/src/snippets/s_image_gallery/000.xml'], - /** * @override */ diff --git a/addons/website/static/src/snippets/s_searchbar/000.js b/addons/website/static/src/snippets/s_searchbar/000.js index cf61bc6a758..8c04fa45827 100644 --- a/addons/website/static/src/snippets/s_searchbar/000.js +++ b/addons/website/static/src/snippets/s_searchbar/000.js @@ -8,7 +8,6 @@ import {Markup} from 'web.utils'; publicWidget.registry.searchBar = publicWidget.Widget.extend({ selector: '.o_searchbar_form', - xmlDependencies: ['/website/static/src/snippets/s_searchbar/000.xml'], events: { 'input .search-query': '_onInput', 'focusout': '_onFocusOut', diff --git a/addons/website/static/src/snippets/s_website_form/000.js b/addons/website/static/src/snippets/s_website_form/000.js index d89dc4419c9..ae537edd823 100644 --- a/addons/website/static/src/snippets/s_website_form/000.js +++ b/addons/website/static/src/snippets/s_website_form/000.js @@ -38,7 +38,6 @@ odoo.define('website.s_website_form', function (require) { publicWidget.registry.s_website_form = publicWidget.Widget.extend({ selector: '.s_website_form form, form.s_website_form', // !compatibility - xmlDependencies: ['/website/static/src/xml/website_form.xml'], events: { 'click .s_website_form_send, .o_website_form_send': 'send', // !compatibility }, @@ -488,7 +487,7 @@ odoo.define('website.s_website_form', function (require) { } // Note: we still need to wait that the widget is properly started - // before any qweb rendering which depends on xmlDependencies + // before any qweb rendering which depends on xml assets // because the event handlers are binded before the call to // willStart for public widgets... this.__started.then(() => $result.replaceWith(qweb.render(`website.s_website_form_status_${status}`, { diff --git a/addons/website/static/src/snippets/s_website_form/options.js b/addons/website/static/src/snippets/s_website_form/options.js index 23ec20cf08f..b4aef8c34e9 100644 --- a/addons/website/static/src/snippets/s_website_form/options.js +++ b/addons/website/static/src/snippets/s_website_form/options.js @@ -13,11 +13,6 @@ const qweb = core.qweb; const _t = core._t; const FormEditor = options.Class.extend({ - xmlDependencies: [ - '/website/static/src/xml/website_form_editor.xml', - '/google_recaptcha/static/src/xml/recaptcha.xml', - ], - //---------------------------------------------------------------------- // Private //---------------------------------------------------------------------- diff --git a/addons/website/static/tests/tours/focus_blur_snippets.js b/addons/website/static/tests/tours/focus_blur_snippets.js index 0ad72a498bb..5902c8eff09 100644 --- a/addons/website/static/tests/tours/focus_blur_snippets.js +++ b/addons/website/static/tests/tours/focus_blur_snippets.js @@ -1,7 +1,7 @@ odoo.define('website.tour.focus_blur_snippets', function (require) { 'use strict'; -const ajax = require('web.ajax'); +const { loadJS } = require('@web/core/assets'); const tour = require('web_tour.tour'); const blockIDToData = { @@ -57,7 +57,7 @@ tour.register('focus_blur_snippets', { content: 'First load our custom JS options', trigger: '#oe_snippets.o_loaded', run: function () { - ajax.loadJS('/website/static/tests/tour_utils/focus_blur_snippets_options.js').then(function () { + loadJS('/website/static/tests/tour_utils/focus_blur_snippets_options.js').then(function () { $('iframe:not(.o_ignore_in_tour)').contents().find('body').addClass('focus_blur_snippets_options_loaded'); }); }, diff --git a/addons/website/static/tests/tours/rte.js b/addons/website/static/tests/tours/rte.js index 9d79d61196f..c516e790078 100644 --- a/addons/website/static/tests/tours/rte.js +++ b/addons/website/static/tests/tours/rte.js @@ -1,14 +1,13 @@ odoo.define('website.tour.rte', function (require) { 'use strict'; -var ajax = require('web.ajax'); var session = require('web.session'); const wTourUtils = require('website.tour_utils'); var domReady = new Promise(function (resolve) { $(resolve); }); -var ready = Promise.all([domReady, session.is_bound, ajax.loadXML()]); +var ready = Promise.all([domReady, session.is_bound]); wTourUtils.registerWebsitePreviewTour('rte_translator', { test: true, diff --git a/addons/website/views/snippets/s_searchbar.xml b/addons/website/views/snippets/s_searchbar.xml index d6d7aab1849..4b7aad12872 100644 --- a/addons/website/views/snippets/s_searchbar.xml +++ b/addons/website/views/snippets/s_searchbar.xml @@ -64,4 +64,10 @@ website/static/src/snippets/s_searchbar/000.js + + Searchbar 000 XML + web.assets_frontend + website/static/src/snippets/s_searchbar/000.xml + + diff --git a/addons/website/views/snippets/s_website_form.xml b/addons/website/views/snippets/s_website_form.xml index 6a734437bb5..09d1076432f 100644 --- a/addons/website/views/snippets/s_website_form.xml +++ b/addons/website/views/snippets/s_website_form.xml @@ -239,4 +239,10 @@ website/static/src/snippets/s_website_form/000.js + + Website form XML + web.assets_frontend + website/static/src/xml/website_form.xml + + diff --git a/addons/website_event_booth/__manifest__.py b/addons/website_event_booth/__manifest__.py index 070e1b3bb62..ea934b28001 100644 --- a/addons/website_event_booth/__manifest__.py +++ b/addons/website_event_booth/__manifest__.py @@ -26,8 +26,6 @@ Display your booths on your website for the users to register. 'web.assets_frontend': [ '/website_event_booth/static/src/js/booth_register.js', '/website_event_booth/static/src/scss/website_event_booth.scss', - ], - 'web.assets_qweb': [ 'website_event_booth/static/src/xml/event_booth_registration_templates.xml', ], }, diff --git a/addons/website_event_booth/static/src/js/booth_register.js b/addons/website_event_booth/static/src/js/booth_register.js index 9c1415169a0..5123f86b42e 100644 --- a/addons/website_event_booth/static/src/js/booth_register.js +++ b/addons/website_event_booth/static/src/js/booth_register.js @@ -9,9 +9,6 @@ var _t = core._t; publicWidget.registry.boothRegistration = publicWidget.Widget.extend({ selector: '.o_wbooth_registration', - xmlDependencies: [ - '/website_event_booth/static/src/xml/event_booth_registration_templates.xml', - ], events: { 'change input[name="booth_category_id"]': '_onChangeBoothType', 'change .form-check > input[type="checkbox"]': '_onChangeBooth', diff --git a/addons/website_event_exhibitor/__manifest__.py b/addons/website_event_exhibitor/__manifest__.py index 3192d1b1474..b1462ca3122 100644 --- a/addons/website_event_exhibitor/__manifest__.py +++ b/addons/website_event_exhibitor/__manifest__.py @@ -37,6 +37,7 @@ 'website_event_exhibitor/static/src/scss/event_exhibitor_templates.scss', 'website_event_exhibitor/static/src/js/event_exhibitor_connect.js', 'website_event_exhibitor/static/src/js/event_sponsor_search.js', + 'website_event_exhibitor/static/src/xml/event_exhibitor_connect.xml', ], 'web.report_assets_common': [ '/website_event_exhibitor/static/src/scss/event_full_page_ticket_report.scss', diff --git a/addons/website_event_exhibitor/static/src/js/event_exhibitor_connect.js b/addons/website_event_exhibitor/static/src/js/event_exhibitor_connect.js index 2d530fe4a74..3472e6f76d8 100644 --- a/addons/website_event_exhibitor/static/src/js/event_exhibitor_connect.js +++ b/addons/website_event_exhibitor/static/src/js/event_exhibitor_connect.js @@ -58,8 +58,6 @@ var ExhibitorConnectClosedDialog = Dialog.extend({ publicWidget.registry.eventExhibitorConnect = publicWidget.Widget.extend({ selector: '.o_wesponsor_connect_button', - xmlDependencies: ['/website_event_exhibitor/static/src/xml/event_exhibitor_connect.xml'], - /** * @override * @public diff --git a/addons/website_event_meet/__manifest__.py b/addons/website_event_meet/__manifest__.py index c7a36646d83..a791f56b018 100644 --- a/addons/website_event_meet/__manifest__.py +++ b/addons/website_event_meet/__manifest__.py @@ -29,6 +29,7 @@ 'website_event_meet/static/src/scss/event_meet_templates.scss', 'website_event_meet/static/src/js/website_event_meeting_room.js', 'website_event_meet/static/src/js/website_event_create_meeting_room_button.js', + 'website_event_meet/static/src/xml/website_event_meeting_room.xml', ], 'website.assets_wysiwyg': [ 'website_event_meet/static/src/js/snippets/options.js', diff --git a/addons/website_event_meet/static/src/js/website_event_create_meeting_room_button.js b/addons/website_event_meet/static/src/js/website_event_create_meeting_room_button.js index c64537a57a7..ed6aefcff38 100644 --- a/addons/website_event_meet/static/src/js/website_event_create_meeting_room_button.js +++ b/addons/website_event_meet/static/src/js/website_event_create_meeting_room_button.js @@ -7,7 +7,6 @@ const QWeb = core.qweb; publicWidget.registry.websiteEventCreateMeetingRoom = publicWidget.Widget.extend({ selector: '.o_wevent_create_room_button', - xmlDependencies: ['/website_event_meet/static/src/xml/website_event_meeting_room.xml'], events: { 'click': '_onClickCreate', }, diff --git a/addons/website_event_meet/static/src/js/website_event_meeting_room.js b/addons/website_event_meet/static/src/js/website_event_meeting_room.js index 774a186e9f7..39c11728415 100644 --- a/addons/website_event_meet/static/src/js/website_event_meeting_room.js +++ b/addons/website_event_meet/static/src/js/website_event_meeting_room.js @@ -8,7 +8,6 @@ const _t = core._t; publicWidget.registry.websiteEventMeetingRoom = publicWidget.Widget.extend({ selector: '.o_wevent_meeting_room_card', - xmlDependencies: ['/website_event_meet/static/src/xml/website_event_meeting_room.xml'], events: { 'click .o_wevent_meeting_room_delete': '_onDeleteClick', 'click .o_wevent_meeting_room_duplicate': '_onDuplicateClick', diff --git a/addons/website_event_track/__manifest__.py b/addons/website_event_track/__manifest__.py index 5cc49d378a3..deca5c6ee5f 100644 --- a/addons/website_event_track/__manifest__.py +++ b/addons/website_event_track/__manifest__.py @@ -53,9 +53,8 @@ 'website_event_track/static/src/js/event_track_timer.js', 'website_event_track/static/src/js/website_event_pwa_widget.js', 'website_event_track/static/lib/idb-keyval/idb-keyval.js', - ], - 'web.assets_qweb': [ 'website_event_track/static/src/xml/event_track_proposal_templates.xml', + 'website_event_track/static/src/xml/website_event_pwa.xml', ], }, 'license': 'LGPL-3', diff --git a/addons/website_event_track/static/src/js/website_event_pwa_widget.js b/addons/website_event_track/static/src/js/website_event_pwa_widget.js index 49b42196b93..c343f6ff608 100644 --- a/addons/website_event_track/static/src/js/website_event_pwa_widget.js +++ b/addons/website_event_track/static/src/js/website_event_pwa_widget.js @@ -20,7 +20,6 @@ odoo.define("website_event_track.website_event_pwa_widget", function (require) { var publicWidget = require("web.public.widget"); var PWAInstallBanner = publicWidget.Widget.extend({ - xmlDependencies: ["/website_event_track/static/src/xml/website_event_pwa.xml"], template: "pwa_install_banner", events: { "click .o_btn_install": "_onClickInstall", diff --git a/addons/website_event_track/static/src/js/website_event_track_proposal_form.js b/addons/website_event_track/static/src/js/website_event_track_proposal_form.js index 4e01701c73f..6dff8848948 100644 --- a/addons/website_event_track/static/src/js/website_event_track_proposal_form.js +++ b/addons/website_event_track/static/src/js/website_event_track_proposal_form.js @@ -9,9 +9,6 @@ var _t = core._t; publicWidget.registry.websiteEventTrackProposalForm = publicWidget.Widget.extend({ selector: '.o_website_event_track_proposal_form', - xmlDependencies: [ - '/website_event_track/static/src/xml/event_track_proposal_templates.xml', - ], events: { 'click .o_wetrack_add_contact_information_checkbox': '_onAdvancedContactToggle', 'input input[name="partner_name"]': '_onPartnerNameInput', diff --git a/addons/website_event_track_live/__manifest__.py b/addons/website_event_track_live/__manifest__.py index 5b6e356602d..f23070a2946 100644 --- a/addons/website_event_track_live/__manifest__.py +++ b/addons/website_event_track_live/__manifest__.py @@ -27,8 +27,6 @@ 'website_event_track_live/static/src/js/website_event_track_replay_suggestion.js', 'website_event_track_live/static/src/js/website_event_track_suggestion.js', 'website_event_track_live/static/src/js/website_event_track_live.js', - ], - 'web.assets_qweb': [ 'website_event_track_live/static/src/xml/**/*', ], }, diff --git a/addons/website_event_track_live/static/src/js/website_event_track_replay_suggestion.js b/addons/website_event_track_live/static/src/js/website_event_track_replay_suggestion.js index da96f91ecfe..db2350be388 100644 --- a/addons/website_event_track_live/static/src/js/website_event_track_replay_suggestion.js +++ b/addons/website_event_track_live/static/src/js/website_event_track_replay_suggestion.js @@ -10,7 +10,6 @@ var Widget = require('web.Widget'); */ var WebsiteEventReplaySuggestion = Widget.extend({ template: 'website_event_track_live.website_event_track_replay_suggestion', - xmlDependencies: ['/website_event_track_live/static/src/xml/website_event_track_live_templates.xml'], events: { 'click .owevent_track_suggestion_replay': '_onReplayClick' }, diff --git a/addons/website_event_track_live/static/src/js/website_event_track_suggestion.js b/addons/website_event_track_live/static/src/js/website_event_track_suggestion.js index e6583c22509..4309fac363c 100644 --- a/addons/website_event_track_live/static/src/js/website_event_track_suggestion.js +++ b/addons/website_event_track_live/static/src/js/website_event_track_suggestion.js @@ -5,7 +5,6 @@ var Widget = require('web.Widget'); var WebsiteEventTrackSuggestion = Widget.extend({ template: 'website_event_track_live.website_event_track_suggestion', - xmlDependencies: ['/website_event_track_live/static/src/xml/website_event_track_live_templates.xml'], events: { 'click .owevent_track_suggestion_next': '_onNextTrackClick', 'click .owevent_track_suggestion_close': '_onCloseClick', diff --git a/addons/website_event_track_live_quiz/__manifest__.py b/addons/website_event_track_live_quiz/__manifest__.py index cf262fc27ec..44d2d31b7be 100644 --- a/addons/website_event_track_live_quiz/__manifest__.py +++ b/addons/website_event_track_live_quiz/__manifest__.py @@ -20,8 +20,6 @@ 'assets': { 'web.assets_frontend': [ 'website_event_track_live_quiz/static/src/js/**/*', - ], - 'web.assets_qweb': [ 'website_event_track_live_quiz/static/src/xml/**/*', ], }, diff --git a/addons/website_event_track_live_quiz/static/src/js/event_quiz.js b/addons/website_event_track_live_quiz/static/src/js/event_quiz.js index 2fd34e66aa4..94dc35f5b9d 100644 --- a/addons/website_event_track_live_quiz/static/src/js/event_quiz.js +++ b/addons/website_event_track_live_quiz/static/src/js/event_quiz.js @@ -4,10 +4,6 @@ odoo.define('website_event_track_live_quiz.event_quiz', function (require) { var Quiz = require('website_event_track_quiz.event.quiz'); var WebsiteEventTrackSuggestionQuiz = Quiz.include({ - xmlDependencies: Quiz.prototype.xmlDependencies.concat([ - '/website_event_track_live_quiz/static/src/xml/website_event_track_quiz_templates.xml', - ]), - /** * @override */ diff --git a/addons/website_event_track_live_quiz/static/src/js/website_event_track_suggestion.js b/addons/website_event_track_live_quiz/static/src/js/website_event_track_suggestion.js index 17f98f9b7fd..28e6c559e75 100644 --- a/addons/website_event_track_live_quiz/static/src/js/website_event_track_suggestion.js +++ b/addons/website_event_track_live_quiz/static/src/js/website_event_track_suggestion.js @@ -4,9 +4,6 @@ odoo.define('website_event_track_live_quiz.website_event_track_suggestion', func var WebsiteEventTrackSuggestion = require('website_event_track_live.website_event_track_suggestion'); var WebsiteEventTrackSuggestionLiveQuiz = WebsiteEventTrackSuggestion.include({ - xmlDependencies: WebsiteEventTrackSuggestion.prototype.xmlDependencies.concat([ - '/website_event_track_live_quiz/static/src/xml/website_event_track_live_templates.xml', - ]), events: _.extend({}, WebsiteEventTrackSuggestion.prototype.events, { 'click .owevent_track_suggestion_quiz': '_onQuizClick' }), diff --git a/addons/website_event_track_quiz/__manifest__.py b/addons/website_event_track_quiz/__manifest__.py index 97efe847c38..8b1598d676e 100644 --- a/addons/website_event_track_quiz/__manifest__.py +++ b/addons/website_event_track_quiz/__manifest__.py @@ -35,6 +35,7 @@ 'website_event_track_quiz/static/src/scss/event_quiz.scss', 'website_event_track_quiz/static/src/js/event_quiz.js', 'website_event_track_quiz/static/src/js/event_quiz_leaderboard.js', + 'website_event_track_quiz/static/src/xml/quiz_templates.xml', ], }, 'license': 'LGPL-3', diff --git a/addons/website_event_track_quiz/static/src/js/event_quiz.js b/addons/website_event_track_quiz/static/src/js/event_quiz.js index 47331f11732..bee0cd44715 100644 --- a/addons/website_event_track_quiz/static/src/js/event_quiz.js +++ b/addons/website_event_track_quiz/static/src/js/event_quiz.js @@ -18,7 +18,6 @@ var _t = core._t; */ var Quiz = publicWidget.Widget.extend({ template: 'quiz.main', - xmlDependencies: ['/website_event_track_quiz/static/src/xml/quiz_templates.xml'], events: { "click .o_quiz_quiz_answer": '_onAnswerClick', "click .o_quiz_js_quiz_submit": '_submitQuiz', diff --git a/addons/website_forum/__manifest__.py b/addons/website_forum/__manifest__.py index f7606945dda..441a56e4305 100644 --- a/addons/website_forum/__manifest__.py +++ b/addons/website_forum/__manifest__.py @@ -55,10 +55,11 @@ Ask questions, get answers, no distractions 'website_forum/static/src/scss/website_forum.scss', 'website_forum/static/src/js/website_forum.js', 'website_forum/static/src/js/website_forum.share.js', + 'website_forum/static/src/xml/public_templates.xml', ], - 'web.assets_qweb': [ - 'website_forum/static/src/xml/*.xml', - ], + 'web_editor.assets_wysiwyg': { + 'website_forum/static/src/xml/forum_wysiwyg.xml', + }, }, 'license': 'LGPL-3', } diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index e97058bf320..a719c3cf0a3 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -14,10 +14,6 @@ var _t = core._t; publicWidget.registry.websiteForum = publicWidget.Widget.extend({ selector: '.website_forum', - xmlDependencies: [ - '/web_editor/static/src/xml/editor.xml', - '/website_forum/static/src/xml/public_templates.xml', - ], events: { 'click .karma_required': '_onKarmaRequiredClick', 'mouseenter .o_js_forum_tag_follow': '_onTagFollowBoxMouseEnter', @@ -556,7 +552,6 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({ publicWidget.registry.websiteForumSpam = publicWidget.Widget.extend({ selector: '.o_wforum_moderation_queue', - xmlDependencies: ['/website_forum/static/src/xml/public_templates.xml'], events: { 'click .o_wforum_select_all_spam': '_onSelectallSpamClick', 'click .o_wforum_mark_spam': 'async _onMarkSpamClick', diff --git a/addons/website_forum/static/src/js/website_forum.share.js b/addons/website_forum/static/src/js/website_forum.share.js index c26809a7b35..b489c227d45 100644 --- a/addons/website_forum/static/src/js/website_forum.share.js +++ b/addons/website_forum/static/src/js/website_forum.share.js @@ -3,14 +3,13 @@ odoo.define('website_forum.share', function (require) { var core = require('web.core'); var publicWidget = require('web.public.widget'); +require('website.content.snippets.animation'); var qweb = core.qweb; // FIXME There is no reason to inherit from socialShare here var ForumShare = publicWidget.registry.socialShare.extend({ selector: '', - xmlDependencies: publicWidget.registry.socialShare.prototype.xmlDependencies - .concat(['/website_forum/static/src/xml/public_templates.xml']), events: {}, /** diff --git a/addons/website_forum/static/src/xml/forum_wysiwyg.xml b/addons/website_forum/static/src/xml/forum_wysiwyg.xml new file mode 100644 index 00000000000..4c4b53e49c4 --- /dev/null +++ b/addons/website_forum/static/src/xml/forum_wysiwyg.xml @@ -0,0 +1,15 @@ + + + + + + + + +
+
+
+
+ + + diff --git a/addons/website_forum/static/src/xml/public_templates.xml b/addons/website_forum/static/src/xml/public_templates.xml index 3c7970ac4d9..8ff9f41855a 100644 --- a/addons/website_forum/static/src/xml/public_templates.xml +++ b/addons/website_forum/static/src/xml/public_templates.xml @@ -68,17 +68,4 @@
- - - - - - - -
-
-
-
- - diff --git a/addons/website_jitsi/__manifest__.py b/addons/website_jitsi/__manifest__.py index 0ddcd76cea4..9cec55d2bb3 100644 --- a/addons/website_jitsi/__manifest__.py +++ b/addons/website_jitsi/__manifest__.py @@ -21,6 +21,7 @@ 'web.assets_frontend': [ 'website_jitsi/static/src/css/chat_room.css', 'website_jitsi/static/src/js/chat_room.js', + 'website_jitsi/static/src/xml/chat_room_modal.xml', ], }, 'license': 'LGPL-3', diff --git a/addons/website_jitsi/static/src/js/chat_room.js b/addons/website_jitsi/static/src/js/chat_room.js index 93ce2508276..e16322fcf12 100644 --- a/addons/website_jitsi/static/src/js/chat_room.js +++ b/addons/website_jitsi/static/src/js/chat_room.js @@ -8,7 +8,6 @@ const QWeb = core.qweb; publicWidget.registry.ChatRoom = publicWidget.Widget.extend({ selector: '.o_wjitsi_room_widget', - xmlDependencies: ['/website_jitsi/static/src/xml/chat_room_modal.xml'], events: { 'click .o_wjitsi_room_link': '_onChatRoomClick', }, diff --git a/addons/website_links/__manifest__.py b/addons/website_links/__manifest__.py index b83c9368840..aafc7095ed0 100644 --- a/addons/website_links/__manifest__.py +++ b/addons/website_links/__manifest__.py @@ -21,6 +21,7 @@ Those trackers can be used in Google Analytics to track clicks and visitors, or 'website_links/static/src/js/website_links_code_editor.js', 'website_links/static/src/js/website_links_charts.js', 'website_links/static/src/css/website_links.css', + 'website_links/static/src/xml/*.xml', ], 'web.assets_tests': [ 'website_links/static/tests/**/*', @@ -28,9 +29,6 @@ Those trackers can be used in Google Analytics to track clicks and visitors, or 'website.assets_editor': [ 'website_links/static/src/services/website_custom_menus.js', ], - 'web.assets_qweb': [ - 'website_links/static/src/xml/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/website_links/static/src/js/website_links.js b/addons/website_links/static/src/js/website_links.js index d8961d47cb6..f90957fe79d 100644 --- a/addons/website_links/static/src/js/website_links.js +++ b/addons/website_links/static/src/js/website_links.js @@ -115,7 +115,6 @@ var SelectBox = publicWidget.Widget.extend({ var RecentLinkBox = publicWidget.Widget.extend({ template: 'website_links.RecentLink', - xmlDependencies: ['/website_links/static/src/xml/recent_link.xml'], events: { 'click .btn_shorten_url_clipboard': '_toggleCopyButton', 'click .o_website_links_edit_code': '_editCode', diff --git a/addons/website_livechat/__manifest__.py b/addons/website_livechat/__manifest__.py index 7d39623eb26..2ddfc6d7ef3 100644 --- a/addons/website_livechat/__manifest__.py +++ b/addons/website_livechat/__manifest__.py @@ -45,6 +45,7 @@ Allow website visitors to chat with the collaborators. This module also brings a 'web.assets_backend': [ 'website_livechat/static/src/components/*/*.js', 'website_livechat/static/src/components/*/*.scss', + 'website_livechat/static/src/components/*/*.xml', ], 'web.assets_tests': [ 'website_livechat/static/tests/tours/**/*', @@ -55,9 +56,6 @@ Allow website visitors to chat with the collaborators. This module also brings a 'web.qunit_suite_tests': [ 'website_livechat/static/tests/qunit_suite_tests/**/*.js', ], - 'web.assets_qweb': [ - 'website_livechat/static/src/components/*/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/website_mass_mailing/__manifest__.py b/addons/website_mass_mailing/__manifest__.py index 2e3679d8fe0..dd9b91e42dc 100644 --- a/addons/website_mass_mailing/__manifest__.py +++ b/addons/website_mass_mailing/__manifest__.py @@ -21,6 +21,7 @@ On a simple click, your visitors can subscribe to mailing lists managed in the E 'web.assets_frontend': [ 'website_mass_mailing/static/src/scss/website_mass_mailing_popup.scss', 'website_mass_mailing/static/src/js/website_mass_mailing.js', + 'website_mass_mailing/static/src/xml/*.xml', ], 'website.assets_wysiwyg': [ 'website_mass_mailing/static/src/js/website_mass_mailing.editor.js', @@ -33,9 +34,6 @@ On a simple click, your visitors can subscribe to mailing lists managed in the E 'web.assets_tests': [ 'website_mass_mailing/static/tests/**/*', ], - 'web.assets_qweb': [ - 'website_mass_mailing/static/src/xml/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js b/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js index 25b3f049974..72aca03316e 100644 --- a/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js +++ b/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js @@ -106,8 +106,6 @@ options.registry.mailing_list_subscribe = options.Class.extend({ }); options.registry.recaptchaSubscribe = options.Class.extend({ - xmlDependencies: ['/google_recaptcha/static/src/xml/recaptcha.xml'], - /** * Toggle the recaptcha legal terms */ diff --git a/addons/website_payment/__manifest__.py b/addons/website_payment/__manifest__.py index d2321520227..a19b1ba648c 100644 --- a/addons/website_payment/__manifest__.py +++ b/addons/website_payment/__manifest__.py @@ -27,6 +27,7 @@ This is a bridge module that adds multi-website support for payment providers. 'assets': { 'website.assets_wysiwyg': [ 'website_payment/static/src/snippets/s_donation/options.js', + 'website_payment/static/src/snippets/s_donation/000.xml', ], 'web.assets_frontend': [ 'website_payment/static/src/js/website_payment_donation.js', diff --git a/addons/website_payment/static/src/snippets/s_donation/options.js b/addons/website_payment/static/src/snippets/s_donation/options.js index cdc56ff3078..ae6cef0d537 100644 --- a/addons/website_payment/static/src/snippets/s_donation/options.js +++ b/addons/website_payment/static/src/snippets/s_donation/options.js @@ -4,8 +4,6 @@ import {_t, qweb} from 'web.core'; import options from 'web_editor.snippets.options'; options.registry.Donation = options.Class.extend({ - xmlDependencies: ['/website_payment/static/src/snippets/s_donation/000.xml'], - /** * @override */ diff --git a/addons/website_sale/__manifest__.py b/addons/website_sale/__manifest__.py index de53db5b869..0bc847599a7 100644 --- a/addons/website_sale/__manifest__.py +++ b/addons/website_sale/__manifest__.py @@ -54,7 +54,9 @@ 'sale/static/src/js/variant_mixin.js', 'website_sale/static/src/js/variant_mixin.js', 'website_sale/static/src/js/website_sale.js', + 'website_sale/static/src/xml/website_sale.xml', 'website_sale/static/src/js/website_sale_utils.js', + 'website_sale/static/src/xml/website_sale_utils.xml', 'website_sale/static/src/js/website_sale_payment.js', 'website_sale/static/src/js/website_sale_validate.js', 'website_sale/static/src/js/website_sale_recently_viewed.js', @@ -74,6 +76,7 @@ 'website_sale/static/src/js/website_sale_backend.js', 'website_sale/static/src/scss/website_sale_dashboard.scss', 'website_sale/static/src/scss/website_sale_backend.scss', + 'website_sale/static/src/xml/website_sale_dashboard.xml', 'website_sale/static/src/js/tours/website_sale_shop.js', ], 'website.assets_wysiwyg': [ @@ -93,9 +96,6 @@ 'web.assets_tests': [ 'website_sale/static/tests/**/*', ], - 'web.assets_qweb': [ - 'website_sale/static/src/xml/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/website_sale/static/src/js/website_sale.editor.js b/addons/website_sale/static/src/js/website_sale.editor.js index 3646358824e..af92058bc55 100644 --- a/addons/website_sale/static/src/js/website_sale.editor.js +++ b/addons/website_sale/static/src/js/website_sale.editor.js @@ -305,7 +305,6 @@ options.registry.WebsiteSaleGridLayout = options.Class.extend({ }); options.registry.WebsiteSaleProductsItem = options.Class.extend({ - xmlDependencies: (options.Class.prototype.xmlDependencies || []).concat(['/website_sale/static/src/xml/website_sale_utils.xml']), events: _.extend({}, options.Class.prototype.events || {}, { 'mouseenter .o_wsale_soptions_menu_sizes table': '_onTableMouseEnter', 'mouseleave .o_wsale_soptions_menu_sizes table': '_onTableMouseLeave', diff --git a/addons/website_sale_autocomplete/__manifest__.py b/addons/website_sale_autocomplete/__manifest__.py index fdf030b657f..94483fda001 100644 --- a/addons/website_sale_autocomplete/__manifest__.py +++ b/addons/website_sale_autocomplete/__manifest__.py @@ -16,14 +16,12 @@ ], 'assets': { 'web.assets_frontend': [ - 'website_sale_autocomplete/static/src/js/address_form.js' + 'website_sale_autocomplete/static/src/js/address_form.js', + 'website_sale_autocomplete/static/src/xml/autocomplete.xml', ], 'web.assets_tests': [ 'website_sale_autocomplete/static/tests/**/*.js' ], - 'web.assets_qweb': [ - 'website_sale_autocomplete/static/src/xml/autocomplete.xml', - ], }, 'installable': True, 'license': 'LGPL-3', diff --git a/addons/website_sale_autocomplete/static/src/js/address_form.js b/addons/website_sale_autocomplete/static/src/js/address_form.js index c38d6f27e4a..9ff007a9f6f 100644 --- a/addons/website_sale_autocomplete/static/src/js/address_form.js +++ b/addons/website_sale_autocomplete/static/src/js/address_form.js @@ -11,8 +11,6 @@ publicWidget.registry.AddressForm = publicWidget.Widget.extend({ 'input input[name="street"]': '_onChangeStreet', 'click .js_autocomplete_result': '_onClickAutocompleteResult' }, - xmlDependencies: ['/website_sale_autocomplete/static/src/xml/autocomplete.xml'], - init: function() { this.streetAndNumberInput = document.querySelector('input[name="street"]'); this.cityInput = document.querySelector('input[name="city"]'); diff --git a/addons/website_sale_comparison/__manifest__.py b/addons/website_sale_comparison/__manifest__.py index 37b61b89822..86e9d28f420 100644 --- a/addons/website_sale_comparison/__manifest__.py +++ b/addons/website_sale_comparison/__manifest__.py @@ -29,6 +29,7 @@ Finally, the module comes with an option to display an attribute summary table i 'web.assets_frontend': [ 'website_sale_comparison/static/src/scss/website_sale_comparison.scss', 'website_sale_comparison/static/src/js/**/*.js', + 'website_sale_comparison/static/src/xml/comparison.xml', ], 'web.assets_tests': [ 'website_sale_comparison/static/tests/**/*', diff --git a/addons/website_sale_comparison/static/src/js/website_sale_comparison.js b/addons/website_sale_comparison/static/src/js/website_sale_comparison.js index 025dbf17f52..e59bbd4438f 100644 --- a/addons/website_sale_comparison/static/src/js/website_sale_comparison.js +++ b/addons/website_sale_comparison/static/src/js/website_sale_comparison.js @@ -16,8 +16,6 @@ var _t = core._t; // to avoid registering them more than once since they are already registered // in website_sale.js var ProductComparison = publicWidget.Widget.extend(VariantMixin, { - xmlDependencies: ['/website_sale_comparison/static/src/xml/comparison.xml'], - template: 'product_comparison_template', events: { 'click .o_product_panel_header': '_onClickPanelHeader', diff --git a/addons/website_sale_delivery_mondialrelay/__manifest__.py b/addons/website_sale_delivery_mondialrelay/__manifest__.py index ea829d2cb87..9619f7fa15e 100644 --- a/addons/website_sale_delivery_mondialrelay/__manifest__.py +++ b/addons/website_sale_delivery_mondialrelay/__manifest__.py @@ -17,6 +17,7 @@ 'assets': { 'web.assets_frontend': [ 'website_sale_delivery_mondialrelay/static/src/js/website_sale_delivery_mondialrelay.js', + 'website_sale_delivery_mondialrelay/static/src/xml/website_sale_delivery_mondialrelay.xml', ], }, 'license': 'LGPL-3', diff --git a/addons/website_sale_delivery_mondialrelay/static/src/js/website_sale_delivery_mondialrelay.js b/addons/website_sale_delivery_mondialrelay/static/src/js/website_sale_delivery_mondialrelay.js index 01642cadfb5..43b77013cb9 100644 --- a/addons/website_sale_delivery_mondialrelay/static/src/js/website_sale_delivery_mondialrelay.js +++ b/addons/website_sale_delivery_mondialrelay/static/src/js/website_sale_delivery_mondialrelay.js @@ -18,9 +18,6 @@ function corsIgnoredErrorHandler(env, error) { } WebsiteSaleDeliveryWidget.include({ - xmlDependencies: (WebsiteSaleDeliveryWidget.prototype.xmlDependencies || []).concat([ - '/website_sale_delivery_mondialrelay/static/src/xml/website_sale_delivery_mondialrelay.xml', - ]), events: _.extend({ "click #btn_confirm_relay": "_onClickBtnConfirmRelay", }, WebsiteSaleDeliveryWidget.prototype.events), diff --git a/addons/website_sale_slides/__manifest__.py b/addons/website_sale_slides/__manifest__.py index a9ca38895e2..d170586659b 100644 --- a/addons/website_sale_slides/__manifest__.py +++ b/addons/website_sale_slides/__manifest__.py @@ -26,7 +26,8 @@ 'assets': { 'web.assets_frontend': [ 'website_sale_slides/static/src/js/**/*', - ], + 'website_sale_slides/static/src/xml/**/*', + ] }, 'license': 'LGPL-3', } diff --git a/addons/website_sale_slides/static/src/js/slides_course_join.js b/addons/website_sale_slides/static/src/js/slides_course_join.js index 303a50fc5c7..4f74baa1897 100644 --- a/addons/website_sale_slides/static/src/js/slides_course_join.js +++ b/addons/website_sale_slides/static/src/js/slides_course_join.js @@ -5,9 +5,6 @@ var CourseJoinWidget = require('@website_slides/js/slides_course_join')[Symbol.f const wUtils = require('website.utils'); CourseJoinWidget.include({ - xmlDependencies: (CourseJoinWidget.prototype.xmlDependencies || []).concat( - ["/website_sale_slides/static/src/xml/slide_course_join.xml"] - ), init: function (parent, options) { this._super.apply(this, arguments); this.productId = options.channel.productId || false; diff --git a/addons/website_sale_slides/static/src/js/slides_course_quiz.js b/addons/website_sale_slides/static/src/js/slides_course_quiz.js index 0670f5079cb..c55b7481971 100644 --- a/addons/website_sale_slides/static/src/js/slides_course_quiz.js +++ b/addons/website_sale_slides/static/src/js/slides_course_quiz.js @@ -1,10 +1,9 @@ odoo.define('website_sale_slides.quiz', function (require) { "use strict"; -var sAnimations = require('website.content.snippets.animation'); -var { Quiz } = require('@website_slides/js/slides_course_quiz'); +const {websiteSlidesQuizNoFullscreen} = require('@website_slides/js/slides_course_quiz'); -sAnimations.registry.websiteSlidesQuizNoFullscreen.include({ +websiteSlidesQuizNoFullscreen.include({ _extractChannelData: function (slideData) { return _.extend({}, this._super.apply(this, arguments), { productId: slideData.productId, @@ -16,10 +15,4 @@ sAnimations.registry.websiteSlidesQuizNoFullscreen.include({ }); } }); - -Quiz.include({ - xmlDependencies: (Quiz.prototype.xmlDependencies || []).concat( - ["/website_sale_slides/static/src/xml/website_sale_slides_quiz.xml"] - ) -}); }); diff --git a/addons/website_sale_slides/static/src/js/slides_course_unsubscribe.js b/addons/website_sale_slides/static/src/js/slides_course_unsubscribe.js deleted file mode 100644 index 0ea633c08c8..00000000000 --- a/addons/website_sale_slides/static/src/js/slides_course_unsubscribe.js +++ /dev/null @@ -1,12 +0,0 @@ -odoo.define('website_sale_slides.unsubscribe_modal', function (require) { -"use strict"; - -var SlidesUnsubscribe = require('@website_slides/js/slides_course_unsubscribe')[Symbol.for("default")]; - -SlidesUnsubscribe.websiteSlidesUnsubscribe.include({ - xmlDependencies: (SlidesUnsubscribe.websiteSlidesUnsubscribe.prototype.xmlDependencies || []).concat( - ["/website_sale_slides/static/src/xml/website_slides_unsubscribe.xml"] - ), -}); - -}); diff --git a/addons/website_sale_stock/__manifest__.py b/addons/website_sale_stock/__manifest__.py index 74bec5a29c1..1541d29bdc9 100644 --- a/addons/website_sale_stock/__manifest__.py +++ b/addons/website_sale_stock/__manifest__.py @@ -31,6 +31,7 @@ Then it can be made specific at the product level. 'assets': { 'web.assets_frontend': [ 'website_sale_stock/static/src/js/**/*', + 'website_sale_stock/static/src/xml/**/*', ], 'web.assets_tests': [ 'website_sale_stock/static/tests/tours/website_sale_stock_stock_notification.js', diff --git a/addons/website_sale_stock/static/src/js/variant_mixin.js b/addons/website_sale_stock/static/src/js/variant_mixin.js index 72d23c230e9..33e41d62dd4 100644 --- a/addons/website_sale_stock/static/src/js/variant_mixin.js +++ b/addons/website_sale_stock/static/src/js/variant_mixin.js @@ -4,16 +4,11 @@ odoo.define('website_sale_stock.VariantMixin', function (require) { const {Markup} = require('web.utils'); var VariantMixin = require('sale.VariantMixin'); var publicWidget = require('web.public.widget'); -var ajax = require('web.ajax'); var core = require('web.core'); var QWeb = core.qweb; require('website_sale.website_sale'); -VariantMixin.loadStockXML = async () => { - return ajax.loadXML('/website_sale_stock/static/src/xml/website_sale_stock_product_availability.xml', QWeb); -}; - /** * Addition to the variant_mixin._onChangeCombination * @@ -42,7 +37,7 @@ VariantMixin._onChangeCombinationStock = function (ev, $parent, combination) { combination.product_id === parseInt(product_id); if (!this.isWebsite || !isMainProduct) { - return VariantMixin.loadStockXML(); + return; } const $addQtyInput = $parent.find('input[name="add_qty"]'); @@ -67,18 +62,16 @@ VariantMixin._onChangeCombinationStock = function (ev, $parent, combination) { } } - return VariantMixin.loadStockXML().then(function (result) { - $('.oe_website_sale') - .find('.availability_message_' + combination.product_template) - .remove(); - combination.has_out_of_stock_message = $(combination.out_of_stock_message).text() !== ''; - combination.out_of_stock_message = Markup(combination.out_of_stock_message); - const $message = $(QWeb.render( - 'website_sale_stock.product_availability', - combination - )); - $('div.availability_messages').html($message); - }); + $('.oe_website_sale') + .find('.availability_message_' + combination.product_template) + .remove(); + combination.has_out_of_stock_message = $(combination.out_of_stock_message).text() !== ''; + combination.out_of_stock_message = Markup(combination.out_of_stock_message); + const $message = $(QWeb.render( + 'website_sale_stock.product_availability', + combination + )); + $('div.availability_messages').html($message); }; publicWidget.registry.WebsiteSale.include({ diff --git a/addons/website_sale_stock_wishlist/static/src/js/variant.js b/addons/website_sale_stock_wishlist/static/src/js/variant.js index 444185faaad..a116e75e3b5 100644 --- a/addons/website_sale_stock_wishlist/static/src/js/variant.js +++ b/addons/website_sale_stock_wishlist/static/src/js/variant.js @@ -2,15 +2,8 @@ import VariantMixin from "website_sale_stock.VariantMixin"; import "website_sale.website_sale"; -import ajax from "web.ajax"; import { qweb as QWeb } from "web.core"; -const oldLoadStockXML = VariantMixin.loadStockXML; -VariantMixin.loadStockXML = async () => { - await oldLoadStockXML.apply(this); - return ajax.loadXML('/website_sale_stock_wishlist/static/src/xml/product_availability.xml', QWeb); -}; - const oldChangeCombinationStock = VariantMixin._onChangeCombinationStock; /** * Displays additional info messages regarding the product's @@ -19,14 +12,13 @@ const oldChangeCombinationStock = VariantMixin._onChangeCombinationStock; * @override */ VariantMixin._onChangeCombinationStock = function (ev, $parent, combination) { - return oldChangeCombinationStock.apply(this, arguments).then(() => { - if (this.el.querySelector('.o_add_wishlist_dyn')) { - const messageEl = this.el.querySelector('div.availability_messages'); - if (!this.el.querySelector('#stock_wishlist_message')) { - messageEl.insertAdjacentHTML('beforeend', - QWeb.render('website_sale_stock_wishlist.product_availability', combination) - ); - } + oldChangeCombinationStock.apply(this, arguments); + if (this.el.querySelector('.o_add_wishlist_dyn')) { + const messageEl = this.el.querySelector('div.availability_messages'); + if (!this.el.querySelector('#stock_wishlist_message')) { + messageEl.insertAdjacentHTML('beforeend', + QWeb.render('website_sale_stock_wishlist.product_availability', combination) + ); } - }); + } }; diff --git a/addons/website_slides/__manifest__.py b/addons/website_slides/__manifest__.py index bf892f0f5b7..462eaa07500 100644 --- a/addons/website_slides/__manifest__.py +++ b/addons/website_slides/__manifest__.py @@ -77,6 +77,7 @@ Featuring 'website_slides/static/src/scss/slide_views.scss', 'website_slides/static/src/js/slide_category_one2many.js', 'website_slides/static/src/js/components/**/*.js', + 'website_slides/static/src/components/**/*.xml', ], 'web.assets_frontend': [ 'website_slides/static/src/scss/website_slides.scss', @@ -102,6 +103,16 @@ Featuring 'website_slides/static/src/js/slides_course_unsubscribe.js', 'website_slides/static/src/js/tours/slides_tour.js', 'website_slides/static/src/js/portal_chatter.js', + 'website_slides/static/src/xml/website_slides_sidebar.xml', + 'website_slides/static/src/xml/website_slides_upload.xml', + 'website_slides/static/src/xml/website_slides_fullscreen.xml', + 'website_slides/static/src/xml/website_slides_share.xml', + 'website_slides/static/src/xml/website_slides_channel_tag.xml', + 'website_slides/static/src/xml/website_slides_unsubscribe.xml', + 'website_slides/static/src/xml/slide_management.xml', + 'website_slides/static/src/xml/slide_course_join.xml', + 'website_slides/static/src/xml/slide_quiz_create.xml', + 'website_slides/static/src/xml/slide_quiz.xml', ], 'website.assets_editor': [ 'website_slides/static/src/js/systray_items/*.js', @@ -125,9 +136,6 @@ Featuring 'web.qunit_suite_tests': [ 'website_slides/static/tests/qunit_suite_tests/**/*.js', ], - 'web.assets_qweb': [ - 'website_slides/static/src/components/*/*.xml', - ], }, 'license': 'LGPL-3', } diff --git a/addons/website_slides/static/src/js/slides_category_add.js b/addons/website_slides/static/src/js/slides_category_add.js index dd14ca37f8a..a2d78c0681b 100644 --- a/addons/website_slides/static/src/js/slides_category_add.js +++ b/addons/website_slides/static/src/js/slides_category_add.js @@ -47,7 +47,6 @@ var CategoryAddDialog = Dialog.extend({ publicWidget.registry.websiteSlidesCategoryAdd = publicWidget.Widget.extend({ selector: '.o_wslides_js_slide_section_add', - xmlDependencies: ['/website_slides/static/src/xml/slide_management.xml'], events: { 'click': '_onAddSectionClick', }, diff --git a/addons/website_slides/static/src/js/slides_category_delete.js b/addons/website_slides/static/src/js/slides_category_delete.js index 235b8b6ecf3..ce5fb0456af 100644 --- a/addons/website_slides/static/src/js/slides_category_delete.js +++ b/addons/website_slides/static/src/js/slides_category_delete.js @@ -51,7 +51,6 @@ const categoryDeleteDialog = Dialog.extend({ publicWidget.registry.websiteSlidesCategoryDelete = publicWidget.Widget.extend({ selector: '.o_wslides_js_category_delete', - xmlDependencies: ['/website_slides/static/src/xml/slide_management.xml'], events: { 'click': '_onClickDeleteCateogry', }, diff --git a/addons/website_slides/static/src/js/slides_course_enroll_email.js b/addons/website_slides/static/src/js/slides_course_enroll_email.js index 4009c59ab7e..93438d7589b 100644 --- a/addons/website_slides/static/src/js/slides_course_enroll_email.js +++ b/addons/website_slides/static/src/js/slides_course_enroll_email.js @@ -47,7 +47,6 @@ var SlideEnrollDialog = Dialog.extend({ publicWidget.registry.websiteSlidesEnroll = publicWidget.Widget.extend({ selector: '.o_wslides_js_channel_enroll', - xmlDependencies: ['/website_slides/static/src/xml/slide_course_join.xml'], events: { 'click': '_onSendRequestClick', }, diff --git a/addons/website_slides/static/src/js/slides_course_fullscreen_player.js b/addons/website_slides/static/src/js/slides_course_fullscreen_player.js index 8f33cb85dac..6850aee1bd3 100644 --- a/addons/website_slides/static/src/js/slides_course_fullscreen_player.js +++ b/addons/website_slides/static/src/js/slides_course_fullscreen_player.js @@ -801,7 +801,6 @@ publicWidget.registry.websiteSlidesFullscreenPlayer = publicWidget.Widget.extend({ selector: '.o_wslides_fs_main', - xmlDependencies: ['/website_slides/static/src/xml/website_slides_fullscreen.xml', '/website_slides/static/src/xml/website_slides_share.xml'], start: function (){ var proms = [this._super.apply(this, arguments)]; var fullscreen = new Fullscreen(this, this._getSlides(), this._getCurrentSlideID(), this._extractChannelData()); diff --git a/addons/website_slides/static/src/js/slides_course_join.js b/addons/website_slides/static/src/js/slides_course_join.js index c0a8b2beb22..ab0bf8f4cf9 100644 --- a/addons/website_slides/static/src/js/slides_course_join.js +++ b/addons/website_slides/static/src/js/slides_course_join.js @@ -6,7 +6,6 @@ import publicWidget from 'web.public.widget'; var CourseJoinWidget = publicWidget.Widget.extend({ template: 'slide.course.join', - xmlDependencies: ['/website_slides/static/src/xml/slide_course_join.xml'], events: { 'click .o_wslides_js_course_join_link': '_onClickJoin', }, diff --git a/addons/website_slides/static/src/js/slides_course_page.js b/addons/website_slides/static/src/js/slides_course_page.js index cb362d721aa..4e34bfed484 100644 --- a/addons/website_slides/static/src/js/slides_course_page.js +++ b/addons/website_slides/static/src/js/slides_course_page.js @@ -20,8 +20,6 @@ export const SlideCoursePage = publicWidget.Widget.extend({ 'slide_mark_completed': '_onSlideMarkCompleted', }, - xmlDependencies: ['/website_slides/static/src/xml/website_slides_sidebar.xml'], - /** * Greens up the bullet when the slide is completed * diff --git a/addons/website_slides/static/src/js/slides_course_quiz.js b/addons/website_slides/static/src/js/slides_course_quiz.js index 087c26ef12a..d6f83524540 100644 --- a/addons/website_slides/static/src/js/slides_course_quiz.js +++ b/addons/website_slides/static/src/js/slides_course_quiz.js @@ -28,10 +28,6 @@ */ var Quiz = publicWidget.Widget.extend({ template: 'slide.slide.quiz', - xmlDependencies: [ - '/website_slides/static/src/xml/slide_quiz.xml', - '/website_slides/static/src/xml/slide_course_join.xml' - ], events: { "click .o_wslides_quiz_answer": '_onAnswerClick', "click .o_wslides_js_lesson_quiz_submit": '_submitQuiz', @@ -642,10 +638,6 @@ */ var ConfirmationDialog = Dialog.extend({ template: 'slide.quiz.confirm.deletion', - xmlDependencies: Dialog.prototype.xmlDependencies.concat( - ['/website_slides/static/src/xml/slide_quiz_create.xml'] - ), - /** * @override * @param parent diff --git a/addons/website_slides/static/src/js/slides_course_quiz_question_form.js b/addons/website_slides/static/src/js/slides_course_quiz_question_form.js index 0fed6742850..8f9e53803ea 100644 --- a/addons/website_slides/static/src/js/slides_course_quiz_question_form.js +++ b/addons/website_slides/static/src/js/slides_course_quiz_question_form.js @@ -13,7 +13,6 @@ var _t = core._t; */ var QuestionFormWidget = publicWidget.Widget.extend({ template: 'slide.quiz.question.input', - xmlDependencies: ['/website_slides/static/src/xml/slide_quiz_create.xml'], events: { 'click .o_wslides_js_quiz_validate_question': '_validateQuestion', 'click .o_wslides_js_quiz_cancel_question': '_cancelValidation', diff --git a/addons/website_slides/static/src/js/slides_course_slides_list.js b/addons/website_slides/static/src/js/slides_course_slides_list.js index d9d20b8d26b..c2d0a5754c7 100644 --- a/addons/website_slides/static/src/js/slides_course_slides_list.js +++ b/addons/website_slides/static/src/js/slides_course_slides_list.js @@ -7,10 +7,6 @@ import { SlideCoursePage } from '@website_slides/js/slides_course_page'; publicWidget.registry.websiteSlidesCourseSlidesList = SlideCoursePage.extend({ selector: '.o_wslides_slides_list', - xmlDependencies: SlideCoursePage.prototype.xmlDependencies.concat([ - '/website_slides/static/src/xml/website_slides_upload.xml', - ]), - start: function () { this._super.apply(this,arguments); diff --git a/addons/website_slides/static/src/js/slides_course_tag_add.js b/addons/website_slides/static/src/js/slides_course_tag_add.js index 032587838cf..487e55a203a 100644 --- a/addons/website_slides/static/src/js/slides_course_tag_add.js +++ b/addons/website_slides/static/src/js/slides_course_tag_add.js @@ -337,7 +337,6 @@ var TagCourseDialog = Dialog.extend({ publicWidget.registry.websiteSlidesTag = publicWidget.Widget.extend({ selector: '.o_wslides_js_channel_tag_add', - xmlDependencies: ['/website_slides/static/src/xml/website_slides_channel_tag.xml'], events: { 'click': '_onAddTagClick', }, diff --git a/addons/website_slides/static/src/js/slides_course_unsubscribe.js b/addons/website_slides/static/src/js/slides_course_unsubscribe.js index 14a98a3fe55..24263142a77 100644 --- a/addons/website_slides/static/src/js/slides_course_unsubscribe.js +++ b/addons/website_slides/static/src/js/slides_course_unsubscribe.js @@ -131,7 +131,6 @@ var SlideUnsubscribeDialog = Dialog.extend({ publicWidget.registry.websiteSlidesUnsubscribe = publicWidget.Widget.extend({ selector: '.o_wslides_js_channel_unsubscribe', - xmlDependencies: ['/website_slides/static/src/xml/website_slides_unsubscribe.xml'], events: { 'click': '_onUnsubscribeClick', }, diff --git a/addons/website_slides/static/src/js/slides_slide_archive.js b/addons/website_slides/static/src/js/slides_slide_archive.js index 22c34095105..dfd4a49b58c 100644 --- a/addons/website_slides/static/src/js/slides_slide_archive.js +++ b/addons/website_slides/static/src/js/slides_slide_archive.js @@ -70,7 +70,6 @@ var SlideArchiveDialog = Dialog.extend({ publicWidget.registry.websiteSlidesSlideArchive = publicWidget.Widget.extend({ selector: '.o_wslides_js_slide_archive', - xmlDependencies: ['/website_slides/static/src/xml/slide_management.xml'], events: { 'click': '_onArchiveSlideClick', }, diff --git a/addons/website_slides/static/src/js/slides_slide_toggle_is_preview.js b/addons/website_slides/static/src/js/slides_slide_toggle_is_preview.js index ad44013a92d..3d775d66a46 100644 --- a/addons/website_slides/static/src/js/slides_slide_toggle_is_preview.js +++ b/addons/website_slides/static/src/js/slides_slide_toggle_is_preview.js @@ -4,7 +4,6 @@ publicWidget.registry.websiteSlidesSlideToggleIsPreview = publicWidget.Widget.extend({ selector: '.o_wslides_js_slide_toggle_is_preview', - xmlDependencies: ['/website_slides/static/src/xml/slide_management.xml'], events: { 'click': '_onPreviewSlideClick', }, diff --git a/addons/website_slides/static/src/js/slides_upload.js b/addons/website_slides/static/src/js/slides_upload.js index a0d9556e8f9..efe3b7ae286 100644 --- a/addons/website_slides/static/src/js/slides_upload.js +++ b/addons/website_slides/static/src/js/slides_upload.js @@ -750,7 +750,6 @@ var SlideUploadDialog = Dialog.extend({ publicWidget.registry.websiteSlidesUpload = publicWidget.Widget.extend({ selector: '.o_wslides_js_slide_upload', - xmlDependencies: ['/website_slides/static/src/xml/website_slides_upload.xml'], events: { 'click': '_onUploadClick', }, diff --git a/addons/website_slides_survey/__manifest__.py b/addons/website_slides_survey/__manifest__.py index 94f19c2ba0b..eef19b7e9d4 100644 --- a/addons/website_slides_survey/__manifest__.py +++ b/addons/website_slides_survey/__manifest__.py @@ -37,6 +37,8 @@ 'website_slides_survey/static/src/scss/website_slides_survey.scss', 'website_slides_survey/static/src/js/slides_upload.js', 'website_slides_survey/static/src/js/slides_course_fullscreen_player.js', + 'website_slides_survey/static/src/xml/website_slide_upload.xml', + 'website_slides_survey/static/src/xml/website_slides_fullscreen.xml', ], 'survey.survey_assets': [ 'website_slides_survey/static/src/scss/website_slides_survey_result.scss', diff --git a/addons/website_slides_survey/static/src/js/slides_course_fullscreen_player.js b/addons/website_slides_survey/static/src/js/slides_course_fullscreen_player.js index 05d6e7d89a0..85640a2b574 100644 --- a/addons/website_slides_survey/static/src/js/slides_course_fullscreen_player.js +++ b/addons/website_slides_survey/static/src/js/slides_course_fullscreen_player.js @@ -6,10 +6,6 @@ var QWeb = core.qweb; var Fullscreen = require('@website_slides/js/slides_course_fullscreen_player')[Symbol.for("default")]; Fullscreen.include({ - xmlDependencies: (Fullscreen.prototype.xmlDependencies || []).concat( - ["/website_slides_survey/static/src/xml/website_slides_fullscreen.xml"] - ), - /** * Extend the _renderSlide method so that slides of category "certification" * are also taken into account and rendered correctly diff --git a/addons/website_slides_survey/static/src/js/slides_upload.js b/addons/website_slides_survey/static/src/js/slides_upload.js index 21e7dfcae42..23b64345a0c 100644 --- a/addons/website_slides_survey/static/src/js/slides_upload.js +++ b/addons/website_slides_survey/static/src/js/slides_upload.js @@ -123,10 +123,4 @@ SlidesUpload.SlideUploadDialog.include({ }, }); -SlidesUpload.websiteSlidesUpload.include({ - xmlDependencies: (SlidesUpload.websiteSlidesUpload.prototype.xmlDependencies || []).concat( - ["/website_slides_survey/static/src/xml/website_slide_upload.xml"] - ), -}); - }); diff --git a/addons/website_twitter/__manifest__.py b/addons/website_twitter/__manifest__.py index b63549c1114..75c01481c35 100644 --- a/addons/website_twitter/__manifest__.py +++ b/addons/website_twitter/__manifest__.py @@ -21,6 +21,7 @@ This module adds a Twitter scroller building block to the website builder, so th 'web.assets_frontend': [ 'website_twitter/static/src/scss/website_twitter.scss', 'website_twitter/static/src/js/website.twitter.animation.js', + 'website_twitter/static/src/xml/website.twitter.xml', ], 'website.assets_wysiwyg': [ 'website_twitter/static/src/js/website.twitter.editor.js', diff --git a/addons/website_twitter/static/src/js/website.twitter.animation.js b/addons/website_twitter/static/src/js/website.twitter.animation.js index f511e6a07eb..6da5573f788 100644 --- a/addons/website_twitter/static/src/js/website.twitter.animation.js +++ b/addons/website_twitter/static/src/js/website.twitter.animation.js @@ -9,7 +9,6 @@ var qweb = core.qweb; publicWidget.registry.twitter = publicWidget.Widget.extend({ selector: '.twitter', - xmlDependencies: ['/website_twitter/static/src/xml/website.twitter.xml'], disabledInEditableMode: false, events: { 'mouseenter .wrap-row': '_onEnterRow', diff --git a/odoo/addons/test_assetsbundle/__manifest__.py b/odoo/addons/test_assetsbundle/__manifest__.py index 495b3727e92..470d0ad2f49 100644 --- a/odoo/addons/test_assetsbundle/__manifest__.py +++ b/odoo/addons/test_assetsbundle/__manifest__.py @@ -56,9 +56,6 @@ ('include', 'test_assetsbundle.manifest4'), ], 'test_assetsbundle.manifest_multi_module1': [], - 'web.qunit_suite_tests': [ - 'test_assetsbundle/static/tests/lazyloading_test.js' - ], 'test_assetsbundle.lazy_test_component': [ 'test_assetsbundle/static/tests/lazy_test_component/**/*', ], diff --git a/odoo/addons/test_translation_import/__manifest__.py b/odoo/addons/test_translation_import/__manifest__.py index 48c9e8345d6..5a80ba01f7f 100644 --- a/odoo/addons/test_translation_import/__manifest__.py +++ b/odoo/addons/test_translation_import/__manifest__.py @@ -11,7 +11,7 @@ ], 'installable': True, 'assets': { - 'web.assets_qweb': [ + 'web.assets_backend': [ 'test_translation_import/static/src/xml/js_templates.xml', ], },