[IMP] *: Remove alias in JS files

Rename all imports with alias old system to the new js module system
Task ID: 3266759

closes odoo/odoo#127414

Related: odoo/design-themes#671
Related: odoo/enterprise#43716
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
This commit is contained in:
Bastien PIERRE
2023-07-27 11:58:34 +02:00
parent 714e254e7d
commit 65242e31e9
606 changed files with 1821 additions and 1787 deletions
@@ -1,9 +1,8 @@
/** @odoo-module */
import publicWidget from 'web.public.widget';
import "@portal/js/portal"; // force dependencies
import { PortalHomeCounters } from '@portal/js/portal';
publicWidget.registry.PortalHomeCounters.include({
PortalHomeCounters.include({
/**
* @override
*/
@@ -1,9 +1,9 @@
/** @odoo-module **/
import dom from "web.dom";
import publicWidget from "web.public.widget";
import PortalSidebar from "portal.PortalSidebar";
import utils from "web.utils";
import dom from "@web/legacy/js/core/dom";
import publicWidget from "@web/legacy/js/public/public_widget";
import PortalSidebar from "@portal/js/portal_sidebar";
import utils from "@web/legacy/js/core/utils";
publicWidget.registry.AccountPortalSidebar = PortalSidebar.extend({
selector: '.o_portal_invoice_sidebar',
@@ -1,10 +1,10 @@
/** @odoo-module alias=account.tour **/
/** @odoo-module **/
import core from "web.core";
import {Markup} from "web.utils";
import core from "@web/legacy/js/services/core";
import { Markup } from "@web/legacy/js/core/utils";
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";
import "web.legacy_tranlations_loaded";
import "@web/legacy/translations_loaded";
var _t = core._t;
@@ -1,9 +1,9 @@
/** @odoo-module alias=account.dashboard.setup.tour **/
/** @odoo-module **/
import core from "web.core";
import core from "@web/legacy/js/services/core";
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";
import "web.legacy_tranlations_loaded";
import "@web/legacy/translations_loaded";
var _t = core._t;
@@ -1,4 +1,4 @@
/** @odoo-module alias=account.tax.group.tour.tests */
/** @odoo-module */
"use strict";
import { registry } from "@web/core/registry";
@@ -1,7 +1,7 @@
/** @odoo-module **/
import checkoutForm from "payment.checkout_form";
import manageForm from "payment.manage_form";
import checkoutForm from "@payment/js/checkout_form";
import manageForm from "@payment/js/manage_form";
const PaymentMixin = {
@@ -12,7 +12,7 @@
/**
* Add `invoice_id` to the transaction route params if it is provided.
*
* @override method from payment.payment_form_mixin
* @override method from @payment/js/payment_form_mixin
* @private
* @param {string} code - The provider code of the selected payment option.
* @param {number} paymentOptionId - The id of the selected payment option.
@@ -1,7 +1,7 @@
/** @odoo-module */
import { _t } from "web.core";
import Widget from "web.Widget";
import { _t } from "@web/legacy/js/services/core";
import Widget from "@web/legacy/js/core/widget";
import { computeScore } from "@auth_password_policy/password_policy";
import { sprintf } from "@web/core/utils/strings";
import { translationIsReady } from "@web/core/l10n/translation";
+1 -1
View File
@@ -1,6 +1,6 @@
/** @odoo-module **/
import publicWidget from "web.public.widget";
import publicWidget from "@web/legacy/js/public/public_widget";
publicWidget.registry.SignUpForm = publicWidget.Widget.extend({
selector: '.oe_signup_form',
+1 -1
View File
@@ -1,6 +1,6 @@
/** @odoo-module **/
import ajax from "web.ajax";
import ajax from "@web/legacy/js/core/ajax";
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";
@@ -1,9 +1,9 @@
/** @odoo-module **/
import {_t} from "web.core";
import publicWidget from "web.public.widget";
import Dialog from "web.Dialog";
import {handleCheckIdentity} from "portal.security";
import {_t} from "@web/legacy/js/services/core";
import publicWidget from "@web/legacy/js/public/public_widget";
import Dialog from "@web/legacy/js/core/dialog";
import {handleCheckIdentity} from "@portal/js/portal_security";
/**
* Replaces specific <field> elements by normal HTML, strip out the rest entirely
@@ -1,6 +1,6 @@
/** @odoo-module **/
import ajax from "web.ajax";
import ajax from "@web/legacy/js/core/ajax";
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add('totportal_tour_setup', {
@@ -10,7 +10,7 @@
*/
import { registry } from "@web/core/registry";
import core from "web.core";
import core from "@web/legacy/js/services/core";
export const barcodeRemapperService = {
dependencies: ["barcode"],
@@ -4,7 +4,7 @@
import {barcodeRemapperService} from "@barcodes/js/barcode_events";
import { makeTestEnv } from "@web/../tests/helpers/mock_env";
import { registry } from "@web/core/registry";
import testUtils from "web.test_utils";
import testUtils from "@web/../tests/legacy/helpers/test_utils";
const maxTimeBetweenKeysInMs = barcodeService.maxTimeBetweenKeysInMs;
const isMobileChrome = barcodeService.isMobileChrome;
@@ -19,7 +19,7 @@ import {
import { createWebClient, doAction } from "@web/../tests/webclient/helpers";
import { browser } from "@web/core/browser/browser";
import { registry } from "@web/core/registry";
import testUtils from "web.test_utils";
import testUtils from "@web/../tests/legacy/helpers/test_utils";
import { makeFakeUserService } from "@web/../tests/helpers/mock_services";
const patchDate = testUtils.mock.patchDate;
@@ -2,7 +2,7 @@
import { browser } from "@web/core/browser/browser";
import { registry } from "@web/core/registry";
import core from "web.core";
import core from "@web/legacy/js/services/core";
export const presenceService = {
start(env) {
@@ -5,7 +5,7 @@ import { TEST_USER_IDS } from "@bus/../tests/helpers/test_constants";
import { registry } from "@web/core/registry";
import { registerCleanup } from "@web/../tests/helpers/cleanup";
import { makeMockServer } from "@web/../tests/helpers/mock_server";
import core from "web.core";
import core from "@web/legacy/js/services/core";
const modelDefinitionsPromise = new Promise((resolve) => {
QUnit.begin(() => resolve(getModelDefinitions()));
@@ -2,8 +2,8 @@
import { ActivityMenu } from "@mail/core/web/activity_menu";
import { patch } from "@web/core/utils/patch";
import fieldUtils from "web.field_utils";
import { getLangTimeFormat } from "web.time";
import fieldUtils from "@web/legacy/js/fields/field_utils";
import time from "@web/legacy/js/core/time";
patch(ActivityMenu.prototype, "calendar", {
async fetchSystrayActivities() {
@@ -16,7 +16,7 @@ patch(ActivityMenu.prototype, "calendar", {
fieldUtils.parse.datetime(meeting.start, false, { isUTC: true })
)
.local()
.format(getLangTimeFormat());
.format(time.getLangTimeFormat());
}
}
}
@@ -6,7 +6,7 @@ import '@mail/../tests/helpers/mock_server/models/res_users';
import { patch } from '@web/core/utils/patch';
import { MockServer } from '@web/../tests/helpers/mock_server';
import { datetime_to_str } from 'web.time';
import { datetime_to_str } from '@web/legacy/js/core/time';
patch(MockServer.prototype, 'calendar/models/res_users', {
/**
+3 -3
View File
@@ -1,8 +1,8 @@
/** @odoo-module **/
import { _t } from 'web.core';
import "web.legacy_tranlations_loaded";
import { Markup } from 'web.utils';
import { _t } from "@web/legacy/js/services/core";
import "@web/legacy/translations_loaded";
import { Markup } from "@web/legacy/js/core/utils";
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";
@@ -9,7 +9,7 @@ import {
} from "@web/../tests/search/helpers";
import { makeView, setupViewRegistries } from "@web/../tests/views/helpers";
import { registry } from "@web/core/registry";
import { mock } from "web.test_utils";
import { mock } from "@web/../tests/legacy/helpers/test_utils";
import { browser } from "@web/core/browser/browser";
import { fakeCookieService } from "@web/../tests/helpers/mock_services";
@@ -1,9 +1,9 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
import { Markup } from "web.utils";
import core from "web.core";
import "web.legacy_tranlations_loaded";
import { Markup } from "@web/legacy/js/core/utils";
import core from "@web/legacy/js/services/core";
import "@web/legacy/translations_loaded";
import "@crm/js/tours/crm";
import { patch } from "@web/core/utils/patch";
@@ -1,6 +1,6 @@
/** @odoo-module alias=event.event_steps **/
/** @odoo-module **/
import core from "web.core";
import core from "@web/legacy/js/services/core";
var EventAdditionalTourSteps = core.Class.extend({
@@ -1,12 +1,12 @@
/** @odoo-module **/
import {_t} from "web.core";
import {Markup} from "web.utils";
import {_t} from "@web/legacy/js/services/core";
import { Markup } from "@web/legacy/js/core/utils";
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";
import "web.legacy_tranlations_loaded";
import "@web/legacy/translations_loaded";
import EventAdditionalTourSteps from "event.event_steps";
import EventAdditionalTourSteps from "@event/js/tours/event_steps";
registry.category("web_tour.tours").add('event_tour', {
url: '/web',
@@ -1,13 +1,13 @@
/** @odoo-module alias=google_recaptcha.ReCaptchaV3 **/
/** @odoo-module **/
import Class from "web.Class";
import core from "web.core";
import Class from "@web/legacy/js/core/class";
import core from "@web/legacy/js/services/core";
import { session } from "@web/session";
import { loadJS } from "@web/core/assets";
const _t = core._t;
const ReCaptcha = Class.extend({
export const ReCaptcha = Class.extend({
/**
* @override
*/
@@ -1,6 +1,6 @@
/** @odoo-module alias=hr.Many2OneAvatarEmployee **/
/** @odoo-module **/
import fieldRegistry from "web.field_registry";
import fieldRegistry from "@web/legacy/js/fields/field_registry";
import {
Many2OneAvatarUser,
@@ -2,7 +2,7 @@
import { Messaging } from "@mail/core/common/messaging_service";
import { patch } from "web.utils";
import { patch } from '@web/legacy/js/core/utils';
patch(Messaging.prototype, "hr", {
setup(...args) {
+1 -1
View File
@@ -2,7 +2,7 @@
import { _t } from "@web/core/l10n/translation";
import { ThreadService } from "@mail/core/common/thread_service";
import { patch } from "web.utils";
import { patch } from '@web/legacy/js/core/utils';
/** @type {import("@mail/core/common/thread_service").ThreadService} */
const threadServicePatch = {
@@ -5,7 +5,7 @@ import { afterNextRender, start, startServer } from "@mail/../tests/helpers/test
import { makeFakeNotificationService } from "@web/../tests/helpers/mock_services";
import { Many2OneAvatarEmployee } from "@hr/js/m2x_avatar_employee";
import { dom } from "web.test_utils";
import { dom } from "@web/../tests/legacy/helpers/test_utils";
QUnit.module("M2XAvatarEmployee", {
beforeEach() {
@@ -1,8 +1,8 @@
/** @odoo-module **/
import {_t} from "web.core";
import "web.legacy_tranlations_loaded";
import {Markup} from "web.utils";
import {_t} from "@web/legacy/js/services/core";
import "@web/legacy/translations_loaded";
import { Markup } from "@web/legacy/js/core/utils";
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";
@@ -1,6 +1,6 @@
/* @odoo-module */
import Popover from "web.Popover";
import Popover from "@web/legacy/js/core/popover";
const { Component } = owl;
@@ -1,6 +1,6 @@
/** @odoo-module **/
import FieldRegistry from 'web.field_registry';
import basic_fields from 'web.basic_fields';
import FieldRegistry from '@web/legacy/js/fields/field_registry';
import basic_fields from '@web/legacy/js/fields/basic_fields';
var FieldFloat = basic_fields.FieldFloat;
@@ -1,6 +1,6 @@
/** @odoo-module **/
import { _t } from 'web.core';
import "web.legacy_tranlations_loaded";
import { _t } from "@web/legacy/js/services/core";
import "@web/legacy/translations_loaded";
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";
@@ -1,10 +1,10 @@
/** @odoo-module **/
import {_t} from "web.core";
import {Markup} from "web.utils";
import {_t} from "@web/legacy/js/services/core";
import { Markup } from "@web/legacy/js/core/utils";
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";
import "web.legacy_tranlations_loaded";
import "@web/legacy/translations_loaded";
const { markup } = owl;
@@ -1,6 +1,6 @@
/** @odoo-module **/
import { Markup } from 'web.utils';
import { Markup } from "@web/legacy/js/core/utils";
import { _t } from "@web/core/l10n/translation";
import { registry } from "@web/core/registry";
@@ -1,6 +1,6 @@
/* @odoo-module alias=web.session */
import Session from "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 });
@@ -1,7 +1,7 @@
/** @odoo-module **/
import { patch } from "@web/core/utils/patch";
import { registry } from "@web/core/registry";
import "account.tour";
import "@account/js/tours/account";
patch(registry.category("web_tour.tours").get("account_tour"), "patch_account_tour", {
steps() {
@@ -1,7 +1,7 @@
/** @odoo-module **/
import { _t } from 'web.core';
import "web.legacy_tranlations_loaded";
import { _t } from "@web/legacy/js/services/core";
import "@web/legacy/translations_loaded";
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add('order_lunch_tour', {
@@ -9,8 +9,9 @@ import { _t } from "@web/core/l10n/translation";
import { registry } from "@web/core/registry";
import { useService } from "@web/core/utils/hooks";
import { patch } from "@web/core/utils/patch";
import { format } from "web.field_utils";
import fieldUtils from "@web/legacy/js/fields/field_utils";
const format = fieldUtils.format
const formatters = registry.category("formatters");
patch(Message.prototype, "mail/core/web", {
@@ -10,7 +10,7 @@ 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 * as legacyEnv from "web.env";
import legacyEnv from "@web/legacy/js/env";
Component.env = legacyEnv;
@@ -9,6 +9,6 @@ import "@mail/discuss/core/public/boot";
import { Component } from "@odoo/owl";
import { standaloneAdapter } from "web.OwlCompatibility";
import { standaloneAdapter } from "@web/legacy/js/owl_compatibility";
export default standaloneAdapter({ Component });
@@ -1,9 +1,9 @@
/* @odoo-module */
import { _t } from "@web/core/l10n/translation";
import "web.legacy_tranlations_loaded";
import "@web/legacy/translations_loaded";
import { registry } from "@web/core/registry";
import { Markup } from "web.utils";
import { Markup } from "@web/legacy/js/core/utils";
registry.category("web_tour.tours").add("mail_tour", {
url: "/web#action=mail.action_discuss",
@@ -1,15 +1,17 @@
/* @odoo-module */
import { _t } from "@web/core/l10n/translation";
import core from "web.core";
import fieldRegistry from "web.field_registry";
import {
import core from "@web/legacy/js/services/core";
import fieldRegistry from "@web/legacy/js/fields/field_registry";
import relationalField from "@web/legacy/js/fields/relational_fields";
import session from "web.session";
const {
FieldMany2ManyTagsAvatar,
KanbanMany2ManyTagsAvatar,
ListMany2ManyTagsAvatar,
Many2OneAvatar,
} from "web.relational_fields";
import session from "web.session";
} = relationalField
// This module defines extensions of the Many2OneAvatar and Many2ManyAvatar
// widgets, which are integrated with the messaging system. They are designed
@@ -9,14 +9,14 @@ import {
waitUntil,
} from "@mail/../tests/helpers/test_utils";
import { date_to_str } from "web.time";
import { date_to_str } from "@web/legacy/js/core/time";
import {
mockTimeout,
patchDate,
patchWithCleanup,
triggerHotkey,
} from "@web/../tests/helpers/utils";
import { file } from "web.test_utils";
import { file } from "@web/../tests/legacy/helpers/test_utils";
const { inputFiles } = file;
@@ -20,7 +20,7 @@ import {
} from "@mail/../tests/helpers/test_utils";
import { nextTick, triggerEvent, triggerHotkey } from "@web/../tests/helpers/utils";
import { file } from "web.test_utils";
import { file } from "@web/../tests/legacy/helpers/test_utils";
const { inputFiles } = file;
@@ -25,7 +25,7 @@ import {
triggerEvent,
triggerHotkey,
} from "@web/../tests/helpers/utils";
import { file } from "web.test_utils";
import { file } from "@web/../tests/legacy/helpers/test_utils";
const { inputFiles } = file;
@@ -3,7 +3,7 @@
import { patch } from "@web/core/utils/patch";
import { MockServer } from "@web/../tests/helpers/mock_server";
import { datetime_to_str } from "web.time";
import { datetime_to_str } from "@web/legacy/js/core/time";
import { assignDefined } from "@mail/utils/common/misc";
import { formatDate } from "@web/core/l10n/dates";
import { Command } from "@mail/../tests/helpers/command";
@@ -3,7 +3,7 @@
import { patch } from "@web/core/utils/patch";
import { MockServer } from "@web/../tests/helpers/mock_server";
import { datetime_to_str } from "web.time";
import { datetime_to_str } from "@web/legacy/js/core/time";
patch(MockServer.prototype, "mail/models/mail_thread", {
async _performRPC(route, args) {
@@ -1,7 +1,7 @@
/* @odoo-module */
import { patch } from "@web/core/utils/patch";
import { date_to_str } from "web.time";
import { date_to_str } from "@web/legacy/js/core/time";
import { MockServer } from "@web/../tests/helpers/mock_server";
patch(MockServer.prototype, "mail/models/res_users", {
@@ -2,7 +2,7 @@
import { browser } from "@web/core/browser/browser";
import { MEDIAS_BREAKPOINTS, SIZES, utils } from "@web/core/ui/ui_service";
import config from "web.config";
import config from "@web/legacy/js/services/config";
import { patchWithCleanup } from "@web/../tests/helpers/utils";
/**
@@ -3,7 +3,7 @@
import { afterNextRender, click, start, startServer } from "@mail/../tests/helpers/test_utils";
import { editInput } from "@web/../tests/helpers/utils";
import { file } from "web.test_utils";
import { file } from "@web/../tests/legacy/helpers/test_utils";
const { createFile } = file;
@@ -1,7 +1,7 @@
/* @odoo-module */
import { registry } from "@web/core/registry";
import { createFile, inputFiles } from "web.test_utils_file";
import { createFile, inputFiles } from "@web/../tests/legacy/helpers/test_utils_file";
registry.category("web_tour.tours").add("mail/static/tests/tours/discuss_public_tour.js", {
test: true,
@@ -1,7 +1,7 @@
/* @odoo-module */
import { registry } from "@web/core/registry";
import { createFile, inputFiles } from "web.test_utils_file";
import { createFile, inputFiles } from "@web/../tests/legacy/helpers/test_utils_file";
/**
* This tour depends on data created by python test in charge of launching it.
@@ -14,7 +14,7 @@ import {
} from "@mail/../tests/helpers/test_utils";
import { editInput, triggerHotkey } from "@web/../tests/helpers/utils";
import { file } from "web.test_utils";
import { file } from "@web/../tests/legacy/helpers/test_utils";
const { createFile } = file;
@@ -4,7 +4,7 @@ import { start, startServer } from "@mail/../tests/helpers/test_utils";
import { click, patchWithCleanup, triggerHotkey, triggerEvent } from "@web/../tests/helpers/utils";
import { registry } from "@web/core/registry";
import { session } from "@web/session";
import { nextTick } from "web.test_utils";
import { nextTick } from "@web/../tests/legacy/helpers/test_utils";
import { popoverService } from "@web/core/popover/popover_service";
import { tooltipService } from "@web/core/tooltip/tooltip_service";
import { browser } from "@web/core/browser/browser";
@@ -3,7 +3,7 @@
import { start, startServer } from "@mail/../tests/helpers/test_utils";
import { selectDropdownItem } from "@web/../tests/helpers/utils";
import testUtils from "web.test_utils";
import testUtils from "@web/../tests/legacy/helpers/test_utils";
QUnit.module("FieldMany2ManyTagsEmail");
@@ -2,7 +2,7 @@
import { nextTick } from "@web/../tests/helpers/utils";
import { makeView, setupViewRegistries } from "@web/../tests/views/helpers";
import { dom } from "web.test_utils";
import { dom } from "@web/../tests/legacy/helpers/test_utils";
let serverData;
@@ -3,7 +3,7 @@
import { afterNextRender, click, start, startServer } from "@mail/../tests/helpers/test_utils";
import { patchWithCleanup } from "@web/../tests/helpers/utils";
import { nextTick } from "web.test_utils";
import { nextTick } from "@web/../tests/legacy/helpers/test_utils";
QUnit.module("follower list menu");
@@ -1,7 +1,7 @@
/** @odoo-module alias=mail_group.mail_group **/
/** @odoo-module **/
import publicWidget from "web.public.widget";
import core from "web.core";
import publicWidget from "@web/legacy/js/public/public_widget";
import core from "@web/legacy/js/services/core";
const _t = core._t;
publicWidget.registry.MailGroup = publicWidget.Widget.extend({
@@ -1,6 +1,6 @@
/** @odoo-module **/
import publicWidget from "web.public.widget";
import publicWidget from "@web/legacy/js/public/public_widget";
publicWidget.registry.MailGroupMessage = publicWidget.Widget.extend({
selector: '.o_mg_message',
@@ -4,7 +4,7 @@ import { registry } from '@web/core/registry';
import { Dropdown } from "@web/core/dropdown/dropdown";
import { useService } from "@web/core/utils/hooks";
import { Many2OneField, many2OneField } from '@web/views/fields/many2one/many2one_field';
import Domain from 'web.Domain';
import Domain from '@web/legacy/js/core/domain';
const { useState, useEffect } = owl;
@@ -1,8 +1,8 @@
/** @odoo-module **/
import session from "web.session";
import ajax from "web.ajax";
import core from "web.core";
import ajax from "@web/legacy/js/core/ajax";
import core from "@web/legacy/js/services/core";
import { sprintf, escape } from "@web/core/utils/strings";
import { whenReady } from "@odoo/owl";
@@ -1,4 +1,4 @@
/** @odoo-module alias=mass_mailing.design_constants**/
/** @odoo-module **/
export const CSS_PREFIX = '.o_mail_wrapper';
@@ -3,18 +3,19 @@
import { registry } from "@web/core/registry";
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, getCSSRules } from "web_editor.convertInline";
import { initializeDesignTabCss } from "@mass_mailing/js/mass_mailing_design_constants";
import { toInline, getCSSRules } from "@web_editor/js/backend/convert_inline";
import { getBundle, loadBundle, loadJS } from "@web/core/assets";
import { qweb } from 'web.core';
import { qweb } from "@web/legacy/js/services/core";
import { useService } from "@web/core/utils/hooks";
import { buildQuery } from "web.rpc";
import { buildQuery } from "@web/legacy/js/core/rpc";
import { HtmlField, htmlField } from "@web_editor/js/backend/html_field";
import { device } from 'web.config';
import config from '@web/legacy/js/services/config';
import { MassMailingMobilePreviewDialog } from "./mass_mailing_mobile_preview";
import { getRangePosition } from '@web_editor/js/editor/odoo-editor/src/utils/utils';
import { MassMailingWysiwyg } from '@mass_mailing/js/mass_mailing_wysiwyg';
const { device } = config
const {
onWillStart,
useSubEnv,
@@ -1,14 +1,14 @@
/** @odoo-module alias=mass_mailing.snippets.options **/
/** @odoo-module **/
import options from "web_editor.snippets.options";
import options from "@web_editor/js/editor/snippets.options";
const SelectUserValueWidget = options.userValueWidgetsRegistry['we-select'];
import weUtils from "web_editor.utils";
import weUtils from "@web_editor/js/common/utils";
import {
CSS_PREFIX, BTN_SIZE_STYLES,
DEFAULT_BUTTON_SIZE, PRIORITY_STYLES, FONT_FAMILIES,
getFontName, normalizeFontFamily, initializeDesignTabCss,
transformFontFamilySelector,
} from "mass_mailing.design_constants";
} from "@mass_mailing/js/mass_mailing_design_constants";
import { isCSSColor, normalizeCSSColor } from "@web/core/utils/colors";
@@ -1,6 +1,6 @@
/** @odoo-module **/
import { ComponentWrapper } from "web.OwlCompatibility";
import { ComponentWrapper } from "@web/legacy/js/owl_compatibility";
import { Wysiwyg } from "@web_editor/js/wysiwyg/wysiwyg";
import { closestElement } from "@web_editor/js/editor/odoo-editor/src/OdooEditor";
import { Toolbar } from "@web_editor/js/editor/toolbar";
@@ -1,7 +1,7 @@
/** @odoo-module **/
import {_lt} from "web.core";
import snippetsEditor from "web_editor.snippet.editor";
import {_lt} from "@web/legacy/js/services/core";
import snippetsEditor from "@web_editor/js/editor/snippets.editor";
export const MassMailingSnippetsMenu = snippetsEditor.SnippetsMenu.extend({
events: Object.assign({}, snippetsEditor.SnippetsMenu.prototype.events, {
@@ -2,9 +2,9 @@
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";
import {_t} from "web.core";
import "web.legacy_tranlations_loaded";
import {Markup} from "web.utils";
import {_t} from "@web/legacy/js/services/core";
import "@web/legacy/translations_loaded";
import { Markup } from "@web/legacy/js/core/utils";
const { DateTime } = luxon;
registry.category("web_tour.tours").add('mass_mailing_tour', {
@@ -1,6 +1,6 @@
/** @odoo-module alias=mass_mailing.masonryOptions **/
/** @odoo-module **/
import options from "web_editor.snippets.options";
import options from "@web_editor/js/editor/snippets.options";
options.registry.MasonryLayout = options.registry.SelectTemplate.extend({
/**
@@ -1,6 +1,6 @@
/** @odoo-module alias=mass_mailing.s_media_list_options **/
/** @odoo-module **/
import options from "web_editor.snippets.options";
import options from "@web_editor/js/editor/snippets.options";
options.registry.MediaItemLayout = options.Class.extend({
@@ -1,8 +1,8 @@
/** @odoo-module alias=mass_mailing.s_rating_options **/
/** @odoo-module **/
import { ComponentWrapper } from "web.OwlCompatibility";
import { MediaDialogWrapper } from "@web_editor/components/media_dialog/media_dialog_wrapper";
import options from "web_editor.snippets.options";
import { ComponentWrapper } from "@web/legacy/js/owl_compatibility";
import { MediaDialogWrapper } from "@web_editor/components/media_dialog/media_dialog";
import options from "@web_editor/js/editor/snippets.options";
options.registry.Rating = options.Class.extend({
/**
@@ -1,6 +1,6 @@
/** @odoo-module alias=mass_mailing.s_showcase_options **/
/** @odoo-module **/
import options from "web_editor.snippets.options";
import options from "@web_editor/js/editor/snippets.options";
options.registry.Showcase = options.Class.extend({
/**
@@ -1,8 +1,8 @@
/** @odoo-module alias=mass_mailing.FieldMassMailingFavoriteFilter.test */
/** @odoo-module */
import { makeView, setupViewRegistries } from "@web/../tests/views/helpers";
import * as testUtils from "@web/../tests/helpers/utils";
import weTestUtils from "web_editor.test_utils";
import weTestUtils from "@web_editor/../tests/test_utils";
let fixture;
let serverData;
@@ -1,6 +1,6 @@
/** @odoo-module alias=mass_mailing.field_html_tests **/
/** @odoo-module **/
import weTestUtils from "web_editor.test_utils";
import weTestUtils from "@web_editor/../tests/test_utils";
import { makeView, setupViewRegistries } from "@web/../tests/views/helpers";
import {
editInput,
@@ -9,7 +9,7 @@ import {
nextTick,
patchWithCleanup,
} from "@web/../tests/helpers/utils";
import * as legacyTestUtils from "web.test_utils";
import * as legacyTestUtils from "@web/../tests/legacy/helpers/test_utils";
import { assets } from "@web/core/assets";
import { Wysiwyg } from '@web_editor/js/wysiwyg/wysiwyg';
@@ -1,6 +1,6 @@
/** @odoo-module **/
import testUtils from 'web.test_utils';
import testUtils from '@web/../tests/legacy/helpers/test_utils';
import { registry } from "@web/core/registry";
import {
click,
@@ -1,8 +1,8 @@
/** @odoo-module alias=payment.checkout_form **/
/** @odoo-module **/
import publicWidget from "web.public.widget";
import publicWidget from "@web/legacy/js/public/public_widget";
import paymentFormMixin from "payment.payment_form_mixin";
import paymentFormMixin from "@payment/js/payment_form_mixin";
import { debounce } from "@web/core/utils/timing";
publicWidget.registry.PaymentCheckoutForm = publicWidget.Widget.extend(paymentFormMixin, {
@@ -1,7 +1,7 @@
/** @odoo-module */
import core from 'web.core';
import publicWidget from 'web.public.widget';
import core from "@web/legacy/js/services/core";
import publicWidget from '@web/legacy/js/public/public_widget';
publicWidget.registry.PaymentExpressCheckoutForm = publicWidget.Widget.extend({
selector: 'form[name="o_payment_express_checkout_form"]',
+5 -5
View File
@@ -1,10 +1,10 @@
/** @odoo-module alias=payment.manage_form **/
/** @odoo-module **/
import core from "web.core";
import publicWidget from "web.public.widget";
import Dialog from "web.Dialog";
import core from "@web/legacy/js/services/core";
import publicWidget from "@web/legacy/js/public/public_widget";
import Dialog from "@web/legacy/js/core/dialog";
import paymentFormMixin from "payment.payment_form_mixin";
import paymentFormMixin from "@payment/js/payment_form_mixin";
import { debounce } from "@web/core/utils/timing";
const _t = core._t;
@@ -1,8 +1,8 @@
/** @odoo-module alias=payment.payment_form_mixin **/
/** @odoo-module **/
import { escape, sprintf } from "@web/core/utils/strings";
import core from "web.core";
import Dialog from "web.Dialog";
import core from "@web/legacy/js/services/core";
import Dialog from "@web/legacy/js/core/dialog";
const _t = core._t;
@@ -1,8 +1,8 @@
/** @odoo-module alias=payment.post_processing **/
/** @odoo-module **/
import publicWidget from "web.public.widget";
import core from "web.core";
import {Markup} from "web.utils";
import publicWidget from "@web/legacy/js/public/public_widget";
import core from "@web/legacy/js/services/core";
import { Markup } from "@web/legacy/js/core/utils";
var _t = core._t;
@@ -1,9 +1,9 @@
/** @odoo-module **/
/* global AdyenCheckout */
import core from "web.core";
import checkoutForm from "payment.checkout_form";
import manageForm from "payment.manage_form";
import core from "@web/legacy/js/services/core";
import checkoutForm from "@payment/js/checkout_form";
import manageForm from "@payment/js/manage_form";
const _t = core._t;
@@ -115,7 +115,7 @@
/**
* Prepare the inline form of Adyen for direct payment.
*
* @override method from payment.payment_form_mixin
* @override method from @payment/js/payment_form_mixin
* @private
* @param {string} code - The code of the selected payment option's provider
* @param {number} paymentOptionId - The id of the selected payment option
@@ -195,7 +195,7 @@
/**
* Trigger the payment processing by submitting the drop-in.
*
* @override method from payment.payment_form_mixin
* @override method from @payment/js/payment_form_mixin
* @private
* @param {string} provider - The provider of the payment option's provider
* @param {number} paymentOptionId - The id of the payment option handling the transaction
@@ -1,11 +1,11 @@
/** @odoo-module **/
/* global Accept */
import core from "web.core";
import core from "@web/legacy/js/services/core";
import { loadJS } from "@web/core/assets";
import checkoutForm from "payment.checkout_form";
import manageForm from "payment.manage_form";
import checkoutForm from "@payment/js/checkout_form";
import manageForm from "@payment/js/manage_form";
const _t = core._t;
@@ -71,7 +71,7 @@
/**
* Prepare the inline form of Authorize.Net for direct payment.
*
* @override method from payment.payment_form_mixin
* @override method from @payment/js/payment_form_mixin
* @private
* @param {string} provider - The provider of the selected payment option's provider
* @param {number} paymentOptionId - The id of the selected payment option
@@ -115,7 +115,7 @@
/**
* Dispatch the secure data to Authorize.Net.
*
* @override method from payment.payment_form_mixin
* @override method from @payment/js/payment_form_mixin
* @private
* @param {string} code - The code of the payment option's provider
* @param {number} paymentOptionId - The id of the payment option handling the transaction
@@ -1,13 +1,13 @@
/** @odoo-module **/
import paymentPostProcessing from "payment.post_processing";
import paymentPostProcessing from "@payment/js/post_processing";
paymentPostProcessing.include({
/**
* Don't wait for the transaction to be confirmed before redirecting customers to the
* landing route because custom transactions remain in the state 'pending' forever.
*
* @override method from `payment.post_processing`
* @override method from `@payment/js/post_processing`
* @param {Object} display_values_list - The post-processing values of the transactions
*/
processPolledData: function (display_values_list) {
@@ -1,7 +1,7 @@
/** @odoo-module **/
import checkoutForm from "payment.checkout_form";
import manageForm from "payment.manage_form";
import checkoutForm from "@payment/js/checkout_form";
import manageForm from "@payment/js/manage_form";
const paymentDemoMixin = {
@@ -12,7 +12,7 @@
/**
* Simulate a feedback from a payment provider and redirect the customer to the status page.
*
* @override method from payment.payment_form_mixin
* @override method from @payment/js/payment_form_mixin
* @private
* @param {string} code - The code of the provider
* @param {number} providerId - The id of the provider handling the transaction
@@ -41,7 +41,7 @@
/**
* Prepare the inline form of Demo for direct payment.
*
* @override method from payment.payment_form_mixin
* @override method from @payment/js/payment_form_mixin
* @private
* @param {string} code - The code of the selected payment option's provider
* @param {integer} paymentOptionId - The id of the selected payment option
@@ -1,6 +1,6 @@
/** @odoo-module */
import checkoutForm from 'payment.checkout_form';
import checkoutForm from "@payment/js/checkout_form";
import stripeMixin from '@payment_stripe/js/stripe_mixin';
checkoutForm.include(stripeMixin);
@@ -1,6 +1,6 @@
/** @odoo-module */
import manageForm from 'payment.manage_form';
import manageForm from "@payment/js/manage_form";
import stripeMixin from '@payment_stripe/js/stripe_mixin';
manageForm.include(stripeMixin);
@@ -1,7 +1,7 @@
/** @odoo-module */
/* global Stripe */
import core from 'web.core';
import core from "@web/legacy/js/services/core";
import { StripeOptions } from '@payment_stripe/js/stripe_options';
const _t = core._t;
@@ -4,7 +4,7 @@ import { _t } from "@web/core/l10n/translation";
import { markup } from "@odoo/owl";
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";
import "web.legacy_tranlations_loaded";
import "@web/legacy/translations_loaded";
registry.category("web_tour.tours").add("point_of_sale_tour", {
url: "/web",
@@ -1,6 +1,6 @@
/** @odoo-module */
import testUtils from "web.test_utils";
import testUtils from "@web/../tests/legacy/helpers/test_utils";
import { makeTestEnv } from "@web/../tests/helpers/mock_env";
import { getFixture, mount } from "@web/../tests/helpers/utils";
import { useService } from "@web/core/utils/hooks";
@@ -1,7 +1,7 @@
/** @odoo-module */
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
import makeTestEnvironment from "web.test_env";
import makeTestEnvironment from "@web/../tests/legacy/helpers/test_env";
import { click, getFixture, mount, nextTick, triggerEvent } from "@web/../tests/helpers/utils";
import { clearRegistryWithCleanup, makeTestEnv } from "@web/../tests/helpers/mock_env";
import { registry } from "@web/core/registry";
+5 -3
View File
@@ -1,6 +1,6 @@
/** @odoo-module alias=portal.portal **/
/** @odoo-module **/
import publicWidget from "web.public.widget";
import publicWidget from "@web/legacy/js/public/public_widget";
publicWidget.registry.portalDetails = publicWidget.Widget.extend({
selector: '.o_portal_details',
@@ -49,7 +49,7 @@ publicWidget.registry.portalDetails = publicWidget.Widget.extend({
},
});
publicWidget.registry.PortalHomeCounters = publicWidget.Widget.extend({
export const PortalHomeCounters = publicWidget.Widget.extend({
selector: '.o_portal_my_home',
/**
@@ -113,6 +113,8 @@ publicWidget.registry.PortalHomeCounters = publicWidget.Widget.extend({
},
});
publicWidget.registry.PortalHomeCounters = PortalHomeCounters;
publicWidget.registry.portalSearchPanel = publicWidget.Widget.extend({
selector: '.o_portal_search_panel',
events: {
@@ -1,10 +1,10 @@
/** @odoo-module alias=portal.chatter **/
/** @odoo-module **/
import core from "web.core";
import dom from "web.dom";
import publicWidget from "web.public.widget";
import portalComposer from "portal.composer";
import {Markup} from "web.utils";
import core from "@web/legacy/js/services/core";
import dom from "@web/legacy/js/core/dom";
import publicWidget from "@web/legacy/js/public/public_widget";
import portalComposer from "@portal/js/portal_composer";
import { Markup } from "@web/legacy/js/core/utils";
import { range } from "@web/core/utils/numbers";
var qweb = core.qweb;
@@ -337,6 +337,4 @@ publicWidget.registry.portalChatter = publicWidget.Widget.extend({
},
});
export default {
PortalChatter: PortalChatter,
};
export default PortalChatter
@@ -1,9 +1,9 @@
/** @odoo-module alias=portal.composer **/
/** @odoo-module **/
import { escape, sprintf } from "@web/core/utils/strings";
import ajax from "web.ajax";
import core from "web.core";
import publicWidget from "web.public.widget";
import ajax from "@web/legacy/js/core/ajax";
import core from "@web/legacy/js/services/core";
import publicWidget from "@web/legacy/js/public/public_widget";
var qweb = core.qweb;
var _t = core._t;
@@ -1,8 +1,8 @@
/** @odoo-module alias=portal.security **/
/** @odoo-module **/
import publicWidget from "web.public.widget";
import Dialog from "web.Dialog";
import {_t, qweb} from "web.core";
import publicWidget from '@web/legacy/js/public/public_widget';
import Dialog from "@web/legacy/js/core/dialog";
import {_t, qweb} from "@web/legacy/js/services/core";
import session from "web.session";
publicWidget.registry.NewAPIKeyButton = publicWidget.Widget.extend({
@@ -201,7 +201,7 @@ publicWidget.registry.RevokeSessionsButton = publicWidget.Widget.extend({
* @param {Promise} wrapped promise to check for an identity check request
* @returns {Promise} result of the original call
*/
function handleCheckIdentity(rpc, wrapped) {
export function handleCheckIdentity(rpc, wrapped) {
return wrapped.then((r) => {
if (!(r.type === "ir.actions.act_window" && r.res_model === "res.users.identitycheck")) {
return r;
@@ -261,6 +261,3 @@ function handleCheckIdentity(rpc, wrapped) {
});
});
}
export default {
handleCheckIdentity,
}
@@ -1,7 +1,7 @@
/** @odoo-module alias=portal.PortalSidebar **/
/** @odoo-module **/
import core from "web.core";
import publicWidget from "web.public.widget";
import core from "@web/legacy/js/services/core";
import publicWidget from "@web/legacy/js/public/public_widget";
import session from "web.session";
import { sprintf } from "@web/core/utils/strings";
import { deserializeDateTime } from "@web/core/l10n/dates";
@@ -1,8 +1,8 @@
/** @odoo-module alias=portal.signature_form **/
/** @odoo-module **/
import core from "web.core";
import publicWidget from "web.public.widget";
import { NameAndSignature } from "web.name_and_signature";
import core from "@web/legacy/js/services/core";
import publicWidget from "@web/legacy/js/public/public_widget";
import { NameAndSignature } from "@web/legacy/js/widgets/name_and_signature";
var qweb = core.qweb;
var _t = core._t;
@@ -189,6 +189,4 @@ publicWidget.registry.SignatureForm = publicWidget.Widget.extend({
},
});
export default {
SignatureForm: SignatureForm,
};
export default SignatureForm;
@@ -1,11 +1,10 @@
/** @odoo-module **/
import core from "web.core";
import portalChatter from "portal.chatter";
import core from "@web/legacy/js/services/core";
import PortalChatter from "@portal/js/portal_chatter";
import { roundPrecision } from "@web/core/utils/numbers";
var _t = core._t;
var PortalChatter = portalChatter.PortalChatter;
var qweb = core.qweb;
/**
@@ -1,7 +1,7 @@
/** @odoo-module **/
import core from "web.core";
import portalComposer from "portal.composer";
import core from "@web/legacy/js/services/core";
import portalComposer from "@portal/js/portal_composer";
var _t = core._t;
@@ -1,9 +1,9 @@
/** @odoo-module alias=portal.rating.composer **/
/** @odoo-module **/
import publicWidget from "web.public.widget";
import publicWidget from "@web/legacy/js/public/public_widget";
import session from "web.session";
import portalComposer from "portal.composer";
import {_t, qweb} from "web.core";
import portalComposer from "@portal/js/portal_composer";
import {_t, qweb} from "@web/legacy/js/services/core";
const PortalComposer = portalComposer.PortalComposer;
@@ -1,4 +1,4 @@
/* @odoo-module alias=pos_restaurant_hr.chrome */
/* @odoo-module */
import { patch } from "@web/core/utils/patch";
import "@pos_restaurant/overrides/models/pos_store";
@@ -2,7 +2,7 @@
import { Order, Orderline } from "@point_of_sale/app/store/models";
import { Mutex } from "@web/core/utils/concurrency";
import concurrency from "web.concurrency";
import concurrency from "@web/legacy/js/core/concurrency";
import { roundDecimals, roundPrecision } from "@web/core/utils/numbers";
import { _t } from "@web/core/l10n/translation";
import { patch } from "@web/core/utils/patch";

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