[IMP] base/web: XML templates are added into the asset bundles.

Before this pr, almost all templates are added to a fake asset/bundle `web.assets_qweb` containing almost all templates.
This mixes the feature, backend and frontend templates. There are other fake bundles. These could be loaded only after the javascript session is present (using rpc).
There is another way to read xml, via javascript it's the xmlDependencies attributes. Therefore the js is sometimes loaded in a specific bundle then the xml are loaded.

NB: There are inherited xml templates via `t-inherit` server side followed by a `t-extend` doing inheritance in Qweb JavaScript.

closes odoo/odoo#95500

Related: odoo/upgrade#3889
Related: odoo/enterprise#30609
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
This commit is contained in:
Odoo's Mergebot
2022-09-14 20:25:03 +02:00
committed by GitHub
283 changed files with 1376 additions and 2071 deletions
+1 -4
View File
@@ -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',
}
+1 -3
View File
@@ -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/**/*',
+1 -3
View File
@@ -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/**/*',
+1 -3
View File
@@ -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',
}
+2 -4
View File
@@ -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',
}
+2 -4
View File
@@ -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/**/*',
-2
View File
@@ -27,8 +27,6 @@
'assets': {
'web.assets_backend': [
'crm_iap_mine/static/src/js/**/*',
],
'web.assets_qweb': [
'crm_iap_mine/static/src/xml/**/*',
],
},
-2
View File
@@ -22,8 +22,6 @@
'assets': {
'web.assets_backend': [
'data_recycle/static/src/views/*.js',
],
'web.assets_qweb': [
'data_recycle/static/src/views/*.xml',
],
},
+1 -3
View File
@@ -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',
+1 -3
View File
@@ -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',
}
+1
View File
@@ -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',
@@ -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'));
}
+1 -5
View File
@@ -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': [
+1 -3
View File
@@ -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',
}
+1 -5
View File
@@ -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',
+3 -5
View File
@@ -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',
}
-2
View File
@@ -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',
],
},
+5 -7
View File
@@ -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',
}
@@ -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',
],
},
+1 -5
View File
@@ -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',
}
+2 -6
View File
@@ -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': [
-2
View File
@@ -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/**/*',
],
},
+1 -1
View File
@@ -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/**/*',
],
},
+2 -3
View File
@@ -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',
+1 -1
View File
@@ -19,7 +19,7 @@
'views/resource_calendar_views.xml',
],
'assets': {
'web.assets_qweb': [
'web.assets_backend': [
'hr_work_entry/static/**/*',
],
},
+1 -3
View File
@@ -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',
}
+2 -4
View File
@@ -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',
@@ -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);
};
@@ -11,7 +11,9 @@ export const publicLivechatService = {
return {
mountLivechatButton() {
const livechatButton = new LivechatButton(rootWidget, messaging);
livechatButton.appendTo(document.body);
livechatButton.appendTo(document.body).catch(error => {
console.info("Can't load 'LivechatButton' because:", error);
});
return livechatButton;
},
};
-2
View File
@@ -18,8 +18,6 @@
'assets': {
'point_of_sale.assets': [
'l10n_co_pos/static/src/js/**/*',
],
'web.assets_qweb': [
'l10n_co_pos/static/src/xml/**/*',
],
},
-2
View File
@@ -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/**/*',
],
},
+1 -3
View File
@@ -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,
-2
View File
@@ -18,8 +18,6 @@
'assets': {
'point_of_sale.assets': [
'l10n_in_pos/static/src/js/**/*',
],
'web.assets_qweb': [
'l10n_in_pos/static/src/xml/**/*',
],
},
+1 -3
View File
@@ -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,
-2
View File
@@ -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': [
+2 -7
View File
@@ -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',
}
+3 -5
View File
@@ -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',
}
-3
View File
@@ -3,7 +3,6 @@
import odoo
from odoo import models
from odoo.http import request
from odoo.addons.web.controllers.utils import HomeStaticTemplateHelpers
class IrHttp(models.AbstractModel):
@@ -14,8 +13,6 @@ class IrHttp(models.AbstractModel):
result = super(IrHttp, self).session_info()
if self.env.user._is_internal():
result['notification_type'] = user.notification_type
assets_discuss_public_hash = HomeStaticTemplateHelpers.get_qweb_templates_checksum(debug=request.session.debug, bundle='mail.assets_discuss_public')
result['cache_hashes']['assets_discuss_public'] = assets_discuss_public_hash
guest = self.env.context.get('guest')
if not request.session.uid and guest:
user_context = {'lang': guest.lang}
@@ -8,7 +8,6 @@ import { DiscussPublicViewContainer } from '@mail/components/discuss_public_view
import { PopoverManagerContainer } from '@mail/components/popover_manager_container/popover_manager_container';
import { messagingService } from '@mail/services/messaging_service';
import { processTemplates } from '@web/core/assets';
import { MainComponentsContainer } from '@web/core/main_components_container';
import { registry } from '@web/core/registry';
import { makeEnv, startServices } from '@web/env';
@@ -21,6 +20,7 @@ import {
mapLegacyEnvToWowlEnv,
} from '@web/legacy/utils';
import { session } from '@web/session';
import { templates } from '@web/core/assets';
import * as AbstractService from 'web.AbstractService';
import * as legacyEnv from 'web.env';
@@ -69,10 +69,7 @@ Component.env = legacyEnv;
isReady: false,
});
const env = makeEnv();
const [, templates] = await Promise.all([
startServices(env),
odoo.loadTemplatesPromise.then(processTemplates),
]);
await startServices(env);
mapLegacyEnvToWowlEnv(Component.env, env);
odoo.isReady = true;
await mount(MainComponentsContainer, document.body, { env, templates, dev: env.debug });
@@ -15,7 +15,6 @@
csrf_token: "<t t-out="request.csrf_token(None)"/>",
debug: "<t t-out="debug"/>",
};
odoo.loadTemplatesPromise = fetch(`/web/webclient/qweb/${odoo.__session_info__.cache_hashes.assets_discuss_public}?bundle=mail.assets_discuss_public`).then(doc => doc.text());
{
const { user_context, cache_hashes } = odoo.__session_info__;
fetch(`/web/webclient/translations/${cache_hashes.translations}?lang=${user_context.lang}`);
+2 -4
View File
@@ -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',
}
@@ -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',
@@ -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',
],
},
+1 -5
View File
@@ -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',
}
+2 -13
View File
@@ -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',
],
@@ -9,7 +9,6 @@ from odoo.http import request
from odoo.exceptions import AccessError, MissingError
from odoo.addons.portal.controllers import portal
from odoo.addons.portal.controllers.portal import pager as portal_pager
from odoo.addons.web.controllers.utils import HomeStaticTemplateHelpers
class CustomerPortal(portal.CustomerPortal):
@@ -91,11 +90,9 @@ class CustomerPortal(portal.CustomerPortal):
session_info = request.env['ir.http'].session_info()
user_context = dict(request.env.context) if request.session.uid else {}
mods = conf.server_wide_modules or []
qweb_checksum = HomeStaticTemplateHelpers.get_qweb_templates_checksum(debug=request.session.debug, bundle="mrp_subcontracting.assets_qweb")
lang = user_context.get("lang")
translation_hash = request.env['ir.translation'].get_web_translations_hash(mods, lang)
cache_hashes = {
"qweb": qweb_checksum,
"translations": translation_hash,
}
production_company = picking.company_id
@@ -70,7 +70,6 @@
<t t-set="head_subcontracting_portal">
<script type="text/javascript">
odoo.__session_info__ = <t t-out="json.dumps(session_info)"/>;
odoo.loadTemplatesPromise = fetch(`/web/webclient/qweb/${odoo.__session_info__.cache_hashes.qweb}?bundle=mrp_subcontracting.assets_qweb`).then(doc => doc.text());
</script>
<base target="_parent"/>
<t t-call-assets="web.assets_common" t-js="false"/>
+1 -4
View File
@@ -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',
}
+1 -3
View File
@@ -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',
}
+1
View File
@@ -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',
@@ -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,
@@ -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(
+2 -5
View File
@@ -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.
+1 -1
View File
@@ -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');
@@ -36,7 +36,6 @@
// Prevent the menu_service to load anything. In an ideal world, POS assets would only contain
// what is genuinely necessary, and not the whole backend.
odoo.loadMenusPromise = Promise.resolve();
odoo.loadTemplatesPromise = fetch(`/web/webclient/qweb/${odoo.__session_info__.cache_hashes.qweb}?bundle=web.assets_qweb`).then(doc => doc.text());
</script>
<t t-call="point_of_sale.assets_common"/>
+3 -4
View File
@@ -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',
}
+2 -4
View File
@@ -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 {
@@ -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',
@@ -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',
@@ -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',
},
+3
View File
@@ -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',
@@ -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
*/
@@ -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);
-2
View File
@@ -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/**/*',
],
},
-2
View File
@@ -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/**/*',
],
},
+1 -3
View File
@@ -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',
}
+1 -3
View File
@@ -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',
}
-2
View File
@@ -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/**/*',
],
},
+1 -3
View File
@@ -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',
}
-2
View File
@@ -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/**/*',
],
},
@@ -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/**/*'
]
},
-2
View File
@@ -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/**/*',
],
}
+1 -3
View File
@@ -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',
}
-2
View File
@@ -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/**/*',
],
},
+4 -9
View File
@@ -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',
-4
View File
@@ -12,8 +12,6 @@ from odoo.tools import groupby as groupbyelem
from odoo.osv.expression import OR, AND
from odoo.addons.web.controllers.utils import HomeStaticTemplateHelpers
class ProjectCustomerPortal(CustomerPortal):
@@ -135,7 +133,6 @@ class ProjectCustomerPortal(CustomerPortal):
session_info = request.env['ir.http'].session_info()
user_context = dict(request.env.context) if request.session.uid else {}
mods = conf.server_wide_modules or []
qweb_checksum = HomeStaticTemplateHelpers.get_qweb_templates_checksum(debug=request.session.debug, bundle="project.assets_qweb")
if request.env.lang:
lang = request.env.lang
session_info['user_context']['lang'] = lang
@@ -144,7 +141,6 @@ class ProjectCustomerPortal(CustomerPortal):
lang = user_context.get("lang")
translation_hash = request.env['ir.translation'].get_web_translations_hash(mods, lang)
cache_hashes = {
"qweb": qweb_checksum,
"translations": translation_hash,
}
@@ -21,7 +21,6 @@
// Prevent the menu_service to load anything. In an ideal world, Project Sharing assets would only contain
// what is genuinely necessary, and not the whole backend.
odoo.loadMenusPromise = Promise.resolve();
odoo.loadTemplatesPromise = fetch(`/web/webclient/qweb/${odoo.__session_info__.cache_hashes.qweb}?bundle=project.assets_qweb`).then(doc => doc.text());
</script>
<base target="_parent"/>
<t t-call-assets="web.assets_common" t-js="false"/>
+1 -3
View File
@@ -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',
}
@@ -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',
}),
@@ -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',
],
},
+1 -3
View File
@@ -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',
],
-3
View File
@@ -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',
}
+1 -3
View File
@@ -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',
-3
View File
@@ -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',
-2
View File
@@ -47,8 +47,6 @@ Preferences
'assets': {
'web.assets_backend': [
'sale_stock/static/src/js/**/*',
],
'web.assets_qweb': [
'sale_stock/static/src/xml/**/*',
],
},
+1 -3
View File
@@ -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',
+1 -5
View File
@@ -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',
}
+1 -3
View File
@@ -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',
}
+7 -6
View File
@@ -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/**/*',
@@ -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
+2 -2
View File
@@ -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,
});
@@ -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": [
@@ -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/**/*',
@@ -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/**/*',
@@ -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/**/*',
@@ -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/**/*',
+2 -6
View File
@@ -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',
}
@@ -50,7 +50,7 @@ const ReplenishReport = clientAction.extend({
return Promise.all([
this._super.apply(this, arguments),
loadWarehouses,
loadLegacyViews({ rpc: this._rpc.bind(this) }),
loadLegacyViews(),
]);
},
-2
View File
@@ -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',
],
},
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="InventoryReport.Buttons" owl="1">
<t t-jquery="button.o_button_at_date" t-operation="append">
<t t-inherit="stock.InventoryReport.Buttons" t-inherit-mode="extension" owl="1">
<xpath expr="//button[hasclass('o_button_at_date')]" position="inside">
<t t-if="props.resModel == 'stock.valuation.layer'">
Valuation at Date
</t>
</t>
</xpath>
</t>
</templates>

Some files were not shown because too many files have changed in this diff Show More