[REF] *: remove web.assets_common

*: auth_password_policy, bus, event, im_livechat, mail, mass_mailing,
mrp_subcontracting, point_of_sale, pos_self_order, project, stock,
survey, web, web_editor, web_tour, website, website_event,
website_forum, website_sale, website_slides, base

Historically, the web.assets_common bundle was used to contain assets
that were needed by both the frontend and the backend. In practice, this
caused a bunch of issues where people would add things in assets common
that were not needed by both, and it was also abused as a way to get
bootstrap working in unrelated places by only using that bundle's css.

Because of this, as a first step, the assets_common stop being used in
the frontend, but was left everywhere else.

This commit removes the bundle completely, and moves the files that used
to be in that bundle in the other bundles that need them, this will
allow those bundles to evolve independently going forward.

in im_livechat and mail, some of the unneeded legacy code was removed, this
allows us to avoind including all of the legacy code from web in the
livechat embed bundle and in the dicuss public bundle respectively.

closes odoo/odoo#132190

Related: odoo/enterprise#45884
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Samuel Degueldre
2023-08-24 15:11:05 +02:00
parent 901294601e
commit 6f95be6884
37 changed files with 426 additions and 269 deletions
+1 -7
View File
@@ -10,18 +10,12 @@
],
'assets': {
'web.assets_backend': [
'auth_password_policy/static/src/password_meter.js',
'auth_password_policy/static/src/password_field.js',
'auth_password_policy/static/src/password_field.xml',
'auth_password_policy/static/src/**/*',
],
'web.assets_frontend': [
'auth_password_policy/static/src/css/password_field.css',
'auth_password_policy/static/src/password_policy.js',
],
'web.assets_common': [
'auth_password_policy/static/src/css/password_field.css',
'auth_password_policy/static/src/password_policy.js',
],
},
'license': 'LGPL-3',
}
+1 -1
View File
@@ -10,7 +10,7 @@
'installable': True,
'auto_install': True,
'assets': {
'web.assets_common': [
'web.assets_backend': [
'bus/static/src/*.js',
'bus/static/src/services/**/*.js',
'bus/static/src/workers/websocket_worker.js',
@@ -2,17 +2,11 @@
import { browser } from "@web/core/browser/browser";
import { registry } from "@web/core/registry";
import core from "@web/legacy/js/services/core";
export const presenceService = {
start(env) {
const LOCAL_STORAGE_PREFIX = "presence";
// map window_focus event from the wowlBus to the legacy one.
env.bus.addEventListener("window_focus", (isOdooFocused) => {
core.bus.trigger("window_focus", isOdooFocused);
});
let isOdooFocused = true;
let lastPresenceTime =
browser.localStorage.getItem(`${LOCAL_STORAGE_PREFIX}.lastPresence`) ||
+2 -10
View File
@@ -15,16 +15,8 @@ class BusWebTests(odoo.tests.HttpCase):
- The interface deals with those bus messages by displaying one notification
"""
db_name = self.env.registry.db_name
bundle_xml_ids = ('web.assets_common', 'web.assets_backend')
domain = []
for bundle in bundle_xml_ids:
domain = expression.OR([
domain,
[('name', 'ilike', bundle + '%')]
])
# start from a clean slate
self.env['ir.attachment'].search(domain).unlink()
self.env['ir.attachment'].search([('name', 'ilike', 'web.assets_backend%')]).unlink()
self.env.registry.clear_cache()
sendones = []
@@ -42,7 +34,7 @@ class BusWebTests(odoo.tests.HttpCase):
# One sendone for each asset bundle and for each CSS / JS
self.assertEqual(
len(sendones),
4,
2,
'Received %s' % '\n'.join('%s - %s' % (tmp[0], tmp[1]) for tmp in sendones)
)
for (channel, message) in sendones:
-2
View File
@@ -51,8 +51,6 @@ Key Features
'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_frontend': [
+12 -10
View File
@@ -107,29 +107,31 @@ Help your customers with this chat, and analyse their feedback.
('remove', 'im_livechat/static/src/embed/external/**/*'),
],
'im_livechat.assets_embed': [
'web/static/lib/jquery/jquery.js',
'web/static/src/libs/fontawesome/css/font-awesome.css',
'im_livechat/static/src/embed/scss/bootstrap_overridden.scss',
('include', 'web._assets_helpers'),
('include', 'web._assets_backend_helpers'),
('include', 'web.assets_common'),
'web/static/src/scss/pre_variables.scss',
'web/static/lib/bootstrap/scss/_variables.scss',
('include', 'web._assets_bootstrap_backend'),
'web/static/src/scss/bootstrap_overridden.scss',
'web/static/src/webclient/webclient.scss',
'web/static/src/core/utils/transitions.scss',
'web/static/src/core/**/*',
'web/static/src/env.js',
('remove', 'web/static/src/legacy/js/common_env.js'),
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'),
('include', 'web._assets_core'),
'web/static/src/libs/pdfjs.js',
'web/static/src/views/fields/formatters.js',
'web/static/src/views/fields/file_handler.*',
'bus/static/src/bus_parameters_service.js',
('remove', 'bus/static/src/services/assets_watchdog_service.js'),
('remove', 'bus/static/src/simple_notification_service.js'),
'bus/static/src/*.js',
'bus/static/src/services/**/*.js',
('remove', 'bus/static/src/services/legacy/**/*'),
'bus/static/src/workers/websocket_worker.js',
'bus/static/src/workers/websocket_worker_utils.js',
('include', 'im_livechat.assets_core'),
'im_livechat/static/src/embed/external/**/*',
],
'im_livechat.embed_test_assets': [
('include', 'web.assets_backend'),
('include', 'web.assets_backend_tests'),
('include', 'web.tests_assets'),
('remove', 'web/static/tests/mock_server_tests.js'),
('remove', 'im_livechat/static/**'),
@@ -1,6 +0,0 @@
/* @odoo-module alias=web.session */
import Session from "@web/legacy/js/core/session";
import { serverUrl } from "@im_livechat/embed/livechat_data";
export default new Session(undefined, serverUrl, { use_cors: true });
@@ -11,8 +11,6 @@
<t t-set="info" t-value="{ 'available': True, 'server_url': server_url }"/>
</t>
</script>
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="web.tests_assets_common" t-css="false"/>
<t t-call-assets="im_livechat.embed_test_assets"/>
<t t-call-assets="im_livechat.qunit_embed_suite"/>
</t>
+17 -11
View File
@@ -147,6 +147,10 @@ For more specific needs, you may also assign custom-defined actions
'mail/static/src/**/*.dark.scss',
],
'mail.assets_discuss_public_test_tours': [
'web_tour/static/src/tour_pointer/**/*',
# scss not needed in tests and depends on scss variables that are not in this bundle
('remove', 'web_tour/static/src/tour_pointer/**/*.scss'),
'web_tour/static/src/tour_service/**/*',
'web/static/tests/legacy/helpers/test_utils_file.js',
'mail/static/tests/tours/discuss_public_tour.js',
'mail/static/tests/tours/discuss_channel_as_guest_tour.js',
@@ -166,26 +170,28 @@ For more specific needs, you may also assign custom-defined actions
'mail/static/lib/lame/lame.js',
],
'mail.assets_public': [
'web/static/lib/jquery/jquery.js',
'web/static/src/libs/fontawesome/css/font-awesome.css',
('include', 'web._assets_helpers'),
('include', 'web._assets_backend_helpers'),
('include', 'web.assets_common'),
'web/static/src/scss/pre_variables.scss',
'web/static/lib/bootstrap/scss/_variables.scss',
('include', 'web._assets_bootstrap_backend'),
'web/static/src/scss/bootstrap_overridden.scss',
'web/static/src/webclient/webclient.scss',
'web/static/src/core/utils/transitions.scss', # included early because used by other files
'web/static/src/core/**/*',
'web/static/src/env.js',
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'),
'web/static/src/scss/mimetypes.scss',
('include', 'web._assets_core'),
'web/static/src/libs/pdfjs.js',
'web/static/src/views/fields/formatters.js',
'web/static/src/views/fields/file_handler.*',
'web/static/src/legacy/js/core/misc.js',
'web/static/src/legacy/js/env.js',
'web/static/src/legacy/js/owl_compatibility.js',
'web/static/src/legacy/js/services/session.js',
'web/static/src/legacy/utils.js',
'bus/static/src/*.js',
'bus/static/src/services/**/*.js',
('remove', 'bus/static/src/services/legacy/**/*'),
'bus/static/src/workers/websocket_worker.js',
'bus/static/src/workers/websocket_worker_utils.js',
'mail/static/src/core/common/**/*',
# 'mail/static/src/core/public/**/*',
'mail/static/src/**/common/**/*',
'mail/static/src/**/public/**/*',
('remove', 'mail/static/src/**/*.dark.scss'),
@@ -3,7 +3,7 @@
import { Component, onWillUpdateProps, useEffect, useRef, useState } from "@odoo/owl";
import { useService } from "@web/core/utils/hooks";
import { hidePDFJSButtons } from "@web/legacy/js/libs/pdfjs";
import { hidePDFJSButtons } from "@web/libs/pdfjs";
/**
* @typedef {Object} Props
@@ -3,16 +3,12 @@
import { DiscussPublic } from "@mail/discuss/core/public/discuss_public";
import { data } from "mail.discuss_public_template";
import { Component, mount, whenReady } from "@odoo/owl";
import { mount, whenReady } from "@odoo/owl";
import { templates } from "@web/core/assets";
import { MainComponentsContainer } from "@web/core/main_components_container";
import { registry } from "@web/core/registry";
import { makeEnv, startServices } from "@web/env";
import { mapLegacyEnvToWowlEnv } from "@web/legacy/utils";
import legacyEnv from "@web/legacy/js/env";
Component.env = legacyEnv;
(async function boot() {
await whenReady();
@@ -26,7 +22,6 @@ Component.env = legacyEnv;
const env = makeEnv();
await startServices(env);
env.services["mail.store"].inPublicPage = true;
mapLegacyEnvToWowlEnv(Component.env, env);
odoo.isReady = true;
await mount(MainComponentsContainer, document.body, { env, templates, dev: env.debug });
})();
@@ -1,14 +0,0 @@
/* @odoo-module alias=root.widget */
/**
* This module exists so that web_tour can use it as the parent of the
* TourManager so it can get access to _trigger_up.
*/
// need to wait for owl.Component.env to be set by new/public/boot before
// we spawn the component adapter
import "@mail/discuss/core/public/boot";
import { Component } from "@odoo/owl";
import { standaloneAdapter } from "@web/legacy/js/owl_compatibility";
export default standaloneAdapter({ Component });
+1 -3
View File
@@ -117,6 +117,7 @@
'mass_mailing/static/src/js/mailing_mailing_view_form_full_width.js',
'mass_mailing/static/src/xml/mailing_filter_widget.xml',
'mass_mailing/static/src/xml/mass_mailing.xml',
'mass_mailing/static/src/js/tours/**/*',
],
'mass_mailing.assets_mail_themes': [
'mass_mailing/static/src/scss/themes/**/*',
@@ -137,9 +138,6 @@
'web_editor.assets_legacy_wysiwyg': [
'mass_mailing/static/src/js/snippets.editor.js',
],
'web.assets_common': [
'mass_mailing/static/src/js/tours/**/*',
],
'web.assets_frontend': [
'mass_mailing/static/src/js/tours/**/*',
],
+88 -4
View File
@@ -43,12 +43,100 @@
'web/static/src/scss/pre_variables.scss',
'web/static/lib/bootstrap/scss/_variables.scss',
'web/static/lib/jquery.ui/jquery-ui.css',
'web/static/src/libs/fontawesome/css/font-awesome.css',
'web/static/lib/odoo_ui_icons/*',
'web/static/lib/select2/select2.css',
'web/static/lib/select2-bootstrap-css/select2-bootstrap.css',
'web/static/src/webclient/navbar/navbar.scss',
'web/static/src/scss/animation.scss',
'web/static/src/core/colorpicker/colorpicker.scss',
'web/static/src/scss/mimetypes.scss',
'web/static/src/legacy/scss/ui.scss',
'web/static/src/legacy/scss/modal.scss',
'web/static/src/views/fields/translation_dialog.scss',
'web/static/src/legacy/scss/name_and_signature.scss',
'web/static/src/scss/fontawesome_overridden.scss',
'web/static/src/legacy/js/promise_extension.js',
'web/static/src/boot.js',
'web/static/src/session.js',
'web/static/src/legacy/js/core/cookie_utils.js',
'web/static/lib/moment/moment.js',
'web/static/lib/luxon/luxon.js',
'web/static/lib/owl/owl.js',
'web/static/lib/owl/odoo_module.js',
'web/static/src/owl2_compatibility/*.js',
'web/static/src/legacy/js/component_extension.js',
'web/static/src/legacy/legacy_component.js',
'web/static/lib/jquery/jquery.js',
'web/static/lib/jquery.ui/jquery-ui.js',
'web/static/lib/jquery/jquery.browser.js',
'web/static/lib/jquery.blockUI/jquery.blockUI.js',
'web/static/lib/jquery.hotkeys/jquery.hotkeys.js',
'web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js',
'web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js',
'web/static/lib/popper/popper.js',
'web/static/lib/bootstrap/js/dist/dom/data.js',
'web/static/lib/bootstrap/js/dist/dom/event-handler.js',
'web/static/lib/bootstrap/js/dist/dom/manipulator.js',
'web/static/lib/bootstrap/js/dist/dom/selector-engine.js',
'web/static/lib/bootstrap/js/dist/base-component.js',
'web/static/lib/bootstrap/js/dist/alert.js',
'web/static/lib/bootstrap/js/dist/button.js',
'web/static/lib/bootstrap/js/dist/carousel.js',
'web/static/lib/bootstrap/js/dist/collapse.js',
'web/static/lib/bootstrap/js/dist/dropdown.js',
'web/static/lib/bootstrap/js/dist/modal.js',
'web/static/lib/bootstrap/js/dist/offcanvas.js',
'web/static/lib/bootstrap/js/dist/tooltip.js',
'web/static/lib/bootstrap/js/dist/popover.js',
'web/static/lib/bootstrap/js/dist/scrollspy.js',
'web/static/lib/bootstrap/js/dist/tab.js',
'web/static/lib/bootstrap/js/dist/toast.js',
'web/static/lib/select2/select2.js',
'web/static/lib/clipboard/clipboard.js',
'web/static/lib/jSignature/jSignatureCustom.js',
'web/static/src/legacy/js/libs/autocomplete.js',
'web/static/src/legacy/js/libs/bootstrap.js',
'web/static/src/legacy/js/libs/content-disposition.js',
'web/static/src/legacy/js/libs/download.js',
'web/static/src/legacy/js/libs/jquery.js',
'web/static/src/legacy/js/libs/moment.js',
'web/static/src/legacy/js/libs/jSignatureCustom.js',
'web/static/src/legacy/js/core/ajax.js',
'web/static/src/legacy/js/core/bus.js',
'web/static/src/legacy/js/core/class.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/dom.js',
'web/static/src/legacy/js/core/local_storage.js',
'web/static/src/legacy/js/core/mixins.js',
'web/static/src/legacy/js/core/ram_storage.js',
'web/static/src/legacy/js/core/registry.js',
'web/static/src/legacy/js/core/rpc.js',
'web/static/src/legacy/js/core/service_mixins.js',
'web/static/src/legacy/js/core/session.js',
'web/static/src/legacy/js/core/session_storage.js',
'web/static/src/legacy/js/core/time.js',
'web/static/src/legacy/js/core/translation.js',
'web/static/src/legacy/js/core/utils.js',
'web/static/src/legacy/js/core/widget.js',
'web/static/src/legacy/js/services/config.js',
'web/static/src/legacy/js/services/core.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',
('include', 'web._assets_bootstrap'),
'base/static/src/css/modules.css',
'web/static/src/core/utils/transitions.scss',
'web/static/src/core/**/*',
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'),
'web/static/src/search/**/*',
'web/static/src/views/*.js',
'web/static/src/views/*.xml',
@@ -63,7 +151,6 @@
'web/static/src/views/view_dialogs/**/*',
'web/static/src/views/widgets/**/*',
'web/static/src/webclient/**/*',
('remove', 'web/static/src/webclient/navbar/navbar.scss'), # already in assets_common
('remove', 'web/static/src/webclient/clickbot/clickbot.js'), # lazy loaded
('remove', 'web/static/src/views/form/button_box/*.scss'),
@@ -77,8 +164,6 @@
'web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js',
'web/static/src/legacy/scss/fields.scss',
'web/static/src/legacy/scss/form_view.scss',
'web/static/src/legacy/scss/list_view.scss',
'base/static/src/scss/res_partner.scss',
@@ -103,7 +188,6 @@
'mrp_subcontracting/static/src/subcontracting_portal/*',
'web/static/src/start.js',
'web/static/src/legacy/legacy_setup.js',
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'),
],
},
'uninstall_hook': 'uninstall_hook',
@@ -72,10 +72,7 @@
odoo.__session_info__ = <t t-out="json.dumps(session_info)"/>;
</script>
<base target="_parent"/>
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="web.assets_backend" t-js="false"/>
<t t-call-assets="web.assets_common" t-css="false"/>
<t t-call-assets="mrp_subcontracting.webclient" t-css="false"/>
<t t-call-assets="mrp_subcontracting.webclient"/>
<t t-call="web.conditional_assets_tests"/>
</t>
<t t-set="head" t-value="head_subcontracting_portal + (head or '')"/>
+1 -9
View File
@@ -104,12 +104,7 @@
# JS framework
'web/static/src/boot.js',
'web/static/src/session.js',
'web/static/src/env.js',
'web/static/src/core/utils/transitions.scss', # needs to be loaded before other scss files
'web/static/src/core/**/*',
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'),
('include', 'web._assets_core'),
('remove', 'web/static/src/core/errors/error_handlers.js'), # error handling in PoS is different from the webclient
# formatMonetary
'web/static/src/views/fields/formatters.js',
@@ -132,9 +127,6 @@
'web/static/src/webclient/actions/reports/utils.js',
# libs
'point_of_sale/static/lib/**/*',
'web/static/lib/luxon/luxon.js',
'web/static/lib/owl/owl.js',
'web/static/lib/owl/odoo_module.js',
'web_editor/static/lib/html2canvas.js',
'web/static/lib/zxing-library/zxing-library.js',
# PoS files
+1 -9
View File
@@ -31,17 +31,9 @@
"web/static/lib/bootstrap/scss/_variables.scss",
("include", "web._assets_bootstrap"),
("include", "web._assets_bootstrap_backend"),
"web/static/src/boot.js",
"web/static/src/env.js",
"web/static/src/session.js",
"web/static/src/core/utils/transitions.scss",
"web/static/src/core/**/*",
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'),
('include', 'web._assets_core'),
("remove", "web/static/src/core/browser/router_service.js"),
("remove", "web/static/src/core/debug/**/*"),
"web/static/lib/owl/owl.js",
"web/static/lib/owl/odoo_module.js",
"web/static/lib/luxon/luxon.js",
"web/static/src/views/fields/formatters.js",
"web/static/src/libs/fontawesome/css/font-awesome.css",
"web/static/lib/odoo_ui_icons/*",
+93 -1
View File
@@ -94,6 +94,92 @@
'web/static/src/scss/pre_variables.scss',
'web/static/lib/bootstrap/scss/_variables.scss',
'web/static/lib/jquery.ui/jquery-ui.css',
'web/static/src/libs/fontawesome/css/font-awesome.css',
'web/static/lib/odoo_ui_icons/*',
'web/static/lib/select2/select2.css',
'web/static/lib/select2-bootstrap-css/select2-bootstrap.css',
'web/static/src/webclient/navbar/navbar.scss',
'web/static/src/scss/animation.scss',
'web/static/src/core/colorpicker/colorpicker.scss',
'web/static/src/scss/mimetypes.scss',
'web/static/src/legacy/scss/ui.scss',
'web/static/src/legacy/scss/modal.scss',
'web/static/src/views/fields/translation_dialog.scss',
'web/static/src/legacy/scss/name_and_signature.scss',
'web/static/src/scss/fontawesome_overridden.scss',
'web/static/src/legacy/js/promise_extension.js',
'web/static/src/boot.js',
'web/static/src/session.js',
'web/static/src/legacy/js/core/cookie_utils.js',
'web/static/lib/moment/moment.js',
'web/static/lib/luxon/luxon.js',
'web/static/lib/owl/owl.js',
'web/static/lib/owl/odoo_module.js',
'web/static/src/owl2_compatibility/*.js',
'web/static/src/legacy/js/component_extension.js',
'web/static/src/legacy/legacy_component.js',
'web/static/lib/jquery/jquery.js',
'web/static/lib/jquery.ui/jquery-ui.js',
'web/static/lib/jquery/jquery.browser.js',
'web/static/lib/jquery.blockUI/jquery.blockUI.js',
'web/static/lib/jquery.hotkeys/jquery.hotkeys.js',
'web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js',
'web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js',
'web/static/lib/popper/popper.js',
'web/static/lib/bootstrap/js/dist/dom/data.js',
'web/static/lib/bootstrap/js/dist/dom/event-handler.js',
'web/static/lib/bootstrap/js/dist/dom/manipulator.js',
'web/static/lib/bootstrap/js/dist/dom/selector-engine.js',
'web/static/lib/bootstrap/js/dist/base-component.js',
'web/static/lib/bootstrap/js/dist/alert.js',
'web/static/lib/bootstrap/js/dist/button.js',
'web/static/lib/bootstrap/js/dist/carousel.js',
'web/static/lib/bootstrap/js/dist/collapse.js',
'web/static/lib/bootstrap/js/dist/dropdown.js',
'web/static/lib/bootstrap/js/dist/modal.js',
'web/static/lib/bootstrap/js/dist/offcanvas.js',
'web/static/lib/bootstrap/js/dist/tooltip.js',
'web/static/lib/bootstrap/js/dist/popover.js',
'web/static/lib/bootstrap/js/dist/scrollspy.js',
'web/static/lib/bootstrap/js/dist/tab.js',
'web/static/lib/bootstrap/js/dist/toast.js',
'web/static/lib/select2/select2.js',
'web/static/lib/clipboard/clipboard.js',
'web/static/lib/jSignature/jSignatureCustom.js',
'web/static/src/legacy/js/libs/autocomplete.js',
'web/static/src/legacy/js/libs/bootstrap.js',
'web/static/src/legacy/js/libs/content-disposition.js',
'web/static/src/legacy/js/libs/download.js',
'web/static/src/legacy/js/libs/jquery.js',
'web/static/src/legacy/js/libs/moment.js',
'web/static/src/legacy/js/libs/jSignatureCustom.js',
'web/static/src/legacy/js/core/ajax.js',
'web/static/src/legacy/js/core/bus.js',
'web/static/src/legacy/js/core/class.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/dom.js',
'web/static/src/legacy/js/core/local_storage.js',
'web/static/src/legacy/js/core/mixins.js',
'web/static/src/legacy/js/core/ram_storage.js',
'web/static/src/legacy/js/core/registry.js',
'web/static/src/legacy/js/core/rpc.js',
'web/static/src/legacy/js/core/service_mixins.js',
'web/static/src/legacy/js/core/session.js',
'web/static/src/legacy/js/core/session_storage.js',
'web/static/src/legacy/js/core/time.js',
'web/static/src/legacy/js/core/translation.js',
'web/static/src/legacy/js/core/utils.js',
'web/static/src/legacy/js/core/widget.js',
'web/static/src/legacy/js/services/config.js',
'web/static/src/legacy/js/services/core.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',
('include', 'web._assets_bootstrap_backend'),
'base/static/src/css/modules.css',
@@ -115,7 +201,6 @@
'web/static/src/views/view_dialogs/**/*',
'web/static/src/views/widgets/**/*',
'web/static/src/webclient/**/*',
('remove', 'web/static/src/webclient/navbar/navbar.scss'), # already in assets_common
('remove', 'web/static/src/webclient/clickbot/clickbot.js'), # lazy loaded
('remove', 'web/static/src/views/form/button_box/*.scss'),
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'),
@@ -151,6 +236,13 @@
'web/static/src/legacy/js/env.js',
'web/static/src/legacy/js/owl_compatibility.js',
'web_editor/static/src/js/editor/odoo-editor/src/base_style.scss',
'web_editor/static/lib/vkbeautify/**/*',
'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_editor/static/src/components/**/*',
'web_editor/static/src/scss/web_editor.common.scss',
'web_editor/static/src/scss/web_editor.backend.scss',
@@ -24,10 +24,7 @@
odoo.loadMenusPromise = Promise.resolve();
</script>
<base target="_parent"/>
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="project.webclient" t-js="false"/>
<t t-call-assets="web.assets_common" t-css="false"/>
<t t-call-assets="project.webclient" t-css="false"/>
<t t-call-assets="project.webclient"/>
<t t-call="web.conditional_assets_tests"/>
</t>
<t t-set="head" t-value="head_project_sharing + (head or '')"/>
-3
View File
@@ -100,9 +100,6 @@
'stock/static/src/scss/report_stock_reception.scss',
'stock/static/src/scss/report_stock_rule.scss',
],
'web.assets_common': [
'stock/static/src/scss/stock_traceability_report.scss',
],
'web.assets_backend': [
'stock/static/src/**/*.js',
'stock/static/src/**/*.xml',
+1 -3
View File
@@ -98,6 +98,7 @@ sent mails with personal token for the invitation of the survey.
'survey/static/src/scss/survey_survey_views.scss',
'survey/static/src/scss/survey_question_views.scss',
'survey/static/src/scss/survey_templates_results.scss',
'survey/static/src/js/tours/survey_tour.js',
],
"web.dark_mode_assets_backend": [
'survey/static/src/scss/*.dark.scss',
@@ -108,9 +109,6 @@ sent mails with personal token for the invitation of the survey.
'web.qunit_suite_tests': [
'survey/static/tests/components/*.js',
],
'web.assets_common': [
'survey/static/src/js/tours/survey_tour.js',
],
'web.assets_frontend': [
'survey/static/src/js/tours/survey_tour.js',
],
+28 -45
View File
@@ -36,21 +36,19 @@ This module provides the core of the Odoo Web Client.
# 3) an arbitrary name, relevant to the content of the bundle.
#
# Examples:
# > web.assets_common = assets common to backend clients and others
# (not frontend).
# > web_editor.assets_legacy_wysiwyg = assets needed by components defined in the "web_editor" module.
# Warning: Layouts using "assets_frontend" assets do not have the
# "assets_common" assets anymore. So, if it make sense, files added in
# "assets_common" should also be added in "assets_frontend".
# TODO in the future, probably remove "assets_common" definition
# entirely and let all "main" bundles evolve on their own, including the
# files they need in their bundle.
'web.assets_common': [
'web.assets_emoji': [
'web/static/src/core/emoji_picker/emoji_data.js'
],
'web.assets_backend': [
('include', 'web._assets_helpers'),
('include', 'web._assets_backend_helpers'),
'web/static/src/scss/pre_variables.scss',
'web/static/lib/bootstrap/scss/_variables.scss',
('include', 'web._assets_bootstrap_backend'),
('include', 'web._assets_core'),
'web/static/lib/jquery.ui/jquery-ui.css',
'web/static/src/libs/fontawesome/css/font-awesome.css',
@@ -61,22 +59,15 @@ This module provides the core of the Odoo Web Client.
'web/static/src/scss/animation.scss',
'web/static/src/scss/fontawesome_overridden.scss',
'web/static/src/scss/mimetypes.scss',
'web/static/src/core/colorpicker/colorpicker.scss',
'web/static/src/views/fields/translation_dialog.scss',
'web/static/src/legacy/scss/ui.scss',
'web/static/src/legacy/scss/modal.scss',
'web/static/src/legacy/scss/name_and_signature.scss',
'web/static/src/legacy/js/promise_extension.js',
'web/static/src/boot.js',
'web/static/src/session.js',
'web/static/src/legacy/js/core/cookie_utils.js',
'web/static/lib/moment/moment.js',
'web/static/lib/luxon/luxon.js',
'web/static/lib/owl/owl.js',
'web/static/lib/owl/odoo_module.js',
'web/static/src/owl2_compatibility/*.js',
'web/static/src/legacy/js/component_extension.js',
'web/static/src/legacy/legacy_component.js',
'web/static/lib/jquery/jquery.js',
@@ -113,7 +104,6 @@ This module provides the core of the Odoo Web Client.
'web/static/src/legacy/js/libs/download.js',
'web/static/src/legacy/js/libs/jquery.js',
'web/static/src/legacy/js/libs/moment.js',
'web/static/src/legacy/js/libs/pdfjs.js',
'web/static/src/legacy/js/libs/jSignatureCustom.js',
'web/static/src/legacy/js/core/ajax.js',
'web/static/src/legacy/js/core/bus.js',
@@ -139,40 +129,24 @@ This module provides the core of the Odoo Web Client.
'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.assets_emoji': [
'web/static/src/core/emoji_picker/emoji_data.js'
],
'web.assets_backend': [
('include', 'web._assets_helpers'),
('include', 'web._assets_backend_helpers'),
'web/static/src/scss/pre_variables.scss',
'web/static/lib/bootstrap/scss/_variables.scss',
('include', 'web._assets_bootstrap_backend'),
'base/static/src/css/modules.css',
'web/static/src/core/utils/transitions.scss',
'web/static/src/core/**/*',
'web/static/src/model/**/*',
'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
('remove', 'web/static/src/webclient/clickbot/clickbot.js'), # lazy loaded
('remove', 'web/static/src/views/form/button_box/*.scss'),
('remove', 'web/static/src/core/file_viewer/file_viewer.dark.scss'),
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'),
# 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',
'web/static/src/libs/pdfjs.js',
'web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js',
@@ -295,7 +269,6 @@ This module provides the core of the Odoo Web Client.
'web/static/src/legacy/js/libs/download.js',
'web/static/src/legacy/js/libs/jquery.js',
'web/static/src/legacy/js/libs/moment.js',
'web/static/src/legacy/js/libs/pdfjs.js',
'web/static/src/legacy/js/libs/jSignatureCustom.js',
'web/static/src/legacy/js/core/ajax.js',
'web/static/src/legacy/js/core/bus.js',
@@ -330,6 +303,7 @@ This module provides the core of the Odoo Web Client.
('remove', 'web/static/src/core/file_viewer/file_viewer.dark.scss'),
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'),
'web/static/src/public/error_notifications.js',
'web/static/src/libs/pdfjs.js',
'web/static/src/legacy/utils.js',
'web/static/src/legacy/js/core/dates.js',
@@ -425,10 +399,6 @@ This module provides the core of the Odoo Web Client.
# ---------------------------------------------------------------------
# COLOR SCHEME BUNDLES
# ---------------------------------------------------------------------
"web.dark_mode_assets_common": [
('include', 'web.assets_common'),
'web/static/src/core/file_viewer/file_viewer.dark.scss',
],
"web.dark_mode_assets_backend": [
('include', 'web.assets_backend'),
'web/static/src/**/*.dark.scss',
@@ -443,10 +413,23 @@ This module provides the core of the Odoo Web Client.
# Their naming conventions are similar to those of the main bundles,
# with the addition of a prefixed underscore to reflect the "private"
# aspect.
#
# Examples:
# > web._assets_helpers = define assets needed in most main bundles
# Bare javascript essentials: module loader, core folder and core libs
'web._assets_core': [
# module loader
'web/static/src/boot.js',
# libs
'web/static/lib/luxon/luxon.js',
'web/static/lib/owl/owl.js',
'web/static/src/owl2_compatibility/*.js',
'web/static/lib/owl/odoo_module.js',
# core
'web/static/src/env.js',
'web/static/src/session.js',
'web/static/src/core/utils/transitions.scss',
'web/static/src/core/**/*',
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'), # always lazy-loaded
],
'web._assets_primary_variables': [
'web/static/src/scss/primary_variables.scss',
'web/static/src/**/*.variables.scss',
@@ -504,8 +487,8 @@ This module provides the core of the Odoo Web Client.
'web/static/tests/ignore_missing_deps_stop.js',
],
# remove this bundle alongside the owl2 compatibility layer
'web.tests_assets_common': [
('include', 'web.assets_common'),
'web.assets_backend_tests': [
('include', 'web.assets_backend'),
('after', 'web/static/src/owl2_compatibility/app.js', 'web/static/tests/owl2_compatibility_app.js'),
],
'web.tests_assets': [
@@ -1,66 +0,0 @@
/** @odoo-module **/
import config from '@web/legacy/js/services/config';
/**
* Until we have our own implementation of the /web/static/lib/pdfjs/web/viewer.{html,js,css}
* (currently based on Firefox), this method allows us to hide the buttons that we do not want:
* * "Open File"
* * "View Bookmark"
* * "Print" (Hidden on mobile device like Android, iOS, ...)
* * "Download" (Hidden on mobile device like Android, iOS, ...)
*
* @link https://mozilla.github.io/pdf.js/getting_started/
*
* @param {Element} rootElement
*/
export function hidePDFJSButtons(rootElement) {
const cssStyle = document.createElement("style");
cssStyle.rel = "stylesheet";
cssStyle.innerHTML = `button#secondaryOpenFile.secondaryToolbarButton, button#openFile.toolbarButton,
a#secondaryViewBookmark.secondaryToolbarButton, a#viewBookmark.toolbarButton {
display: none !important;
}`;
if (config.device.isMobileDevice) {
cssStyle.innerHTML = `${cssStyle.innerHTML}
button#secondaryDownload.secondaryToolbarButton, button#download.toolbarButton,
button#secondaryPrint.secondaryToolbarButton, button#print.toolbarButton{
display: none !important;
}`;
}
const iframe = rootElement.tagName === 'IFRAME' ? rootElement : rootElement.querySelector('iframe');
if (iframe) {
if (!iframe.dataset.hideButtons) {
iframe.dataset.hideButtons = 'true';
iframe.addEventListener('load', event => {
if (iframe.contentDocument && iframe.contentDocument.head) {
iframe.contentDocument.head.appendChild(cssStyle);
}
});
}
} else {
console.warn('No IFRAME found');
}
}
/*
* List of changes made in the library
* There is no changes to pdf.js in this section, but only a note about changes that has been done in /web/static/lib/pdfjs/.
*
* In the module account_invoice_extract, the code need to react to the 'pagerendered' event triggered by
* pdf.js. However in recent version of pdf.js, event are not visible outside of the library, except if the
* 'eventBusDispatchToDOM' has been set to true.
*
* We tried to set this option from outside of the library but without success, as our pdf viewer is in an iframe.
* There is no state of the iframe in which we can add an event listener to set the option.
* pdf.js has an event used to signal when we can set settings, called 'webviewerloaded'.
* This event is triggered in an EventListener attached to the 'DOMContentLoaded' event.
* So, to list options we had, we could:
* a) add an eventListener to the iframe document or window to react to 'webviewerloaded'. This doesn't work as
* document and windows are not the definitive ones and won't catche the event later.
* b) add an eventListener to the iframe to react to 'DOMContentLoaded', which doens't work too as our listener will be called
* after the pdf.js one.
*
* Finally the option was choosed to modify the default value of this option directly in pdf.js as no hook worked in the
* 'account_invoice_extract' module.
*/
+3 -4
View File
@@ -206,9 +206,8 @@ span.o_force_ltr {
color: #FFFFFF;
font-size: 1rem;
// Needed as the parent button could be using font-awesome.
// Can't be put to a BS variable here as we are in assets common (will be
// overridden for backend but left with 'sans-serif' for frontend to not
// have an useless frontend rule.
// Needed as the parent button could be using font-awesome. Can't be put to a BS variable here
// as this file will be included in both backend and frontend, and will be overridden for
// backend but left with 'sans-serif' for frontend to not have an useless frontend rule.
font-family: sans-serif;
}
+67
View File
@@ -0,0 +1,67 @@
/** @odoo-module **/
import { isMobileOS } from "@web/core/browser/feature_detection";
/**
* Until we have our own implementation of the /web/static/lib/pdfjs/web/viewer.{html,js,css}
* (currently based on Firefox), this method allows us to hide the buttons that we do not want:
* * "Open File"
* * "View Bookmark"
* * "Print" (Hidden on mobile device like Android, iOS, ...)
* * "Download" (Hidden on mobile device like Android, iOS, ...)
*
* @link https://mozilla.github.io/pdf.js/getting_started/
*
* @param {Element} rootElement
*/
export function hidePDFJSButtons(rootElement) {
const cssStyle = document.createElement("style");
cssStyle.rel = "stylesheet";
cssStyle.textContent = `button#secondaryOpenFile.secondaryToolbarButton, button#openFile.toolbarButton,
a#secondaryViewBookmark.secondaryToolbarButton, a#viewBookmark.toolbarButton {
display: none !important;
}`;
if (isMobileOS()) {
cssStyle.textContent = `${cssStyle.innerHTML}
button#secondaryDownload.secondaryToolbarButton, button#download.toolbarButton,
button#secondaryPrint.secondaryToolbarButton, button#print.toolbarButton{
display: none !important;
}`;
}
const iframe =
rootElement.tagName === "IFRAME" ? rootElement : rootElement.querySelector("iframe");
if (iframe) {
if (!iframe.dataset.hideButtons) {
iframe.dataset.hideButtons = "true";
iframe.addEventListener("load", (event) => {
if (iframe.contentDocument && iframe.contentDocument.head) {
iframe.contentDocument.head.appendChild(cssStyle);
}
});
}
} else {
console.warn("No IFRAME found");
}
}
/*
* List of changes made in the library
* There is no changes to pdf.js in this section, but only a note about changes that has been done in /web/static/lib/pdfjs/.
*
* In the module account_invoice_extract, the code need to react to the 'pagerendered' event triggered by
* pdf.js. However in recent version of pdf.js, event are not visible outside of the library, except if the
* 'eventBusDispatchToDOM' has been set to true.
*
* We tried to set this option from outside of the library but without success, as our pdf viewer is in an iframe.
* There is no state of the iframe in which we can add an event listener to set the option.
* pdf.js has an event used to signal when we can set settings, called 'webviewerloaded'.
* This event is triggered in an EventListener attached to the 'DOMContentLoaded' event.
* So, to list options we had, we could:
* a) add an eventListener to the iframe document or window to react to 'webviewerloaded'. This doesn't work as
* document and windows are not the definitive ones and won't catche the event later.
* b) add an eventListener to the iframe to react to 'DOMContentLoaded', which doens't work too as our listener will be called
* after the pdf.js one.
*
* Finally the option was choosed to modify the default value of this option directly in pdf.js as no hook worked in the
* 'account_invoice_extract' module.
*/
@@ -4,7 +4,7 @@
//------------------------------------------------------------------------------
// This variable must be defined here instead of bootstrap overridden files
// otherwise we will have deprecation messages for assets_common generation
// otherwise we will have deprecation messages during assets generation
$enable-deprecation-messages: false !default;
// Override color-contrast function to handle the alpha component of colors
@@ -11,7 +11,7 @@
type="file"
t-att-name="props.inputName"
t-ref="fileInput"
t-attf-class="o_input_file o_hidden {{ props.fileUploadClass or '' }}"
t-attf-class="o_input_file d-none {{ props.fileUploadClass or '' }}"
t-att-multiple="props.multiUpload ? 'multiple' : false" t-att-accept="props.acceptedFileExtensions or '*'"
t-on-change="onFileChange"
/>
+4 -14
View File
@@ -210,10 +210,7 @@
<t t-set="html_data" t-value="{'style': 'height: 100%;'}"/>
<t t-set="title">Web Tests</t>
<t t-set="head">
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="web.assets_backend" t-js="false"/>
<t t-call-assets="web.tests_assets_common" t-css="false"/>
<t t-call-assets="web.assets_backend" t-css="false"/>
<t t-call-assets="web.assets_backend_tests"/>
<t t-call="web.test_helpers"/>
@@ -232,10 +229,7 @@
<t t-set="head">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="web.assets_backend" t-js="false"/>
<t t-call-assets="web.tests_assets_common" t-css="false"/>
<t t-call-assets="web.assets_backend" t-css="false"/>
<t t-call-assets="web.assets_backend_tests"/>
<t t-call="web.test_helpers"/>
@@ -271,15 +265,11 @@
}
</script>
<t t-if="request.httprequest.cookies.get('color_scheme') == 'dark'">
<t t-call-assets="web.dark_mode_assets_common" t-js="false"/>
<t t-call-assets="web.dark_mode_assets_backend" t-js="false"/>
<t t-call-assets="web.dark_mode_assets_backend"/>
</t>
<t t-else="">
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="web.assets_backend" t-js="false"/>
<t t-call-assets="web.assets_backend"/>
</t>
<t t-call-assets="web.assets_common" t-css="false"/>
<t t-call-assets="web.assets_backend" t-css="false"/>
<t t-call-assets="web.assets_backend_prod_only" t-css="false"/>
<t t-call="web.conditional_assets_tests"/>
</t>
+93 -4
View File
@@ -28,7 +28,97 @@ Odoo Web Editor widget.
'web_editor/static/src/js/editor/smooth_scroll_on_drag.js',
],
'web_editor.wysiwyg_iframe_editor_assets': [
('include', 'web.assets_common'),
('include', 'web._assets_helpers'),
'web/static/src/scss/pre_variables.scss',
'web/static/lib/bootstrap/scss/_variables.scss',
'web/static/lib/jquery.ui/jquery-ui.css',
'web/static/src/libs/fontawesome/css/font-awesome.css',
'web/static/lib/odoo_ui_icons/*',
'web/static/lib/select2/select2.css',
'web/static/lib/select2-bootstrap-css/select2-bootstrap.css',
'web/static/src/webclient/navbar/navbar.scss',
'web/static/src/scss/animation.scss',
'web/static/src/core/colorpicker/colorpicker.scss',
'web/static/src/scss/mimetypes.scss',
'web/static/src/legacy/scss/ui.scss',
'web/static/src/legacy/scss/modal.scss',
'web/static/src/views/fields/translation_dialog.scss',
'web/static/src/legacy/scss/name_and_signature.scss',
'web/static/src/scss/fontawesome_overridden.scss',
'web/static/src/legacy/js/promise_extension.js',
'web/static/src/boot.js',
'web/static/src/session.js',
'web/static/src/legacy/js/core/cookie_utils.js',
'web/static/lib/moment/moment.js',
'web/static/lib/luxon/luxon.js',
'web/static/lib/owl/owl.js',
'web/static/lib/owl/odoo_module.js',
'web/static/src/owl2_compatibility/*.js',
'web/static/src/legacy/js/component_extension.js',
'web/static/src/legacy/legacy_component.js',
'web/static/lib/jquery/jquery.js',
'web/static/lib/jquery.ui/jquery-ui.js',
'web/static/lib/jquery/jquery.browser.js',
'web/static/lib/jquery.blockUI/jquery.blockUI.js',
'web/static/lib/jquery.hotkeys/jquery.hotkeys.js',
'web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js',
'web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js',
'web/static/lib/popper/popper.js',
'web/static/lib/bootstrap/js/dist/dom/data.js',
'web/static/lib/bootstrap/js/dist/dom/event-handler.js',
'web/static/lib/bootstrap/js/dist/dom/manipulator.js',
'web/static/lib/bootstrap/js/dist/dom/selector-engine.js',
'web/static/lib/bootstrap/js/dist/base-component.js',
'web/static/lib/bootstrap/js/dist/alert.js',
'web/static/lib/bootstrap/js/dist/button.js',
'web/static/lib/bootstrap/js/dist/carousel.js',
'web/static/lib/bootstrap/js/dist/collapse.js',
'web/static/lib/bootstrap/js/dist/dropdown.js',
'web/static/lib/bootstrap/js/dist/modal.js',
'web/static/lib/bootstrap/js/dist/offcanvas.js',
'web/static/lib/bootstrap/js/dist/tooltip.js',
'web/static/lib/bootstrap/js/dist/popover.js',
'web/static/lib/bootstrap/js/dist/scrollspy.js',
'web/static/lib/bootstrap/js/dist/tab.js',
'web/static/lib/bootstrap/js/dist/toast.js',
'web/static/lib/select2/select2.js',
'web/static/lib/clipboard/clipboard.js',
'web/static/lib/jSignature/jSignatureCustom.js',
'web/static/src/legacy/js/libs/autocomplete.js',
'web/static/src/legacy/js/libs/bootstrap.js',
'web/static/src/legacy/js/libs/content-disposition.js',
'web/static/src/legacy/js/libs/download.js',
'web/static/src/legacy/js/libs/jquery.js',
'web/static/src/legacy/js/libs/moment.js',
'web/static/src/legacy/js/libs/jSignatureCustom.js',
'web/static/src/legacy/js/core/ajax.js',
'web/static/src/legacy/js/core/bus.js',
'web/static/src/legacy/js/core/class.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/dom.js',
'web/static/src/legacy/js/core/local_storage.js',
'web/static/src/legacy/js/core/mixins.js',
'web/static/src/legacy/js/core/ram_storage.js',
'web/static/src/legacy/js/core/registry.js',
'web/static/src/legacy/js/core/rpc.js',
'web/static/src/legacy/js/core/service_mixins.js',
'web/static/src/legacy/js/core/session.js',
'web/static/src/legacy/js/core/session_storage.js',
'web/static/src/legacy/js/core/time.js',
'web/static/src/legacy/js/core/translation.js',
'web/static/src/legacy/js/core/utils.js',
'web/static/src/legacy/js/core/widget.js',
'web/static/src/legacy/js/services/config.js',
'web/static/src/legacy/js/services/core.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',
('include', 'web_editor.assets_wysiwyg'),
('include', 'web_editor.assets_legacy_wysiwyg'),
],
@@ -107,15 +197,14 @@ Odoo Web Editor widget.
'web_editor/static/src/xml/wysiwyg.xml',
'web_editor/static/src/xml/wysiwyg_colorpicker.xml',
],
'web.assets_common': [
'web.assets_backend': [
'web_editor/static/src/js/editor/odoo-editor/src/base_style.scss',
'web_editor/static/lib/vkbeautify/**/*',
'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'),
# TODO: remove when refactoring 'DatetimePickerUserValueWidget'
+1 -7
View File
@@ -17,14 +17,8 @@ Odoo Web tours.
'views/tour_views.xml'
],
'assets': {
'web.assets_common': [
'web_tour/static/src/tour_pointer/**/*',
'web_tour/static/src/tour_service/**/*',
],
'web.assets_backend': [
'web_tour/static/src/debug/debug_manager.js',
'web_tour/static/src/debug/tour_dialog_component.js',
'web_tour/static/src/debug/tour_dialog_component.xml',
'web_tour/static/src/**/*',
],
'web.assets_frontend': [
'web_tour/static/src/tour_pointer/**/*',
+1 -3
View File
@@ -173,6 +173,7 @@
'website/static/src/scss/website.backend.scss',
'website/static/src/scss/website_visitor_views.scss',
'website/static/src/js/backend/**/*',
'website/static/src/js/tours/tour_utils.js',
'website/static/src/client_actions/*/*',
('remove', 'website/static/src/client_actions/website_preview/website_preview_test_mode.js'),
'website/static/src/components/fields/*',
@@ -195,9 +196,6 @@
'website/static/src/client_actions/*/*.dark.scss',
'website/static/src/components/website_loader/website_loader.dark.scss'
],
'web.assets_common': [
'website/static/src/js/tours/tour_utils.js',
],
'web.qunit_suite_tests': [
'website/static/tests/redirect_field_tests.js',
],
+1 -1
View File
@@ -49,7 +49,7 @@
],
'application': True,
'assets': {
'web.assets_common': [
'web.assets_backend': [
'website_event/static/src/js/tours/**/*',
],
'web.assets_tests': [
+1 -1
View File
@@ -66,7 +66,7 @@ Ask questions, get answers, no distractions
'web.assets_tests': [
'website_forum/static/tests/**/*',
],
'web.assets_common': [
'web.assets_backend': [
'website_forum/static/src/js/tours/website_forum.js',
],
'web.assets_frontend': [
+1 -3
View File
@@ -87,6 +87,7 @@
'website_sale/static/src/scss/primary_variables.scss',
],
'web.assets_backend': [
'website_sale/static/src/js/tours/tour_utils.js',
'website_sale/static/src/js/website_sale_video_field_preview.js',
'website_sale/static/src/scss/website_sale_backend.scss',
'website_sale/static/src/js/tours/website_sale_shop.js',
@@ -104,9 +105,6 @@
'website_sale/static/src/js/components/wysiwyg_adapter/wysiwyg_adapter.js',
'website_sale/static/src/xml/website_sale_utils.xml',
],
'web.assets_common': [
'website_sale/static/src/js/tours/tour_utils.js',
],
'web.assets_tests': [
'website_sale/static/tests/**/*',
],
+1 -1
View File
@@ -196,7 +196,6 @@ Featuring
'web/static/src/legacy/js/libs/download.js',
'web/static/src/legacy/js/libs/jquery.js',
'web/static/src/legacy/js/libs/moment.js',
'web/static/src/legacy/js/libs/pdfjs.js',
'website/static/src/libs/zoomodoo/zoomodoo.js',
'web/static/src/legacy/js/libs/jSignatureCustom.js',
'web/static/src/legacy/js/core/ajax.js',
@@ -225,6 +224,7 @@ Featuring
'web/static/src/legacy/xml/name_and_signature.xml',
'web/static/src/core/**/*.js',
'web/static/src/env.js',
'web/static/src/libs/pdfjs.js',
'web/static/src/legacy/js/services/session.js',
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'),
@@ -9,7 +9,6 @@
<html>
<head>
<title><t t-esc="slide.name"/></title>
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="website_slides.slide_embed_assets"/>
</head>
<body>
+1 -1
View File
@@ -55,7 +55,7 @@ class AssetsBundle(object):
rx_preprocess_imports = re.compile("""(@import\s?['"]([^'"]+)['"](;?))""")
rx_css_split = re.compile("\/\*\! ([a-f0-9-]+) \*\/")
TRACKED_BUNDLES = ['web.assets_common', 'web.assets_backend']
TRACKED_BUNDLES = ['web.assets_backend']
def __init__(self, name, files, external_assets=(), env=None, css=True, js=True, debug_assets=False, rtl=False, assets_params=None):
"""