diff --git a/addons/l10n_co_pos/static/src/js/PaymentScreen.js b/addons/l10n_co_pos/static/src/js/PaymentScreen.js index d091c625a55..0d177cc47a4 100644 --- a/addons/l10n_co_pos/static/src/js/PaymentScreen.js +++ b/addons/l10n_co_pos/static/src/js/PaymentScreen.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PaymentScreen } from "@point_of_sale/js/Screens/PaymentScreen/PaymentScreen"; +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; import { patch } from "@web/core/utils/patch"; patch(PaymentScreen.prototype, "l10n_co_pos.PaymentScreen", { diff --git a/addons/l10n_co_pos/static/src/js/pos.js b/addons/l10n_co_pos/static/src/js/pos.js index 2abfbe8dc2c..2105bab8c0c 100644 --- a/addons/l10n_co_pos/static/src/js/pos.js +++ b/addons/l10n_co_pos/static/src/js/pos.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PosGlobalState, Order } from "@point_of_sale/js/models"; +import { PosGlobalState, Order } from "@point_of_sale/app/store/models"; import { patch } from "@web/core/utils/patch"; patch(PosGlobalState.prototype, "l10n_co_pos.PosGlobalState", { diff --git a/addons/l10n_fr_pos_cert/static/src/js/Chrome.js b/addons/l10n_fr_pos_cert/static/src/js/Chrome.js index 8785c136e80..6e812191e5d 100644 --- a/addons/l10n_fr_pos_cert/static/src/js/Chrome.js +++ b/addons/l10n_fr_pos_cert/static/src/js/Chrome.js @@ -1,8 +1,8 @@ /** @odoo-module */ -import { Chrome } from "@point_of_sale/js/Chrome"; +import { Chrome } from "@point_of_sale/app/pos_app"; import { patch } from "@web/core/utils/patch"; -import { ClosePosPopup } from "@point_of_sale/js/Popups/ClosePosPopup"; +import { ClosePosPopup } from "@point_of_sale/app/navbar/closing_popup/closing_popup"; import { onMounted } from "@odoo/owl"; patch(Chrome.prototype, "l10n_fr_pos_cert.Chrome", { diff --git a/addons/l10n_fr_pos_cert/static/src/js/PaymentScreen.js b/addons/l10n_fr_pos_cert/static/src/js/PaymentScreen.js index a78e3847276..5f73feb7d72 100644 --- a/addons/l10n_fr_pos_cert/static/src/js/PaymentScreen.js +++ b/addons/l10n_fr_pos_cert/static/src/js/PaymentScreen.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PaymentScreen } from "@point_of_sale/js/Screens/PaymentScreen/PaymentScreen"; +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; import { patch } from "@web/core/utils/patch"; patch(PaymentScreen.prototype, "l10n_fr_pos_cert.PaymentScreen", { diff --git a/addons/l10n_fr_pos_cert/static/src/js/Popups/ClosePosPopup.js b/addons/l10n_fr_pos_cert/static/src/js/Popups/ClosePosPopup.js index 2b6af668273..0ddc1ddc8fa 100644 --- a/addons/l10n_fr_pos_cert/static/src/js/Popups/ClosePosPopup.js +++ b/addons/l10n_fr_pos_cert/static/src/js/Popups/ClosePosPopup.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { ClosePosPopup } from "@point_of_sale/js/Popups/ClosePosPopup"; +import { ClosePosPopup } from "@point_of_sale/app/navbar/closing_popup/closing_popup"; import { patch } from "@web/core/utils/patch"; patch(ClosePosPopup.prototype, "l10n_fr_pos_cert.ClosePosPopup", { diff --git a/addons/l10n_fr_pos_cert/static/src/js/pos.js b/addons/l10n_fr_pos_cert/static/src/js/pos.js index 34a1752fd68..66fb77ee64f 100644 --- a/addons/l10n_fr_pos_cert/static/src/js/pos.js +++ b/addons/l10n_fr_pos_cert/static/src/js/pos.js @@ -1,10 +1,10 @@ /** @odoo-module */ -import { PosGlobalState, Order, Orderline } from "@point_of_sale/js/models"; +import { PosGlobalState, Order, Orderline } from "@point_of_sale/app/store/models"; import { _t } from "@web/core/l10n/translation"; import { patch } from "@web/core/utils/patch"; import { sprintf } from "@web/core/utils/strings"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; patch(PosGlobalState.prototype, "l10n_fr_pos_cert.PosGlobalState", { is_french_country() { diff --git a/addons/l10n_gcc_pos/static/src/js/OrderReceipt.js b/addons/l10n_gcc_pos/static/src/js/OrderReceipt.js index 678414bc295..a59d713d5a2 100644 --- a/addons/l10n_gcc_pos/static/src/js/OrderReceipt.js +++ b/addons/l10n_gcc_pos/static/src/js/OrderReceipt.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { OrderReceipt } from "@point_of_sale/js/Screens/ReceiptScreen/OrderReceipt"; +import { OrderReceipt } from "@point_of_sale/app/screens/receipt_screen/receipt/receipt"; import { patch } from "@web/core/utils/patch"; patch(OrderReceipt.prototype, "l10n_gcc_pos.OrderReceipt", { @@ -8,7 +8,9 @@ patch(OrderReceipt.prototype, "l10n_gcc_pos.OrderReceipt", { const receipt_render_env = this._super(...arguments); const receipt = receipt_render_env.receipt; const country = receipt_render_env.order.pos.company.country; - receipt.is_gcc_country = country ? ["SA", "AE", "BH", "OM", "QA", "KW"].includes(country && country.code) : false; + receipt.is_gcc_country = country + ? ["SA", "AE", "BH", "OM", "QA", "KW"].includes(country && country.code) + : false; return receipt_render_env; }, }); diff --git a/addons/l10n_in_pos/static/src/js/receipt.js b/addons/l10n_in_pos/static/src/js/receipt.js index 5203eae852f..4a8f14762aa 100644 --- a/addons/l10n_in_pos/static/src/js/receipt.js +++ b/addons/l10n_in_pos/static/src/js/receipt.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { Orderline } from "@point_of_sale/js/models"; +import { Orderline } from "@point_of_sale/app/store/models"; import { patch } from "@web/core/utils/patch"; patch(Orderline.prototype, "l10n_in_pos.Orderline", { diff --git a/addons/l10n_sa_pos/static/src/js/models.js b/addons/l10n_sa_pos/static/src/js/models.js index 76db2b64407..c95a7734598 100644 --- a/addons/l10n_sa_pos/static/src/js/models.js +++ b/addons/l10n_sa_pos/static/src/js/models.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { Order } from "@point_of_sale/js/models"; +import { Order } from "@point_of_sale/app/store/models"; import { patch } from "@web/core/utils/patch"; patch(Order.prototype, "l10n_sa_pos.Order", { diff --git a/addons/point_of_sale/static/src/@types/services.d.ts b/addons/point_of_sale/static/src/@types/services.d.ts new file mode 100644 index 00000000000..57d675e9190 --- /dev/null +++ b/addons/point_of_sale/static/src/@types/services.d.ts @@ -0,0 +1,25 @@ +declare module "services" { + import { barcodeReaderService } from "@point_of_sale/app/barcode/barcode_reader_service"; + import { debugService } from "@point_of_sale/app/debug/debug_service"; + import { hardwareProxyService } from "@point_of_sale/app/hardware_proxy/hardware_proxy_service"; + import { popupService } from "@point_of_sale/app/popup/popup_service"; + import { numberBufferService } from "@point_of_sale/app/utils/number_buffer_service"; + import { notificationService } from "@point_of_sale/app/notification/notification_service"; + import { posBusService } from "@point_of_sale/app/bus/pos_bus_service"; + import { customerDisplayService } from "@point_of_sale/app/customer_display/customer_display_service"; + import { reportService } from "@point_of_sale/app/utils/report_service"; + import { soundService } from "@point_of_sale/app/sound/sound_service"; + + export interface Services { + barcode_reader: Resolved>; + debug: ReturnType; + hardware_proxy: ReturnType; + popup: ReturnType; + number_buffer: ReturnType; + pos_notification: ReturnType; + pos_bus: ReturnType; + customer_display: ReturnType; + report: ReturnType; + sound: ReturnType; + } +} diff --git a/addons/point_of_sale/static/src/app/barcode/barcode_reader_service.js b/addons/point_of_sale/static/src/app/barcode/barcode_reader_service.js index e361bb158b6..ff01a4411fe 100644 --- a/addons/point_of_sale/static/src/app/barcode/barcode_reader_service.js +++ b/addons/point_of_sale/static/src/app/barcode/barcode_reader_service.js @@ -3,8 +3,8 @@ import { registry } from "@web/core/registry"; import { Mutex } from "@web/core/utils/concurrency"; import { session } from "@web/session"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; -import { ErrorBarcodePopup } from "@point_of_sale/js/Popups/ErrorBarcodePopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +import { ErrorBarcodePopup } from "@point_of_sale/app/barcode/error_popup/barcode_error_popup"; import { BarcodeParser } from "@barcodes/js/barcode_parser"; export class BarcodeReader { diff --git a/addons/point_of_sale/static/src/app/barcode/error_popup/barcode_error_popup.js b/addons/point_of_sale/static/src/app/barcode/error_popup/barcode_error_popup.js index bbf942133b8..57a8a52d905 100644 --- a/addons/point_of_sale/static/src/app/barcode/error_popup/barcode_error_popup.js +++ b/addons/point_of_sale/static/src/app/barcode/error_popup/barcode_error_popup.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { _lt } from "@web/core/l10n/translation"; export class ErrorBarcodePopup extends ErrorPopup { diff --git a/addons/point_of_sale/static/src/app/customer_display/customer_display_service.js b/addons/point_of_sale/static/src/app/customer_display/customer_display_service.js index 3bef83b4521..f5487508ab6 100644 --- a/addons/point_of_sale/static/src/app/customer_display/customer_display_service.js +++ b/addons/point_of_sale/static/src/app/customer_display/customer_display_service.js @@ -1,7 +1,6 @@ /** @odoo-module */ -import { batched } from "@point_of_sale/js/utils"; -import { effect, Reactive } from "@point_of_sale/utils"; +import { batched, effect, Reactive } from "@point_of_sale/utils"; import { registry } from "@web/core/registry"; import { pick } from "@web/core/utils/objects"; diff --git a/addons/point_of_sale/static/src/app/debug/debug_service.js b/addons/point_of_sale/static/src/app/debug/debug_service.js index 7034872824d..33e5b70e402 100644 --- a/addons/point_of_sale/static/src/app/debug/debug_service.js +++ b/addons/point_of_sale/static/src/app/debug/debug_service.js @@ -2,10 +2,10 @@ import { reactive } from "@odoo/owl"; import { registry } from "@web/core/registry"; -import { DebugWidget } from "./debug_widget"; import { withComputedProperties } from "@point_of_sale/utils"; +import { DebugWidget } from "@point_of_sale/app/debug/debug_widget"; -const debugService = { +export const debugService = { /** * @param {{ debug: string }} env */ diff --git a/addons/point_of_sale/static/src/app/debug/debug_widget.js b/addons/point_of_sale/static/src/app/debug/debug_widget.js index bcada4e2630..053cbc1c2ef 100644 --- a/addons/point_of_sale/static/src/app/debug/debug_widget.js +++ b/addons/point_of_sale/static/src/app/debug/debug_widget.js @@ -2,13 +2,13 @@ import { parseFloat } from "@web/views/fields/parsers"; import { Transition } from "@web/core/transition"; -import { constrain, getLimits, useMovable } from "@point_of_sale/app/movable_hook"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; -import { OrderImportPopup } from "@point_of_sale/js/Popups/OrderImportPopup"; +import { constrain, getLimits, useMovable } from "@point_of_sale/app/utils/movable_hook"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; +import { OrderImportPopup } from "@point_of_sale/app/debug/order_import_popup/order_import_popup"; import { useBus, useService } from "@web/core/utils/hooks"; import { useEffect, useRef, useState, Component } from "@odoo/owl"; -import { usePos } from "../pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class DebugWidget extends Component { static components = { Transition }; diff --git a/addons/point_of_sale/static/src/app/debug/order_import_popup/order_import_popup.js b/addons/point_of_sale/static/src/app/debug/order_import_popup/order_import_popup.js index 1759e807191..32e1b0d248f 100644 --- a/addons/point_of_sale/static/src/app/debug/order_import_popup/order_import_popup.js +++ b/addons/point_of_sale/static/src/app/debug/order_import_popup/order_import_popup.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { _lt } from "@web/core/l10n/translation"; export class OrderImportPopup extends AbstractAwaitablePopup { diff --git a/addons/point_of_sale/static/src/app/errors/error_handlers.js b/addons/point_of_sale/static/src/app/errors/error_handlers.js index 31672bf9935..6866a453750 100644 --- a/addons/point_of_sale/static/src/app/errors/error_handlers.js +++ b/addons/point_of_sale/static/src/app/errors/error_handlers.js @@ -3,9 +3,9 @@ import { registry } from "@web/core/registry"; import { odooExceptionTitleMap } from "@web/core/errors/error_dialogs"; import { ConnectionLostError, RPCError } from "@web/core/network/rpc_service"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; -import { ErrorTracebackPopup } from "@point_of_sale/js/Popups/ErrorTracebackPopup"; -import { OfflineErrorPopup } from "@point_of_sale/js/Popups/OfflineErrorPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +import { ErrorTracebackPopup } from "@point_of_sale/app/errors/popups/error_traceback_popup"; +import { OfflineErrorPopup } from "@point_of_sale/app/errors/popups/offline_error_popup"; import { _t } from "@web/core/l10n/translation"; export function identifyError(error) { diff --git a/addons/point_of_sale/static/src/app/errors/popups/error_popup.js b/addons/point_of_sale/static/src/app/errors/popups/error_popup.js index 3b0d930a21f..d55dc25c79d 100644 --- a/addons/point_of_sale/static/src/app/errors/popups/error_popup.js +++ b/addons/point_of_sale/static/src/app/errors/popups/error_popup.js @@ -1,8 +1,9 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { _lt } from "@web/core/l10n/translation"; import { useService } from "@web/core/utils/hooks"; +import { onMounted } from "@odoo/owl"; // formerly ErrorPopupWidget export class ErrorPopup extends AbstractAwaitablePopup { @@ -16,7 +17,7 @@ export class ErrorPopup extends AbstractAwaitablePopup { setup() { super.setup(); - owl.onMounted(this.onMounted); + onMounted(this.onMounted); this.sound = useService("sound"); } onMounted() { diff --git a/addons/point_of_sale/static/src/app/errors/popups/error_traceback_popup.js b/addons/point_of_sale/static/src/app/errors/popups/error_traceback_popup.js index a23dc6b977a..6d7d741436a 100644 --- a/addons/point_of_sale/static/src/app/errors/popups/error_traceback_popup.js +++ b/addons/point_of_sale/static/src/app/errors/popups/error_traceback_popup.js @@ -1,8 +1,8 @@ /** @odoo-module */ -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { _lt } from "@web/core/l10n/translation"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; // formerly ErrorTracebackPopupWidget export class ErrorTracebackPopup extends ErrorPopup { diff --git a/addons/point_of_sale/static/src/app/errors/popups/offline_error_popup.js b/addons/point_of_sale/static/src/app/errors/popups/offline_error_popup.js index d0f95e0bada..534af260ad5 100644 --- a/addons/point_of_sale/static/src/app/errors/popups/offline_error_popup.js +++ b/addons/point_of_sale/static/src/app/errors/popups/offline_error_popup.js @@ -1,7 +1,7 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { _lt } from "@web/core/l10n/translation"; /** diff --git a/addons/point_of_sale/static/src/app/hardware_proxy/hardware_proxy_service.js b/addons/point_of_sale/static/src/app/hardware_proxy/hardware_proxy_service.js index 46f7f9247f6..0b98dd6a7fb 100644 --- a/addons/point_of_sale/static/src/app/hardware_proxy/hardware_proxy_service.js +++ b/addons/point_of_sale/static/src/app/hardware_proxy/hardware_proxy_service.js @@ -1,11 +1,10 @@ /** @odoo-module */ -import { HWPrinter } from "../printer/hw_printer"; +import { HWPrinter } from "@point_of_sale/app/printer/hw_printer"; import { EventBus, reactive } from "@odoo/owl"; import { browser } from "@web/core/browser/browser"; import { registry } from "@web/core/registry"; -import { effect } from "@point_of_sale/utils"; -import { deduceUrl } from "@point_of_sale/js/utils"; +import { effect, deduceUrl } from "@point_of_sale/utils"; /** * This object interfaces with the local proxy to communicate to the various hardware devices diff --git a/addons/point_of_sale/static/src/app/main.js b/addons/point_of_sale/static/src/app/main.js index 8f8a01bf5be..e3a74fbc67c 100644 --- a/addons/point_of_sale/static/src/app/main.js +++ b/addons/point_of_sale/static/src/app/main.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { Chrome } from "@point_of_sale/js/Chrome"; +import { Chrome } from "@point_of_sale/app/pos_app"; import { Loader } from "@point_of_sale/app/loader/loader"; import { setLoadXmlDefaultApp, templates } from "@web/core/assets"; import { App, mount, reactive, whenReady } from "@odoo/owl"; diff --git a/addons/point_of_sale/static/src/app/navbar/back_button/back_button.js b/addons/point_of_sale/static/src/app/navbar/back_button/back_button.js index 3f67cb88677..e59cb91d1d0 100644 --- a/addons/point_of_sale/static/src/app/navbar/back_button/back_button.js +++ b/addons/point_of_sale/static/src/app/navbar/back_button/back_button.js @@ -2,7 +2,7 @@ import { Component, useState } from "@odoo/owl"; import { useService } from "@web/core/utils/hooks"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class BackButton extends Component { static template = "BackButton"; diff --git a/addons/point_of_sale/static/src/app/navbar/cash_move_popup/cash_move_popup.js b/addons/point_of_sale/static/src/app/navbar/cash_move_popup/cash_move_popup.js index 7393e7eaf53..50a4622a633 100644 --- a/addons/point_of_sale/static/src/app/navbar/cash_move_popup/cash_move_popup.js +++ b/addons/point_of_sale/static/src/app/navbar/cash_move_popup/cash_move_popup.js @@ -6,10 +6,10 @@ import { renderToElement } from "@web/core/utils/render"; import { useAutofocus, useService } from "@web/core/utils/hooks"; import { parseFloat, InvalidNumberError } from "@web/views/fields/parsers"; import { useState } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; export class CashMovePopup extends AbstractAwaitablePopup { static template = "point_of_sale.CashMovePopup"; diff --git a/addons/point_of_sale/static/src/app/navbar/cashier_name/cashier_name.js b/addons/point_of_sale/static/src/app/navbar/cashier_name/cashier_name.js index 8c5fedac5cd..a82a1c235d3 100644 --- a/addons/point_of_sale/static/src/app/navbar/cashier_name/cashier_name.js +++ b/addons/point_of_sale/static/src/app/navbar/cashier_name/cashier_name.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { Component, useState } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { useService } from "@web/core/utils/hooks"; // Previously UsernameWidget diff --git a/addons/point_of_sale/static/src/app/navbar/closing_popup/closing_popup.js b/addons/point_of_sale/static/src/app/navbar/closing_popup/closing_popup.js index c36d8e6f6e1..286626b4e72 100644 --- a/addons/point_of_sale/static/src/app/navbar/closing_popup/closing_popup.js +++ b/addons/point_of_sale/static/src/app/navbar/closing_popup/closing_popup.js @@ -1,17 +1,17 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; -import { SaleDetailsButton } from "../ChromeWidgets/SaleDetailsButton"; -import { ConfirmPopup } from "./ConfirmPopup"; -import { MoneyDetailsPopup } from "./MoneyDetailsPopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; +import { SaleDetailsButton } from "@point_of_sale/app/navbar/sale_details_button/sale_details_button"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; +import { MoneyDetailsPopup } from "@point_of_sale/app/utils/money_details_popup/money_details_popup"; import { useService } from "@web/core/utils/hooks"; -import { AlertPopup } from "./AlertPopup"; -import { ErrorPopup } from "./ErrorPopup"; +import { AlertPopup } from "@point_of_sale/app/utils/alert_popup/alert_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { useState } from "@odoo/owl"; import { ConnectionLostError } from "@web/core/network/rpc_service"; -import { identifyError } from "@point_of_sale/app/error_handlers/error_handlers"; +import { identifyError } from "@point_of_sale/app/errors/error_handlers"; import { _t } from "@web/core/l10n/translation"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { sprintf } from "@web/core/utils/strings"; export class ClosePosPopup extends AbstractAwaitablePopup { diff --git a/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.js b/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.js index bc9f998011c..aeca4ba03ae 100644 --- a/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.js +++ b/addons/point_of_sale/static/src/app/navbar/customer_facing_display_button/customer_facing_display_button.js @@ -2,7 +2,7 @@ import { Component, useState } from "@odoo/owl"; import { useService } from "@web/core/utils/hooks"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { _t } from "@web/core/l10n/translation"; export class CustomerFacingDisplayButton extends Component { diff --git a/addons/point_of_sale/static/src/app/navbar/navbar.js b/addons/point_of_sale/static/src/app/navbar/navbar.js index 1a9466728d7..4200ecc56e0 100644 --- a/addons/point_of_sale/static/src/app/navbar/navbar.js +++ b/addons/point_of_sale/static/src/app/navbar/navbar.js @@ -1,18 +1,18 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { useService } from "@web/core/utils/hooks"; -import { CashierName } from "@point_of_sale/js/ChromeWidgets/CashierName"; -import { CustomerFacingDisplayButton } from "@point_of_sale/js/ChromeWidgets/CustomerFacingDisplayButton"; -import { ProxyStatus } from "@point_of_sale/js/ChromeWidgets/ProxyStatus"; -import { SaleDetailsButton } from "@point_of_sale/js/ChromeWidgets/SaleDetailsButton"; -import { SyncNotification } from "@point_of_sale/js/ChromeWidgets/SyncNotification"; -import { CashMovePopup } from "./cash_move_popup/cash_move_popup"; -import { TicketScreen } from "@point_of_sale/js/Screens/TicketScreen/TicketScreen"; -import { BackButton } from "@point_of_sale/app/navbar/BackButton"; +import { CashierName } from "@point_of_sale/app/navbar/cashier_name/cashier_name"; +import { CustomerFacingDisplayButton } from "@point_of_sale/app/navbar/customer_facing_display_button/customer_facing_display_button"; +import { ProxyStatus } from "@point_of_sale/app/navbar/proxy_status/proxy_status"; +import { SaleDetailsButton } from "@point_of_sale/app/navbar/sale_details_button/sale_details_button"; +import { SyncNotification } from "@point_of_sale/app/navbar/sync_notification/sync_notification"; +import { CashMovePopup } from "@point_of_sale/app/navbar/cash_move_popup/cash_move_popup"; +import { TicketScreen } from "@point_of_sale/app/screens/ticket_screen/ticket_screen"; +import { BackButton } from "@point_of_sale/app/navbar/back_button/back_button"; import { Component, useState, useExternalListener } from "@odoo/owl"; -import { ClosePosPopup } from "@point_of_sale/js/Popups/ClosePosPopup"; +import { ClosePosPopup } from "@point_of_sale/app/navbar/closing_popup/closing_popup"; import { _t } from "@web/core/l10n/translation"; export class Navbar extends Component { diff --git a/addons/point_of_sale/static/src/app/navbar/proxy_status/proxy_status.js b/addons/point_of_sale/static/src/app/navbar/proxy_status/proxy_status.js index 9e7c1586db1..ca1641b866a 100644 --- a/addons/point_of_sale/static/src/app/navbar/proxy_status/proxy_status.js +++ b/addons/point_of_sale/static/src/app/navbar/proxy_status/proxy_status.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { Component, useState } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { useService } from "@web/core/utils/hooks"; import { _t } from "@web/core/l10n/translation"; diff --git a/addons/point_of_sale/static/src/app/navbar/sale_details_button/sale_details_button.js b/addons/point_of_sale/static/src/app/navbar/sale_details_button/sale_details_button.js index fa7c571b149..5e2f5a22a0c 100644 --- a/addons/point_of_sale/static/src/app/navbar/sale_details_button/sale_details_button.js +++ b/addons/point_of_sale/static/src/app/navbar/sale_details_button/sale_details_button.js @@ -2,9 +2,9 @@ import { useService } from "@web/core/utils/hooks"; import { renderToElement } from "@web/core/utils/render"; -import { ErrorPopup } from "../Popups/ErrorPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class SaleDetailsButton extends Component { static template = "SaleDetailsButton"; diff --git a/addons/point_of_sale/static/src/app/navbar/sync_notification/sync_notification.js b/addons/point_of_sale/static/src/app/navbar/sync_notification/sync_notification.js index 2f9c0258387..4ffddab8ea0 100644 --- a/addons/point_of_sale/static/src/app/navbar/sync_notification/sync_notification.js +++ b/addons/point_of_sale/static/src/app/navbar/sync_notification/sync_notification.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class SyncNotification extends Component { static template = "SyncNotification"; diff --git a/addons/point_of_sale/static/src/app/payment/payment_interface.js b/addons/point_of_sale/static/src/app/payment/payment_interface.js index d2e48c2601f..28910fa25f9 100644 --- a/addons/point_of_sale/static/src/app/payment/payment_interface.js +++ b/addons/point_of_sale/static/src/app/payment/payment_interface.js @@ -3,12 +3,12 @@ /** * Implement this interface to support a new payment method in the POS: * - * import { PaymentInterface } from "@point_of_sale/js/payment"; + * import { PaymentInterface } from "@point_of_sale/app/payment/payment_interface"; * class MyPayment extends PaymentInterface {} * * To connect the interface to the right payment methods register it: * - * import { register_payment_method } models from "@point_of_sale/js/models"; + * import { register_payment_method } models from "@point_of_sale/app/store/models"; * register_payment_method('my_payment', MyPayment); * * my_payment is the technical name of the added selection in diff --git a/addons/point_of_sale/static/src/app/pos_app.js b/addons/point_of_sale/static/src/app/pos_app.js index 511d74a9fb1..57bd131a4dc 100644 --- a/addons/point_of_sale/static/src/app/pos_app.js +++ b/addons/point_of_sale/static/src/app/pos_app.js @@ -5,7 +5,7 @@ import { Transition } from "@web/core/transition"; import { MainComponentsContainer } from "@web/core/main_components_container"; import { ErrorHandler } from "@web/core/utils/components"; import { Navbar } from "@point_of_sale/app/navbar/navbar"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { reactive, Component, onMounted } from "@odoo/owl"; /** diff --git a/addons/point_of_sale/static/src/app/screens/partner_list/partner_editor/partner_editor.js b/addons/point_of_sale/static/src/app/screens/partner_list/partner_editor/partner_editor.js index c06106c8b88..221a2e50796 100644 --- a/addons/point_of_sale/static/src/app/screens/partner_list/partner_editor/partner_editor.js +++ b/addons/point_of_sale/static/src/app/screens/partner_list/partner_editor/partner_editor.js @@ -2,10 +2,10 @@ import { _t } from "@web/core/l10n/translation"; import { getDataURLFromFile } from "@web/core/utils/urls"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { useService } from "@web/core/utils/hooks"; import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class PartnerDetailsEdit extends Component { static template = "PartnerDetailsEdit"; diff --git a/addons/point_of_sale/static/src/app/screens/partner_list/partner_list.js b/addons/point_of_sale/static/src/app/screens/partner_list/partner_list.js index d125ef0d4b5..826203e226e 100644 --- a/addons/point_of_sale/static/src/app/screens/partner_list/partner_list.js +++ b/addons/point_of_sale/static/src/app/screens/partner_list/partner_list.js @@ -4,9 +4,9 @@ import { registry } from "@web/core/registry"; import { debounce } from "@web/core/utils/timing"; import { useService } from "@web/core/utils/hooks"; -import { PartnerLine } from "./PartnerLine"; -import { PartnerDetailsEdit } from "./PartnerDetailsEdit"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { PartnerLine } from "@point_of_sale/app/screens/partner_list/partner_line/partner_line"; +import { PartnerDetailsEdit } from "@point_of_sale/app/screens/partner_list/partner_editor/partner_editor"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component, onWillUnmount, useRef, useState } from "@odoo/owl"; import { sprintf } from "@web/core/utils/strings"; diff --git a/addons/point_of_sale/static/src/app/screens/payment_screen/numpad/numpad.js b/addons/point_of_sale/static/src/app/screens/payment_screen/numpad/numpad.js index 62715e4421e..95b045ac153 100644 --- a/addons/point_of_sale/static/src/app/screens/payment_screen/numpad/numpad.js +++ b/addons/point_of_sale/static/src/app/screens/payment_screen/numpad/numpad.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PSNumpadInputButton } from "./PSNumpadInputButton"; +import { PSNumpadInputButton } from "@point_of_sale/app/screens/payment_screen/numpad/numpad_button/numpad_button"; import { Component } from "@odoo/owl"; import { useService } from "@web/core/utils/hooks"; diff --git a/addons/point_of_sale/static/src/app/screens/payment_screen/payment_lines/payment_lines.js b/addons/point_of_sale/static/src/app/screens/payment_screen/payment_lines/payment_lines.js index d8f24df7f0d..1b9688a340e 100644 --- a/addons/point_of_sale/static/src/app/screens/payment_screen/payment_lines/payment_lines.js +++ b/addons/point_of_sale/static/src/app/screens/payment_screen/payment_lines/payment_lines.js @@ -1,9 +1,9 @@ /** @odoo-module */ -import { NumberPopup } from "@point_of_sale/js/Popups/NumberPopup"; +import { NumberPopup } from "@point_of_sale/app/utils/input_popups/number_popup"; import { useService } from "@web/core/utils/hooks"; import { Component, useState } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class PaymentScreenPaymentLines extends Component { static template = "PaymentScreenPaymentLines"; diff --git a/addons/point_of_sale/static/src/app/screens/payment_screen/payment_screen.js b/addons/point_of_sale/static/src/app/screens/payment_screen/payment_screen.js index 789aaf7e729..86ebf0dc73a 100644 --- a/addons/point_of_sale/static/src/app/screens/payment_screen/payment_screen.js +++ b/addons/point_of_sale/static/src/app/screens/payment_screen/payment_screen.js @@ -1,20 +1,20 @@ /** @odoo-module */ import { parseFloat } from "@web/views/fields/parsers"; -import { useErrorHandlers } from "@point_of_sale/js/custom_hooks"; +import { useErrorHandlers } from "@point_of_sale/app/utils/hooks"; import { registry } from "@web/core/registry"; import { useService } from "@web/core/utils/hooks"; import { floatIsZero } from "@web/core/utils/numbers"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; -import { NumberPopup } from "@point_of_sale/js/Popups/NumberPopup"; -import { DatePickerPopup } from "@point_of_sale/js/Popups/DatePickerPopup"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +import { NumberPopup } from "@point_of_sale/app/utils/input_popups/number_popup"; +import { DatePickerPopup } from "@point_of_sale/app/utils/date_picker_popup/date_picker_popup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; -import { PaymentScreenNumpad } from "./PaymentScreenNumpad"; -import { PaymentScreenPaymentLines } from "./PaymentScreenPaymentLines"; -import { PaymentScreenStatus } from "./PaymentScreenStatus"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { PaymentScreenNumpad } from "@point_of_sale/app/screens/payment_screen/numpad/numpad"; +import { PaymentScreenPaymentLines } from "@point_of_sale/app/screens/payment_screen/payment_lines/payment_lines"; +import { PaymentScreenStatus } from "@point_of_sale/app/screens/payment_screen/payment_status/payment_status"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component, useState } from "@odoo/owl"; import { sprintf } from "@web/core/utils/strings"; diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/action_pad/action_pad.js b/addons/point_of_sale/static/src/app/screens/product_screen/action_pad/action_pad.js index 760885d7564..bcaf222fde1 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/action_pad/action_pad.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/action_pad/action_pad.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component, useState } from "@odoo/owl"; import { useService } from "@web/core/utils/hooks"; diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/control_buttons_popup.js b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/control_buttons_popup.js index 26fb5d678dc..2484712b446 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/control_buttons_popup.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/control_buttons_popup.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { _lt } from "@web/core/l10n/translation"; export class ControlButtonPopup extends AbstractAwaitablePopup { diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/customer_button/customer_button.js b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/customer_button/customer_button.js index 634575b6640..8f510889225 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/customer_button/customer_button.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/customer_button/customer_button.js @@ -1,7 +1,7 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { Component } from "@odoo/owl"; export class CustomerButton extends Component { diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/customer_note_button/customer_note_button.js b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/customer_note_button/customer_note_button.js index b5473e84ab2..5eab9320043 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/customer_note_button/customer_note_button.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/customer_note_button/customer_note_button.js @@ -1,10 +1,10 @@ /** @odoo-module */ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { useService } from "@web/core/utils/hooks"; -import { TextAreaPopup } from "@point_of_sale/js/Popups/TextAreaPopup"; +import { TextAreaPopup } from "@point_of_sale/app/utils/input_popups/textarea_popup"; import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class OrderlineCustomerNoteButton extends Component { static template = "OrderlineCustomerNoteButton"; diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/fiscal_position_button/fiscal_position_button.js b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/fiscal_position_button/fiscal_position_button.js index ccd69d8cbc1..bfbd55dd5d1 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/fiscal_position_button/fiscal_position_button.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/fiscal_position_button/fiscal_position_button.js @@ -1,10 +1,10 @@ /** @odoo-module */ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { useService } from "@web/core/utils/hooks"; -import { SelectionPopup } from "@point_of_sale/js/Popups/SelectionPopup"; +import { SelectionPopup } from "@point_of_sale/app/utils/input_popups/selection_popup"; import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class SetFiscalPositionButton extends Component { static template = "SetFiscalPositionButton"; diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/pricelist_button/pricelist_button.js b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/pricelist_button/pricelist_button.js index 212aad7af0c..c5261a402fc 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/pricelist_button/pricelist_button.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/pricelist_button/pricelist_button.js @@ -1,10 +1,10 @@ /** @odoo-module */ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { useService } from "@web/core/utils/hooks"; -import { SelectionPopup } from "@point_of_sale/js/Popups/SelectionPopup"; +import { SelectionPopup } from "@point_of_sale/app/utils/input_popups/selection_popup"; import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class SetPricelistButton extends Component { static template = "SetPricelistButton"; diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/product_info_button/product_info_button.js b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/product_info_button/product_info_button.js index cea11f368b4..7f951e1ea6e 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/product_info_button/product_info_button.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/product_info_button/product_info_button.js @@ -1,10 +1,10 @@ /** @odoo-module */ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { useService } from "@web/core/utils/hooks"; -import { ProductInfoPopup } from "@point_of_sale/js/Popups/ProductInfoPopup"; +import { ProductInfoPopup } from "@point_of_sale/app/screens/product_screen/product_info_popup/product_info_popup"; import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class ProductInfoButton extends Component { static template = "ProductInfoButton"; diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/refund_button/refund_button.js b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/refund_button/refund_button.js index 45a42ffcd0d..bda50a683d4 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/refund_button/refund_button.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/refund_button/refund_button.js @@ -1,7 +1,7 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { Component } from "@odoo/owl"; export class RefundButton extends Component { diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/save_button/save_button.js b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/save_button/save_button.js index 72efd32fc22..c4ece5787f4 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/save_button/save_button.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/save_button/save_button.js @@ -1,8 +1,8 @@ /** @odoo-module */ import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { useService } from "@web/core/utils/hooks"; export class SaveButton extends Component { diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/numpad/numpad.js b/addons/point_of_sale/static/src/app/screens/product_screen/numpad/numpad.js index 91c72b7653f..af2c08a3aab 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/numpad/numpad.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/numpad/numpad.js @@ -2,7 +2,7 @@ import { useService } from "@web/core/utils/hooks"; import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; /** * @prop {'quantity' | 'price' | 'discount'} activeMode diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/order/order.js b/addons/point_of_sale/static/src/app/screens/product_screen/order/order.js index 6cefca19bb6..2148611d01c 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/order/order.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/order/order.js @@ -1,12 +1,12 @@ /** @odoo-module */ import { useService } from "@web/core/utils/hooks"; -import { EditListPopup } from "@point_of_sale/js/Popups/EditListPopup"; +import { EditListPopup } from "@point_of_sale/app/store/select_lot_popup/select_lot_popup"; -import { Orderline } from "./Orderline"; -import { OrderSummary } from "./OrderSummary"; +import { Orderline } from "@point_of_sale/app/screens/product_screen/orderline/orderline"; +import { OrderSummary } from "@point_of_sale/app/screens/product_screen/order_summary/order_summary"; import { Component, useEffect, useRef } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class OrderWidget extends Component { static components = { Orderline, OrderSummary }; diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/order_summary/order_summary.js b/addons/point_of_sale/static/src/app/screens/product_screen/order_summary/order_summary.js index 2fb46ee7a38..13cfc48f370 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/order_summary/order_summary.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/order_summary/order_summary.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { floatIsZero } from "@web/core/utils/numbers"; export class OrderSummary extends Component { diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/orderline/orderline.js b/addons/point_of_sale/static/src/app/screens/product_screen/orderline/orderline.js index fe9b763024d..966a6f0831b 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/orderline/orderline.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/orderline/orderline.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class Orderline extends Component { static template = "Orderline"; diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/product/product.js b/addons/point_of_sale/static/src/app/screens/product_screen/product/product.js index 74fcee1645f..8548fd7ec93 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/product/product.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/product/product.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class ProductItem extends Component { static template = "ProductItem"; diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/product_info_popup/product_info_popup.js b/addons/point_of_sale/static/src/app/screens/product_screen/product_info_popup/product_info_popup.js index e5674a77141..f8e69bc2903 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/product_info_popup/product_info_popup.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/product_info_popup/product_info_popup.js @@ -1,7 +1,7 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; /** * Props: diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/product_list/control_panel/control_panel.js b/addons/point_of_sale/static/src/app/screens/product_screen/product_list/control_panel/control_panel.js index 50dd4bd1bb6..45d5ef646f5 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/product_list/control_panel/control_panel.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/product_list/control_panel/control_panel.js @@ -1,9 +1,9 @@ /** @odoo-module */ import { debounce } from "@web/core/utils/timing"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; -import { CategoryButton } from "./CategoryButton"; +import { CategoryButton } from "@point_of_sale/app/screens/product_screen/category_button/category_button"; import { Component, onMounted, onWillUnmount, useRef, useState } from "@odoo/owl"; import { useService } from "@web/core/utils/hooks"; diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.js b/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.js index 04319154e9e..717f4e8fd47 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.js @@ -1,15 +1,15 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { useService } from "@web/core/utils/hooks"; -import { identifyError } from "@point_of_sale/app/error_handlers/error_handlers"; +import { identifyError } from "@point_of_sale/app/errors/error_handlers"; import { ConnectionLostError, ConnectionAbortedError } from "@web/core/network/rpc_service"; -import { ProductItem } from "./ProductItem"; -import { ProductsWidgetControlPanel } from "./ProductsWidgetControlPanel"; +import { ProductItem } from "@point_of_sale/app/screens/product_screen/product/product"; +import { ProductsWidgetControlPanel } from "@point_of_sale/app/screens/product_screen/product_list/control_panel/control_panel"; import { Component, useState } from "@odoo/owl"; import { sprintf } from "@web/core/utils/strings"; -import { OfflineErrorPopup } from "@point_of_sale/js/Popups/OfflineErrorPopup"; +import { OfflineErrorPopup } from "@point_of_sale/app/errors/popups/offline_error_popup"; export class ProductsWidget extends Component { static components = { ProductItem, ProductsWidgetControlPanel }; diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/product_screen.js b/addons/point_of_sale/static/src/app/screens/product_screen/product_screen.js index db63d02dada..86527dc6d58 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/product_screen.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/product_screen.js @@ -1,25 +1,25 @@ /** @odoo-module */ -import { ControlButtonsMixin } from "@point_of_sale/js/ControlButtonsMixin"; +import { ControlButtonsMixin } from "@point_of_sale/app/utils/control_buttons_mixin"; import { registry } from "@web/core/registry"; import { useService } from "@web/core/utils/hooks"; -import { useBarcodeReader } from "@point_of_sale/app/barcode_reader_hook"; +import { useBarcodeReader } from "@point_of_sale/app/barcode/barcode_reader_hook"; import { parseFloat } from "@web/views/fields/parsers"; import { _lt } from "@web/core/l10n/translation"; -import { NumberPopup } from "@point_of_sale/js/Popups/NumberPopup"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; -import { ControlButtonPopup } from "@point_of_sale/js/Popups/ControlButtonPopup"; +import { NumberPopup } from "@point_of_sale/app/utils/input_popups/number_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +import { ControlButtonPopup } from "@point_of_sale/app/screens/product_screen/control_buttons/control_buttons_popup"; import { ConnectionLostError } from "@web/core/network/rpc_service"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component, onMounted, useState, useRef } from "@odoo/owl"; -import { ErrorBarcodePopup } from "@point_of_sale/js/Popups/ErrorBarcodePopup"; +import { ErrorBarcodePopup } from "@point_of_sale/app/barcode/error_popup/barcode_error_popup"; -import { NumpadWidget } from "./NumpadWidget"; -import { OrderWidget } from "./OrderWidget"; -import { ProductsWidget } from "./ProductsWidget"; -import { ActionpadWidget } from "./ActionpadWidget"; +import { NumpadWidget } from "@point_of_sale/app/screens/product_screen/numpad/numpad"; +import { OrderWidget } from "@point_of_sale/app/screens/product_screen/order/order"; +import { ProductsWidget } from "@point_of_sale/app/screens/product_screen/product_list/product_list"; +import { ActionpadWidget } from "@point_of_sale/app/screens/product_screen/action_pad/action_pad"; export class ProductScreen extends ControlButtonsMixin(Component) { static template = "ProductScreen"; diff --git a/addons/point_of_sale/static/src/app/screens/receipt_screen/abstract_receipt_screen.js b/addons/point_of_sale/static/src/app/screens/receipt_screen/abstract_receipt_screen.js index 4806556d125..6ca4a0cb5fe 100644 --- a/addons/point_of_sale/static/src/app/screens/receipt_screen/abstract_receipt_screen.js +++ b/addons/point_of_sale/static/src/app/screens/receipt_screen/abstract_receipt_screen.js @@ -1,8 +1,8 @@ /** @odoo-module */ import { useService } from "@web/core/utils/hooks"; -import { ConfirmPopup } from "../Popups/ConfirmPopup"; -import { ErrorPopup } from "../Popups/ErrorPopup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { Component, useRef } from "@odoo/owl"; /** diff --git a/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.js b/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.js index c84efd8f570..720b6b5ea21 100644 --- a/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.js +++ b/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.js @@ -1,7 +1,7 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; -import { WrappedProductNameLines } from "./WrappedProductNameLines"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { WrappedProductNameLines } from "@point_of_sale/app/screens/receipt_screen/receipt/wrapped_product_name"; import { Component, onWillUpdateProps } from "@odoo/owl"; export class OrderReceipt extends Component { diff --git a/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt_screen.js b/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt_screen.js index 0d3063009f3..252c729ada8 100644 --- a/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt_screen.js +++ b/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt_screen.js @@ -1,12 +1,12 @@ /** @odoo-module */ -import { useErrorHandlers } from "@point_of_sale/js/custom_hooks"; -import { AbstractReceiptScreen } from "@point_of_sale/js/Misc/AbstractReceiptScreen"; -import { OfflineErrorPopup } from "@point_of_sale/js/Popups/OfflineErrorPopup"; +import { useErrorHandlers } from "@point_of_sale/app/utils/hooks"; +import { AbstractReceiptScreen } from "@point_of_sale/app/screens/receipt_screen/abstract_receipt_screen"; +import { OfflineErrorPopup } from "@point_of_sale/app/errors/popups/offline_error_popup"; import { registry } from "@web/core/registry"; -import { OrderReceipt } from "./OrderReceipt"; +import { OrderReceipt } from "@point_of_sale/app/screens/receipt_screen/receipt/receipt"; import { onMounted, useRef, status, useState, onWillStart } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { useService } from "@web/core/utils/hooks"; import { BasePrinter } from "@point_of_sale/app/printer/base_printer"; diff --git a/addons/point_of_sale/static/src/app/screens/receipt_screen/reprint_receipt_screen.js b/addons/point_of_sale/static/src/app/screens/receipt_screen/reprint_receipt_screen.js index 7d7d7d27d72..ca64b48b0c8 100644 --- a/addons/point_of_sale/static/src/app/screens/receipt_screen/reprint_receipt_screen.js +++ b/addons/point_of_sale/static/src/app/screens/receipt_screen/reprint_receipt_screen.js @@ -1,9 +1,9 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; -import { AbstractReceiptScreen } from "@point_of_sale/js/Misc/AbstractReceiptScreen"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { AbstractReceiptScreen } from "@point_of_sale/app/screens/receipt_screen/abstract_receipt_screen"; import { registry } from "@web/core/registry"; -import { OrderReceipt } from "../ReceiptScreen/OrderReceipt"; +import { OrderReceipt } from "@point_of_sale/app/screens/receipt_screen/receipt/receipt"; export class ReprintReceiptScreen extends AbstractReceiptScreen { static template = "ReprintReceiptScreen"; diff --git a/addons/point_of_sale/static/src/app/screens/scale_screen/scale_screen.js b/addons/point_of_sale/static/src/app/screens/scale_screen/scale_screen.js index de57faf59b9..018c744c618 100644 --- a/addons/point_of_sale/static/src/app/screens/scale_screen/scale_screen.js +++ b/addons/point_of_sale/static/src/app/screens/scale_screen/scale_screen.js @@ -2,7 +2,7 @@ import { roundPrecision as round_pr } from "@web/core/utils/numbers"; import { registry } from "@web/core/registry"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component, onMounted, onWillUnmount, useExternalListener, useState } from "@odoo/owl"; import { useService } from "@web/core/utils/hooks"; diff --git a/addons/point_of_sale/static/src/app/screens/ticket_screen/invoice_button/invoice_button.js b/addons/point_of_sale/static/src/app/screens/ticket_screen/invoice_button/invoice_button.js index ab2af422bd8..ba3101e946f 100644 --- a/addons/point_of_sale/static/src/app/screens/ticket_screen/invoice_button/invoice_button.js +++ b/addons/point_of_sale/static/src/app/screens/ticket_screen/invoice_button/invoice_button.js @@ -1,9 +1,9 @@ /** @odoo-module */ import { useService } from "@web/core/utils/hooks"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component, useRef } from "@odoo/owl"; export class InvoiceButton extends Component { diff --git a/addons/point_of_sale/static/src/app/screens/ticket_screen/order_details/order_details.js b/addons/point_of_sale/static/src/app/screens/ticket_screen/order_details/order_details.js index d99a817ae15..4ffb08c7663 100644 --- a/addons/point_of_sale/static/src/app/screens/ticket_screen/order_details/order_details.js +++ b/addons/point_of_sale/static/src/app/screens/ticket_screen/order_details/order_details.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { OrderlineDetails } from "./OrderlineDetails"; +import { OrderlineDetails } from "@point_of_sale/app/screens/ticket_screen/order_details/orderline_details"; import { Component } from "@odoo/owl"; /** diff --git a/addons/point_of_sale/static/src/app/screens/ticket_screen/order_details/orderline_details.js b/addons/point_of_sale/static/src/app/screens/ticket_screen/order_details/orderline_details.js index b4125297e3e..aa19f567550 100644 --- a/addons/point_of_sale/static/src/app/screens/ticket_screen/order_details/orderline_details.js +++ b/addons/point_of_sale/static/src/app/screens/ticket_screen/order_details/orderline_details.js @@ -4,7 +4,7 @@ import { Component } from "@odoo/owl"; import { sprintf } from "@web/core/utils/strings"; import { formatFloat } from "@web/views/fields/formatters"; import { roundPrecision as round_pr } from "@web/core/utils/numbers"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; /** * @props {pos.order.line} line diff --git a/addons/point_of_sale/static/src/app/screens/ticket_screen/reprint_receipt_button/reprint_receipt_button.js b/addons/point_of_sale/static/src/app/screens/ticket_screen/reprint_receipt_button/reprint_receipt_button.js index 68fb68bc0ae..58da250304b 100644 --- a/addons/point_of_sale/static/src/app/screens/ticket_screen/reprint_receipt_button/reprint_receipt_button.js +++ b/addons/point_of_sale/static/src/app/screens/ticket_screen/reprint_receipt_button/reprint_receipt_button.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component } from "@odoo/owl"; export class ReprintReceiptButton extends Component { diff --git a/addons/point_of_sale/static/src/app/screens/ticket_screen/ticket_screen.js b/addons/point_of_sale/static/src/app/screens/ticket_screen/ticket_screen.js index 6c5c901fb8e..af2cf895614 100644 --- a/addons/point_of_sale/static/src/app/screens/ticket_screen/ticket_screen.js +++ b/addons/point_of_sale/static/src/app/screens/ticket_screen/ticket_screen.js @@ -1,22 +1,22 @@ /** @odoo-module */ -import { Order } from "@point_of_sale/js/models"; +import { Order } from "@point_of_sale/app/store/models"; import { registry } from "@web/core/registry"; import { useService } from "@web/core/utils/hooks"; import { deserializeDateTime } from "@web/core/l10n/dates"; import { parseFloat } from "@web/views/fields/parsers"; import { _lt } from "@web/core/l10n/translation"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; -import { ActionpadWidget } from "../ProductScreen/ActionpadWidget"; -import { InvoiceButton } from "../TicketScreen/ControlButtons/InvoiceButton"; -import { NumpadWidget } from "../ProductScreen/NumpadWidget"; -import { OrderDetails } from "../TicketScreen/OrderDetails"; -import { ReprintReceiptButton } from "./ControlButtons/ReprintReceiptButton"; -import { SearchBar } from "../../Misc/SearchBar"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { ActionpadWidget } from "@point_of_sale/app/screens/product_screen/action_pad/action_pad"; +import { InvoiceButton } from "@point_of_sale/app/screens/ticket_screen/invoice_button/invoice_button"; +import { NumpadWidget } from "@point_of_sale/app/screens/product_screen/numpad/numpad"; +import { OrderDetails } from "@point_of_sale/app/screens/ticket_screen/order_details/order_details"; +import { ReprintReceiptButton } from "@point_of_sale/app/screens/ticket_screen/reprint_receipt_button/reprint_receipt_button"; +import { SearchBar } from "@point_of_sale/app/screens/ticket_screen/search_bar/search_bar"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component, onMounted, useState } from "@odoo/owl"; import { sprintf } from "@web/core/utils/strings"; diff --git a/addons/point_of_sale/static/src/app/store/cash_opening_popup/cash_opening_popup.js b/addons/point_of_sale/static/src/app/store/cash_opening_popup/cash_opening_popup.js index 758f69f66ea..01b2025c19e 100644 --- a/addons/point_of_sale/static/src/app/store/cash_opening_popup/cash_opening_popup.js +++ b/addons/point_of_sale/static/src/app/store/cash_opening_popup/cash_opening_popup.js @@ -1,9 +1,9 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { useAutofocus, useService } from "@web/core/utils/hooks"; -import { usePos } from "@point_of_sale/app/pos_hook"; -import { MoneyDetailsPopup } from "./MoneyDetailsPopup"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { MoneyDetailsPopup } from "@point_of_sale/app/utils/money_details_popup/money_details_popup"; import { useState } from "@odoo/owl"; import { _t } from "@web/core/l10n/translation"; diff --git a/addons/point_of_sale/static/src/app/store/models.js b/addons/point_of_sale/static/src/app/store/models.js index 8b533dce7e7..9d9c3b536fc 100644 --- a/addons/point_of_sale/static/src/app/store/models.js +++ b/addons/point_of_sale/static/src/app/store/models.js @@ -1,9 +1,9 @@ /** @odoo-module */ /* global waitForWebfonts */ -import { PosDB } from "@point_of_sale/js/db"; +import { PosDB } from "@point_of_sale/app/store/db"; import { formatFloat } from "@web/views/fields/formatters"; -import { uuidv4, batched, deduceUrl } from "@point_of_sale/js/utils"; +import { uuidv4, batched, deduceUrl } from "@point_of_sale/utils"; import { HWPrinter } from "@point_of_sale/app/printer/hw_printer"; // FIXME POSREF - unify use of native parseFloat and web's parseFloat. We probably don't need the native version. import { parseFloat as oParseFloat } from "@web/views/fields/parsers"; @@ -13,11 +13,11 @@ import { roundPrecision as round_pr, floatIsZero, } from "@web/core/utils/numbers"; -import { ErrorPopup } from "./Popups/ErrorPopup"; -import { ProductConfiguratorPopup } from "@point_of_sale/js/Popups/ProductConfiguratorPopup"; -import { EditListPopup } from "@point_of_sale/js/Popups/EditListPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +import { ProductConfiguratorPopup } from "@point_of_sale/app/store/product_configurator_popup/product_configurator_popup"; +import { EditListPopup } from "@point_of_sale/app/store/select_lot_popup/select_lot_popup"; import { markRaw, reactive } from "@odoo/owl"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; import { sprintf } from "@web/core/utils/strings"; import { Mutex } from "@web/core/utils/concurrency"; import { memoize } from "@web/core/utils/functions"; diff --git a/addons/point_of_sale/static/src/app/store/pos_hook.js b/addons/point_of_sale/static/src/app/store/pos_hook.js index 73c1ad3778e..cc2fef306b0 100644 --- a/addons/point_of_sale/static/src/app/store/pos_hook.js +++ b/addons/point_of_sale/static/src/app/store/pos_hook.js @@ -4,7 +4,7 @@ import { useState } from "@odoo/owl"; import { useService } from "@web/core/utils/hooks"; /** - * @returns {import("./pos_store").PosStore} + * @returns {import("@point_of_sale/app/store/pos_store").PosStore} */ export function usePos() { return useState(useService("pos")); diff --git a/addons/point_of_sale/static/src/app/store/pos_store.js b/addons/point_of_sale/static/src/app/store/pos_store.js index 21ba4f59e3e..7abfd1518dc 100644 --- a/addons/point_of_sale/static/src/app/store/pos_store.js +++ b/addons/point_of_sale/static/src/app/store/pos_store.js @@ -1,16 +1,16 @@ /** @odoo-module */ -import { PosGlobalState } from "@point_of_sale/js/models"; +import { PosGlobalState } from "@point_of_sale/app/store/models"; import { registry } from "@web/core/registry"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; import { Reactive } from "@point_of_sale/utils"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { _t } from "@web/core/l10n/translation"; -import { CashOpeningPopup } from "@point_of_sale/js/Popups/CashOpeningPopup"; +import { CashOpeningPopup } from "@point_of_sale/app/store/cash_opening_popup/cash_opening_popup"; import { sprintf } from "@web/core/utils/strings"; -import { PaymentScreen } from "@point_of_sale/js/Screens/PaymentScreen/PaymentScreen"; -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; export class PosStore extends Reactive { hasBigScrollBars = false; diff --git a/addons/point_of_sale/static/src/app/store/product_configurator_popup/product_configurator_popup.js b/addons/point_of_sale/static/src/app/store/product_configurator_popup/product_configurator_popup.js index 2f01b335932..f5abeaa82fd 100644 --- a/addons/point_of_sale/static/src/app/store/product_configurator_popup/product_configurator_popup.js +++ b/addons/point_of_sale/static/src/app/store/product_configurator_popup/product_configurator_popup.js @@ -1,5 +1,5 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { Component, useRef, useState, useSubEnv } from "@odoo/owl"; import { useService } from "@web/core/utils/hooks"; diff --git a/addons/point_of_sale/static/src/app/store/select_lot_popup/select_lot_popup.js b/addons/point_of_sale/static/src/app/store/select_lot_popup/select_lot_popup.js index b69bf90a56d..63c644fbf62 100644 --- a/addons/point_of_sale/static/src/app/store/select_lot_popup/select_lot_popup.js +++ b/addons/point_of_sale/static/src/app/store/select_lot_popup/select_lot_popup.js @@ -1,10 +1,10 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; -import { useAutoFocusToLast } from "@point_of_sale/js/custom_hooks"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; +import { useAutoFocusToLast } from "@point_of_sale/app/utils/hooks"; import { _lt } from "@web/core/l10n/translation"; import { useState } from "@odoo/owl"; -import { EditListInput } from "./EditListInput"; +import { EditListInput } from "@point_of_sale/app/store/select_lot_popup/edit_list_input/edit_list_input"; /** * Given a array of { id, text }, we show the user this popup to be able to modify this given array. diff --git a/addons/point_of_sale/static/src/app/utils/alert_popup/alert_popup.js b/addons/point_of_sale/static/src/app/utils/alert_popup/alert_popup.js index df5ac2126e7..bdceae2559b 100644 --- a/addons/point_of_sale/static/src/app/utils/alert_popup/alert_popup.js +++ b/addons/point_of_sale/static/src/app/utils/alert_popup/alert_popup.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { _lt } from "@web/core/l10n/translation"; export class AlertPopup extends AbstractAwaitablePopup { diff --git a/addons/point_of_sale/static/src/app/utils/confirm_popup/confirm_popup.js b/addons/point_of_sale/static/src/app/utils/confirm_popup/confirm_popup.js index ab143b7e21d..353ee7757d6 100644 --- a/addons/point_of_sale/static/src/app/utils/confirm_popup/confirm_popup.js +++ b/addons/point_of_sale/static/src/app/utils/confirm_popup/confirm_popup.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { _lt } from "@web/core/l10n/translation"; export class ConfirmPopup extends AbstractAwaitablePopup { diff --git a/addons/point_of_sale/static/src/app/utils/date_picker_popup/date_picker_popup.js b/addons/point_of_sale/static/src/app/utils/date_picker_popup/date_picker_popup.js index e2a32a87db8..3291d149a87 100644 --- a/addons/point_of_sale/static/src/app/utils/date_picker_popup/date_picker_popup.js +++ b/addons/point_of_sale/static/src/app/utils/date_picker_popup/date_picker_popup.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { _lt } from "@web/core/l10n/translation"; import { onMounted, useRef, useState } from "@odoo/owl"; diff --git a/addons/point_of_sale/static/src/app/utils/hooks.js b/addons/point_of_sale/static/src/app/utils/hooks.js index b31b8f4688e..b34090f7811 100644 --- a/addons/point_of_sale/static/src/app/utils/hooks.js +++ b/addons/point_of_sale/static/src/app/utils/hooks.js @@ -1,8 +1,8 @@ /** @odoo-module */ -import { OfflineErrorPopup } from "./Popups/OfflineErrorPopup"; -import { ConfirmPopup } from "./Popups/ConfirmPopup"; -import { ErrorTracebackPopup } from "./Popups/ErrorTracebackPopup"; -import { ErrorPopup } from "./Popups/ErrorPopup"; +import { OfflineErrorPopup } from "@point_of_sale/app/errors/popups/offline_error_popup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; +import { ErrorTracebackPopup } from "@point_of_sale/app/errors/popups/error_traceback_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { useEnv, onMounted, onPatched, useComponent, useRef } from "@odoo/owl"; /** diff --git a/addons/point_of_sale/static/src/app/utils/input_popups/number_popup.js b/addons/point_of_sale/static/src/app/utils/input_popups/number_popup.js index 0c48e37162b..515674a5eef 100644 --- a/addons/point_of_sale/static/src/app/utils/input_popups/number_popup.js +++ b/addons/point_of_sale/static/src/app/utils/input_popups/number_popup.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { _t } from "@web/core/l10n/translation"; -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { useService } from "@web/core/utils/hooks"; import { useState, useRef, onMounted } from "@odoo/owl"; diff --git a/addons/point_of_sale/static/src/app/utils/input_popups/selection_popup.js b/addons/point_of_sale/static/src/app/utils/input_popups/selection_popup.js index d6e055e16b3..e3631ae0b8c 100644 --- a/addons/point_of_sale/static/src/app/utils/input_popups/selection_popup.js +++ b/addons/point_of_sale/static/src/app/utils/input_popups/selection_popup.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { _lt } from "@web/core/l10n/translation"; import { useState } from "@odoo/owl"; diff --git a/addons/point_of_sale/static/src/app/utils/input_popups/text_input_popup.js b/addons/point_of_sale/static/src/app/utils/input_popups/text_input_popup.js index 455f7e264a5..37b2882ad34 100644 --- a/addons/point_of_sale/static/src/app/utils/input_popups/text_input_popup.js +++ b/addons/point_of_sale/static/src/app/utils/input_popups/text_input_popup.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { _lt } from "@web/core/l10n/translation"; import { onMounted, useRef, useState } from "@odoo/owl"; diff --git a/addons/point_of_sale/static/src/app/utils/input_popups/textarea_popup.js b/addons/point_of_sale/static/src/app/utils/input_popups/textarea_popup.js index ff72c604770..12d5464dd3c 100644 --- a/addons/point_of_sale/static/src/app/utils/input_popups/textarea_popup.js +++ b/addons/point_of_sale/static/src/app/utils/input_popups/textarea_popup.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { _lt } from "@web/core/l10n/translation"; import { onMounted, useRef, useState } from "@odoo/owl"; diff --git a/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.js b/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.js index b78b5f3ea46..42682bb3b56 100644 --- a/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.js +++ b/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.js @@ -1,8 +1,8 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { useState } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { floatIsZero } from "@web/core/utils/numbers"; export class MoneyDetailsPopup extends AbstractAwaitablePopup { diff --git a/addons/point_of_sale/static/src/legacy_utils.js b/addons/point_of_sale/static/src/legacy_utils.js deleted file mode 100644 index 8a0473ad674..00000000000 --- a/addons/point_of_sale/static/src/legacy_utils.js +++ /dev/null @@ -1,56 +0,0 @@ -/** @odoo-module */ - -/** - * Creates a batched version of a callback so that all calls to it in the same - * microtick will only call the original callback once. - * - * @param callback the callback to batch - * @returns a batched version of the original callback - */ -export function batched(callback) { - let called = false; - return async (...args) => { - // This await blocks all calls to the callback here, then releases them sequentially - // in the next microtick. This line decides the granularity of the batch. - await Promise.resolve(); - if (!called) { - called = true; - // so that only the first call to the batched function calls the original callback. - // Schedule this before calling the callback so that calls to the batched function - // within the callback will proceed only after resetting called to false, and have - // a chance to execute the callback again - Promise.resolve().then(() => (called = false)); - callback(...args); - } - }; -} - -/* - * comes from o_spreadsheet.js - * https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript - * */ -export function uuidv4() { - // mainly for jest and other browsers that do not have the crypto functionality - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { - const r = (Math.random() * 16) | 0, - v = c == "x" ? r : (r & 0x3) | 0x8; - return v.toString(16); - }); -} - -/** - * Formats the given `url` with correct protocol and port. - * Useful for communicating to local iot box instance. - * @param {string} url - * @returns {string} - */ -export function deduceUrl(url) { - const { protocol } = window.location; - if (!url.includes("//")) { - url = `${protocol}//${url}`; - } - if (url.indexOf(":", 6) < 0) { - url += ":" + (protocol === "https:" ? 443 : 8069); - } - return url; -} diff --git a/addons/point_of_sale/static/src/utils.js b/addons/point_of_sale/static/src/utils.js index 2ec4e530f29..887ce13bcba 100644 --- a/addons/point_of_sale/static/src/utils.js +++ b/addons/point_of_sale/static/src/utils.js @@ -47,3 +47,58 @@ export class Reactive { return reactive(this); } } + +/** + * Creates a batched version of a callback so that all calls to it in the same + * microtick will only call the original callback once. + * + * @param callback the callback to batch + * @returns a batched version of the original callback + */ +export function batched(callback) { + let called = false; + return async (...args) => { + // This await blocks all calls to the callback here, then releases them sequentially + // in the next microtick. This line decides the granularity of the batch. + await Promise.resolve(); + if (!called) { + called = true; + // so that only the first call to the batched function calls the original callback. + // Schedule this before calling the callback so that calls to the batched function + // within the callback will proceed only after resetting called to false, and have + // a chance to execute the callback again + Promise.resolve().then(() => (called = false)); + callback(...args); + } + }; +} + +/* + * comes from o_spreadsheet.js + * https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript + * */ +export function uuidv4() { + // mainly for jest and other browsers that do not have the crypto functionality + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { + const r = (Math.random() * 16) | 0, + v = c == "x" ? r : (r & 0x3) | 0x8; + return v.toString(16); + }); +} + +/** + * Formats the given `url` with correct protocol and port. + * Useful for communicating to local iot box instance. + * @param {string} url + * @returns {string} + */ +export function deduceUrl(url) { + const { protocol } = window.location; + if (!url.includes("//")) { + url = `${protocol}//${url}`; + } + if (url.indexOf(":", 6) < 0) { + url += ":" + (protocol === "https:" ? 443 : 8069); + } + return url; +} diff --git a/addons/point_of_sale/static/tests/tours/helpers/utils.js b/addons/point_of_sale/static/tests/tours/helpers/utils.js index 80a9d6fcab5..36af8efb16e 100644 --- a/addons/point_of_sale/static/tests/tours/helpers/utils.js +++ b/addons/point_of_sale/static/tests/tours/helpers/utils.js @@ -5,7 +5,7 @@ * ----- * * ``` - * import const { startSteps, getSteps, createTourMethods } from "@point_of_sale/js/utils"; + * import const { startSteps, getSteps, createTourMethods } from "@point_of_sale/utils"; * import const { Other } from "@point_of_sale/../tests/OtherMethods"; * * // 1. Define classes Do, Check and Execute having methods that diff --git a/addons/point_of_sale/static/tests/unit/number_buffer_service_tests.js b/addons/point_of_sale/static/tests/unit/number_buffer_service_tests.js index 82c542fe779..437a2fb8a0a 100644 --- a/addons/point_of_sale/static/tests/unit/number_buffer_service_tests.js +++ b/addons/point_of_sale/static/tests/unit/number_buffer_service_tests.js @@ -3,7 +3,7 @@ import testUtils from "web.test_utils"; import { mount } from "@web/../tests/helpers/utils"; import { useService } from "@web/core/utils/hooks"; -import { numberBufferService } from "@point_of_sale/app/number_buffer_service"; +import { numberBufferService } from "@point_of_sale/app/utils/number_buffer_service"; import { registry } from "@web/core/registry"; import { makeTestEnv } from "@web/../tests/helpers/mock_env"; diff --git a/addons/point_of_sale/static/tests/unit/popup_controller_tests.js b/addons/point_of_sale/static/tests/unit/popup_controller_tests.js index d1714a51be6..2cc90067bf7 100644 --- a/addons/point_of_sale/static/tests/unit/popup_controller_tests.js +++ b/addons/point_of_sale/static/tests/unit/popup_controller_tests.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import makeTestEnvironment from "web.test_env"; import { click, getFixture, mount, nextTick, triggerEvent } from "@web/../tests/helpers/utils"; import { clearRegistryWithCleanup, makeTestEnv } from "@web/../tests/helpers/mock_env"; diff --git a/addons/point_of_sale/static/tests/unit/pos_app_tests.js b/addons/point_of_sale/static/tests/unit/pos_app_tests.js index 4d071efdce7..a99764bdef2 100644 --- a/addons/point_of_sale/static/tests/unit/pos_app_tests.js +++ b/addons/point_of_sale/static/tests/unit/pos_app_tests.js @@ -1,11 +1,11 @@ /** @odoo-module */ -import { Chrome } from "@point_of_sale/js/Chrome"; +import { Chrome } from "@point_of_sale/app/pos_app"; import { getFixture, mount } from "@web/../tests/helpers/utils"; import { makeTestEnv } from "@web/../tests/helpers/mock_env"; import { registry } from "@web/core/registry"; -import { posService } from "@point_of_sale/app/pos_store"; -import { numberBufferService } from "@point_of_sale/app/number_buffer_service"; -import { barcodeReaderService } from "@point_of_sale/app/barcode_reader_service"; +import { posService } from "@point_of_sale/app/store/pos_store"; +import { numberBufferService } from "@point_of_sale/app/utils/number_buffer_service"; +import { barcodeReaderService } from "@point_of_sale/app/barcode/barcode_reader_service"; import { EventBus } from "@odoo/owl"; import { uiService } from "@web/core/ui/ui_service"; diff --git a/addons/pos_adyen/static/src/js/PaymentScreen.js b/addons/pos_adyen/static/src/js/PaymentScreen.js index 5dd7ecb281d..ed469eeea7f 100644 --- a/addons/pos_adyen/static/src/js/PaymentScreen.js +++ b/addons/pos_adyen/static/src/js/PaymentScreen.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PaymentScreen } from "@point_of_sale/js/Screens/PaymentScreen/PaymentScreen"; +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; import { patch } from "@web/core/utils/patch"; import { onMounted } from "@odoo/owl"; @@ -16,9 +16,7 @@ patch(PaymentScreen.prototype, "pos_adyen.PaymentScreen", { ); if (pendingPaymentLine) { const paymentTerminal = pendingPaymentLine.payment_method.payment_terminal; - paymentTerminal.set_most_recent_service_id( - pendingPaymentLine.terminalServiceId - ); + paymentTerminal.set_most_recent_service_id(pendingPaymentLine.terminalServiceId); pendingPaymentLine.set_payment_status("waiting"); paymentTerminal.start_get_status_polling().then((isPaymentSuccessful) => { if (isPaymentSuccessful) { diff --git a/addons/pos_adyen/static/src/js/models.js b/addons/pos_adyen/static/src/js/models.js index f625742d560..f06be3e79c7 100644 --- a/addons/pos_adyen/static/src/js/models.js +++ b/addons/pos_adyen/static/src/js/models.js @@ -1,5 +1,5 @@ /** @odoo-module */ -import { register_payment_method, Payment } from "@point_of_sale/js/models"; +import { register_payment_method, Payment } from "@point_of_sale/app/store/models"; import { PaymentAdyen } from "@pos_adyen/js/payment_adyen"; import { patch } from "@web/core/utils/patch"; diff --git a/addons/pos_adyen/static/src/js/payment_adyen.js b/addons/pos_adyen/static/src/js/payment_adyen.js index ac25a5d3353..f30b9da911a 100644 --- a/addons/pos_adyen/static/src/js/payment_adyen.js +++ b/addons/pos_adyen/static/src/js/payment_adyen.js @@ -1,8 +1,8 @@ /** @odoo-module */ import { _t } from "@web/core/l10n/translation"; -import { PaymentInterface } from "@point_of_sale/js/payment"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { PaymentInterface } from "@point_of_sale/app/payment/payment_interface"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { sprintf } from "@web/core/utils/strings"; export class PaymentAdyen extends PaymentInterface { diff --git a/addons/pos_discount/static/src/js/DiscountButton.js b/addons/pos_discount/static/src/js/DiscountButton.js index 5b58cf95ec4..ba20793889b 100644 --- a/addons/pos_discount/static/src/js/DiscountButton.js +++ b/addons/pos_discount/static/src/js/DiscountButton.js @@ -1,12 +1,12 @@ /** @odoo-module */ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { useService } from "@web/core/utils/hooks"; -import { NumberPopup } from "@point_of_sale/js/Popups/NumberPopup"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { NumberPopup } from "@point_of_sale/app/utils/input_popups/number_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { Component } from "@odoo/owl"; import { sprintf } from "@web/core/utils/strings"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class DiscountButton extends Component { static template = "DiscountButton"; diff --git a/addons/pos_epson_printer/static/src/js/models.js b/addons/pos_epson_printer/static/src/js/models.js index ca4c270a513..9fa92851851 100644 --- a/addons/pos_epson_printer/static/src/js/models.js +++ b/addons/pos_epson_printer/static/src/js/models.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PosGlobalState } from "@point_of_sale/js/models"; +import { PosGlobalState } from "@point_of_sale/app/store/models"; import { EpsonPrinter } from "@pos_epson_printer/js/epson_printer"; import { patch } from "@web/core/utils/patch"; diff --git a/addons/pos_hr/static/src/app/navbar.js b/addons/pos_hr/static/src/app/navbar.js index 045c5ce7535..458099b0580 100644 --- a/addons/pos_hr/static/src/app/navbar.js +++ b/addons/pos_hr/static/src/app/navbar.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { Navbar } from "@point_of_sale/app/navbar/navbar"; -import { HeaderLockButton } from "../js/HeaderLockButton"; +import { HeaderLockButton } from "@pos_hr/js/HeaderLockButton"; import { patch } from "@web/core/utils/patch"; patch(Navbar, "pos_hr.Navbar", { diff --git a/addons/pos_hr/static/src/app/pos_store.js b/addons/pos_hr/static/src/app/pos_store.js index c97f7a5e68a..2fcf53ef6ba 100644 --- a/addons/pos_hr/static/src/app/pos_store.js +++ b/addons/pos_hr/static/src/app/pos_store.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { patch } from "@web/core/utils/patch"; -import { PosStore } from "@point_of_sale/app/pos_store"; +import { PosStore } from "@point_of_sale/app/store/pos_store"; patch(PosStore.prototype, "pos_hr.PosStore", { async setup() { diff --git a/addons/pos_hr/static/src/js/CashierName.js b/addons/pos_hr/static/src/js/CashierName.js index 3767338cd12..e6732c7c2c5 100644 --- a/addons/pos_hr/static/src/js/CashierName.js +++ b/addons/pos_hr/static/src/js/CashierName.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { CashierName } from "@point_of_sale/js/ChromeWidgets/CashierName"; +import { CashierName } from "@point_of_sale/app/navbar/cashier_name/cashier_name"; import { patch } from "@web/core/utils/patch"; import { useCashierSelector } from "@pos_hr/js/SelectCashierMixin"; diff --git a/addons/pos_hr/static/src/js/Chrome.js b/addons/pos_hr/static/src/js/Chrome.js index b26ba2191d2..7a602646977 100644 --- a/addons/pos_hr/static/src/js/Chrome.js +++ b/addons/pos_hr/static/src/js/Chrome.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { Chrome } from "@point_of_sale/js/Chrome"; +import { Chrome } from "@point_of_sale/app/pos_app"; import { patch } from "@web/core/utils/patch"; patch(Chrome.prototype, "pos_hr.Chrome", { diff --git a/addons/pos_hr/static/src/js/HeaderLockButton.js b/addons/pos_hr/static/src/js/HeaderLockButton.js index 5a947f53b68..69d7abcf865 100644 --- a/addons/pos_hr/static/src/js/HeaderLockButton.js +++ b/addons/pos_hr/static/src/js/HeaderLockButton.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class HeaderLockButton extends Component { static template = "HeaderLockButton"; diff --git a/addons/pos_hr/static/src/js/LoginScreen.js b/addons/pos_hr/static/src/js/LoginScreen.js index 4f29ad8aa15..515ea3def78 100644 --- a/addons/pos_hr/static/src/js/LoginScreen.js +++ b/addons/pos_hr/static/src/js/LoginScreen.js @@ -2,7 +2,7 @@ import { useCashierSelector } from "@pos_hr/js/SelectCashierMixin"; import { registry } from "@web/core/registry"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component } from "@odoo/owl"; export class LoginScreen extends Component { diff --git a/addons/pos_hr/static/src/js/PaymentScreen.js b/addons/pos_hr/static/src/js/PaymentScreen.js index 1c30569a260..ca7ee153e78 100644 --- a/addons/pos_hr/static/src/js/PaymentScreen.js +++ b/addons/pos_hr/static/src/js/PaymentScreen.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PaymentScreen } from "@point_of_sale/js/Screens/PaymentScreen/PaymentScreen"; +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; import { patch } from "@web/core/utils/patch"; patch(PaymentScreen.prototype, "pos_hr.PaymentScreen", { diff --git a/addons/pos_hr/static/src/js/SelectCashierMixin.js b/addons/pos_hr/static/src/js/SelectCashierMixin.js index 8c15498ad09..393813b7ce9 100644 --- a/addons/pos_hr/static/src/js/SelectCashierMixin.js +++ b/addons/pos_hr/static/src/js/SelectCashierMixin.js @@ -3,12 +3,12 @@ import { _t } from "@web/core/l10n/translation"; -import { NumberPopup } from "@point_of_sale/js/Popups/NumberPopup"; -import { SelectionPopup } from "@point_of_sale/js/Popups/SelectionPopup"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { NumberPopup } from "@point_of_sale/app/utils/input_popups/number_popup"; +import { SelectionPopup } from "@point_of_sale/app/utils/input_popups/selection_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { useService } from "@web/core/utils/hooks"; -import { useBarcodeReader } from "@point_of_sale/app/barcode_reader_hook"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { useBarcodeReader } from "@point_of_sale/app/barcode/barcode_reader_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export function useCashierSelector( { onCashierChanged, exclusive } = { onCashierChanged: () => {}, exclusive: false } diff --git a/addons/pos_hr/static/src/js/models.js b/addons/pos_hr/static/src/js/models.js index 27ac6f2663c..0f56a277d8e 100644 --- a/addons/pos_hr/static/src/js/models.js +++ b/addons/pos_hr/static/src/js/models.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PosGlobalState, Order } from "@point_of_sale/js/models"; +import { PosGlobalState, Order } from "@point_of_sale/app/store/models"; import { patch } from "@web/core/utils/patch"; patch(PosGlobalState.prototype, "pos_hr.PosGlobalState", { diff --git a/addons/pos_hr_restaurant/static/src/app/pos_store.js b/addons/pos_hr_restaurant/static/src/app/pos_store.js index bc5e603dbf5..1dc7b6ea822 100644 --- a/addons/pos_hr_restaurant/static/src/app/pos_store.js +++ b/addons/pos_hr_restaurant/static/src/app/pos_store.js @@ -2,7 +2,7 @@ import { patch } from "@web/core/utils/patch"; import "@pos_restaurant/app/pos_store"; -import { PosStore } from "@point_of_sale/app/pos_store"; +import { PosStore } from "@point_of_sale/app/store/pos_store"; patch(PosStore.prototype, "pos_hr_restaurant.PosStore", { shouldResetIdleTimer() { diff --git a/addons/pos_loyalty/static/src/app/pos_store.js b/addons/pos_loyalty/static/src/app/pos_store.js index 830b115a0fa..78294d33b34 100644 --- a/addons/pos_loyalty/static/src/app/pos_store.js +++ b/addons/pos_loyalty/static/src/app/pos_store.js @@ -1,11 +1,11 @@ /** @odoo-module */ import { patch } from "@web/core/utils/patch"; -import { PosStore } from "@point_of_sale/app/pos_store"; +import { PosStore } from "@point_of_sale/app/store/pos_store"; import { _t } from "@web/core/l10n/translation"; -import { SelectionPopup } from "@point_of_sale/js/Popups/SelectionPopup"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; -import { TextInputPopup } from "@point_of_sale/js/Popups/TextInputPopup"; +import { SelectionPopup } from "@point_of_sale/app/utils/input_popups/selection_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +import { TextInputPopup } from "@point_of_sale/app/utils/input_popups/text_input_popup"; patch(PosStore.prototype, "pos_loyalty.PosStore", { async addProductFromUi(product, options) { diff --git a/addons/pos_loyalty/static/src/js/ControlButtons/PromoCodeButton.js b/addons/pos_loyalty/static/src/js/ControlButtons/PromoCodeButton.js index e33e38cbed2..39c0bcaf0c6 100644 --- a/addons/pos_loyalty/static/src/js/ControlButtons/PromoCodeButton.js +++ b/addons/pos_loyalty/static/src/js/ControlButtons/PromoCodeButton.js @@ -1,10 +1,10 @@ /** @odoo-module **/ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { useService } from "@web/core/utils/hooks"; -import { TextInputPopup } from "@point_of_sale/js/Popups/TextInputPopup"; +import { TextInputPopup } from "@point_of_sale/app/utils/input_popups/text_input_popup"; import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class PromoCodeButton extends Component { static template = "PromoCodeButton"; diff --git a/addons/pos_loyalty/static/src/js/ControlButtons/ResetProgramsButton.js b/addons/pos_loyalty/static/src/js/ControlButtons/ResetProgramsButton.js index 5d67469dc82..871a6fea277 100644 --- a/addons/pos_loyalty/static/src/js/ControlButtons/ResetProgramsButton.js +++ b/addons/pos_loyalty/static/src/js/ControlButtons/ResetProgramsButton.js @@ -1,8 +1,8 @@ /** @odoo-module **/ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class ResetProgramsButton extends Component { static template = "ResetProgramsButton"; diff --git a/addons/pos_loyalty/static/src/js/ControlButtons/RewardButton.js b/addons/pos_loyalty/static/src/js/ControlButtons/RewardButton.js index 70faf91e5e6..47c23dfd8df 100644 --- a/addons/pos_loyalty/static/src/js/ControlButtons/RewardButton.js +++ b/addons/pos_loyalty/static/src/js/ControlButtons/RewardButton.js @@ -1,9 +1,9 @@ /** @odoo-module **/ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { useService } from "@web/core/utils/hooks"; -import { SelectionPopup } from "@point_of_sale/js/Popups/SelectionPopup"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { SelectionPopup } from "@point_of_sale/app/utils/input_popups/selection_popup"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component } from "@odoo/owl"; export class RewardButton extends Component { diff --git a/addons/pos_loyalty/static/src/js/ControlButtons/eWalletButton.js b/addons/pos_loyalty/static/src/js/ControlButtons/eWalletButton.js index 2e2e823bc3d..4fc640d56fd 100644 --- a/addons/pos_loyalty/static/src/js/ControlButtons/eWalletButton.js +++ b/addons/pos_loyalty/static/src/js/ControlButtons/eWalletButton.js @@ -1,10 +1,10 @@ /** @odoo-module **/ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; -import { SelectionPopup } from "@point_of_sale/js/Popups/SelectionPopup"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; +import { SelectionPopup } from "@point_of_sale/app/utils/input_popups/selection_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { useService } from "@web/core/utils/hooks"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component } from "@odoo/owl"; export class eWalletButton extends Component { diff --git a/addons/pos_loyalty/static/src/js/Loyalty.js b/addons/pos_loyalty/static/src/js/Loyalty.js index a98c5d073d4..f531aac26b1 100644 --- a/addons/pos_loyalty/static/src/js/Loyalty.js +++ b/addons/pos_loyalty/static/src/js/Loyalty.js @@ -1,15 +1,15 @@ /** @odoo-module **/ -import { Order, Orderline, PosGlobalState } from "@point_of_sale/js/models"; +import { Order, Orderline, PosGlobalState } from "@point_of_sale/app/store/models"; import { Mutex } from "@web/core/utils/concurrency"; import concurrency from "web.concurrency"; import { roundDecimals, roundPrecision } from "@web/core/utils/numbers"; import { _t } from "@web/core/l10n/translation"; import { patch } from "@web/core/utils/patch"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; import { Domain, InvalidDomainError } from "@web/core/domain"; import { sprintf } from "@web/core/utils/strings"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; // FIXME: Perhaps MutexedDropPrevious can be replaced by the new KeepLast. // > This might require thorough investigation on how _updateRewards work. diff --git a/addons/pos_loyalty/static/src/js/OrderSummary.js b/addons/pos_loyalty/static/src/js/OrderSummary.js index eaca8e3685b..9fb1bb9c8a0 100644 --- a/addons/pos_loyalty/static/src/js/OrderSummary.js +++ b/addons/pos_loyalty/static/src/js/OrderSummary.js @@ -1,6 +1,6 @@ /** @odoo-module **/ -import { OrderSummary } from "@point_of_sale/js/Screens/ProductScreen/OrderSummary"; +import { OrderSummary } from "@point_of_sale/app/screens/product_screen/order_summary/order_summary"; import { patch } from "@web/core/utils/patch"; patch(OrderSummary.prototype, "pos_loyalty.OrderSummary", { diff --git a/addons/pos_loyalty/static/src/js/Orderline.js b/addons/pos_loyalty/static/src/js/Orderline.js index 6bac2acbd3f..7665d7d2c63 100644 --- a/addons/pos_loyalty/static/src/js/Orderline.js +++ b/addons/pos_loyalty/static/src/js/Orderline.js @@ -1,6 +1,6 @@ /** @odoo-module **/ -import { Orderline } from "@point_of_sale/js/Screens/ProductScreen/Orderline"; +import { Orderline } from "@point_of_sale/app/screens/product_screen/orderline/orderline"; import { patch } from "@web/core/utils/patch"; patch(Orderline.prototype, "pos_loyalty.Orderline", { diff --git a/addons/pos_loyalty/static/src/js/PartnerLine.js b/addons/pos_loyalty/static/src/js/PartnerLine.js index 5f27d8edde8..177d002cc86 100644 --- a/addons/pos_loyalty/static/src/js/PartnerLine.js +++ b/addons/pos_loyalty/static/src/js/PartnerLine.js @@ -1,7 +1,7 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; -import { PartnerLine } from "@point_of_sale/js/Screens/PartnerListScreen/PartnerLine"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { PartnerLine } from "@point_of_sale/app/screens/partner_list/partner_line/partner_line"; import { patch } from "@web/core/utils/patch"; import { sprintf } from "@web/core/utils/strings"; import { formatFloat } from "@web/views/fields/formatters"; diff --git a/addons/pos_loyalty/static/src/js/PartnerListScreen.js b/addons/pos_loyalty/static/src/js/PartnerListScreen.js index 5ab7d96da10..5ce54a0d79e 100644 --- a/addons/pos_loyalty/static/src/js/PartnerListScreen.js +++ b/addons/pos_loyalty/static/src/js/PartnerListScreen.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PartnerListScreen } from "@point_of_sale/js/Screens/PartnerListScreen/PartnerListScreen"; +import { PartnerListScreen } from "@point_of_sale/app/screens/partner_list/partner_list"; import { patch } from "@web/core/utils/patch"; patch(PartnerListScreen.prototype, "pos_loyalty.PartnerListScreen", { diff --git a/addons/pos_loyalty/static/src/js/PaymentScreen.js b/addons/pos_loyalty/static/src/js/PaymentScreen.js index 17e9d353e05..d141303a227 100644 --- a/addons/pos_loyalty/static/src/js/PaymentScreen.js +++ b/addons/pos_loyalty/static/src/js/PaymentScreen.js @@ -1,9 +1,9 @@ /** @odoo-module **/ -import { PaymentScreen } from "@point_of_sale/js/Screens/PaymentScreen/PaymentScreen"; +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; import { patch } from "@web/core/utils/patch"; import { PosLoyaltyCard } from "@pos_loyalty/js/Loyalty"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; patch(PaymentScreen.prototype, "pos_loyalty.PaymentScreen", { //@override diff --git a/addons/pos_loyalty/static/src/js/ProductScreen.js b/addons/pos_loyalty/static/src/js/ProductScreen.js index 5e6c45986cf..192d9983c8f 100644 --- a/addons/pos_loyalty/static/src/js/ProductScreen.js +++ b/addons/pos_loyalty/static/src/js/ProductScreen.js @@ -1,9 +1,9 @@ /** @odoo-module **/ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; -import { useBarcodeReader } from "@point_of_sale/app/barcode_reader_hook"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; +import { useBarcodeReader } from "@point_of_sale/app/barcode/barcode_reader_hook"; import { patch } from "@web/core/utils/patch"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; import { useService } from "@web/core/utils/hooks"; import { sprintf } from "@web/core/utils/strings"; diff --git a/addons/pos_loyalty/static/src/js/TicketScreen.js b/addons/pos_loyalty/static/src/js/TicketScreen.js index 3648ff462e8..b707589f62c 100644 --- a/addons/pos_loyalty/static/src/js/TicketScreen.js +++ b/addons/pos_loyalty/static/src/js/TicketScreen.js @@ -1,6 +1,6 @@ /** @odoo-module **/ -import { TicketScreen } from "@point_of_sale/js/Screens/TicketScreen/TicketScreen"; +import { TicketScreen } from "@point_of_sale/app/screens/ticket_screen/ticket_screen"; import { useService } from "@web/core/utils/hooks"; import { patch } from "@web/core/utils/patch"; diff --git a/addons/pos_mercury/static/src/js/OrderReceipt.js b/addons/pos_mercury/static/src/js/OrderReceipt.js index e35c4baddb5..3cd0b2d732d 100644 --- a/addons/pos_mercury/static/src/js/OrderReceipt.js +++ b/addons/pos_mercury/static/src/js/OrderReceipt.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { OrderReceipt } from "@point_of_sale/js/Screens/ReceiptScreen/OrderReceipt"; +import { OrderReceipt } from "@point_of_sale/app/screens/receipt_screen/receipt/receipt"; import { patch } from "@web/core/utils/patch"; patch(OrderReceipt.prototype, "pos_mercury.OrderReceipt", { diff --git a/addons/pos_mercury/static/src/js/PaymentScreen.js b/addons/pos_mercury/static/src/js/PaymentScreen.js index 9d364dbf7c2..0b9125cab1e 100644 --- a/addons/pos_mercury/static/src/js/PaymentScreen.js +++ b/addons/pos_mercury/static/src/js/PaymentScreen.js @@ -2,11 +2,11 @@ import { _t } from "@web/core/l10n/translation"; import { patch } from "@web/core/utils/patch"; -import { PaymentScreen } from "@point_of_sale/js/Screens/PaymentScreen/PaymentScreen"; -import { useBarcodeReader } from "@point_of_sale/app/barcode_reader_hook"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; -import { PaymentTransactionPopup } from "./PaymentTransactionPopup"; -import { SelectionPopup } from "@point_of_sale/js/Popups/SelectionPopup"; +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; +import { useBarcodeReader } from "@point_of_sale/app/barcode/barcode_reader_hook"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +import { PaymentTransactionPopup } from "@pos_mercury/js/PaymentTransactionPopup"; +import { SelectionPopup } from "@point_of_sale/app/utils/input_popups/selection_popup"; // Lookup table to store status and error messages const lookUpCodeTransaction = { diff --git a/addons/pos_mercury/static/src/js/PaymentScreenPaymentLines.js b/addons/pos_mercury/static/src/js/PaymentScreenPaymentLines.js index 1f7a532ba90..8965f4bd115 100644 --- a/addons/pos_mercury/static/src/js/PaymentScreenPaymentLines.js +++ b/addons/pos_mercury/static/src/js/PaymentScreenPaymentLines.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PaymentScreenPaymentLines } from "@point_of_sale/js/Screens/PaymentScreen/PaymentScreenPaymentLines"; +import { PaymentScreenPaymentLines } from "@point_of_sale/app/screens/payment_screen/payment_lines/payment_lines"; import { patch } from "@web/core/utils/patch"; patch(PaymentScreenPaymentLines.prototype, "pos_mercury.PaymentScreenPaymentLines", { diff --git a/addons/pos_mercury/static/src/js/PaymentTransactionPopup.js b/addons/pos_mercury/static/src/js/PaymentTransactionPopup.js index 250ee5e7472..275252c63b3 100644 --- a/addons/pos_mercury/static/src/js/PaymentTransactionPopup.js +++ b/addons/pos_mercury/static/src/js/PaymentTransactionPopup.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; import { _lt } from "@web/core/l10n/translation"; import { useState } from "@odoo/owl"; diff --git a/addons/pos_mercury/static/src/js/ProductScreen.js b/addons/pos_mercury/static/src/js/ProductScreen.js index 97afa2b9d74..5cf2a641c23 100644 --- a/addons/pos_mercury/static/src/js/ProductScreen.js +++ b/addons/pos_mercury/static/src/js/ProductScreen.js @@ -1,9 +1,9 @@ /** @odoo-module */ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; -import { useBarcodeReader } from "@point_of_sale/app/barcode_reader_hook"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; +import { useBarcodeReader } from "@point_of_sale/app/barcode/barcode_reader_hook"; import { patch } from "@web/core/utils/patch"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; patch(ProductScreen.prototype, "pos_mercury.ProductScreen", { setup() { diff --git a/addons/pos_mercury/static/src/js/pos_mercury.js b/addons/pos_mercury/static/src/js/pos_mercury.js index 563c7aff0aa..80bea0c8273 100644 --- a/addons/pos_mercury/static/src/js/pos_mercury.js +++ b/addons/pos_mercury/static/src/js/pos_mercury.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PosGlobalState, Order, Payment } from "@point_of_sale/js/models"; +import { PosGlobalState, Order, Payment } from "@point_of_sale/app/store/models"; import { patch } from "@web/core/utils/patch"; patch(PosGlobalState.prototype, "pos_mercury.PosGlobalState", { diff --git a/addons/pos_restaurant/static/src/app/floor_screen/editable_table.js b/addons/pos_restaurant/static/src/app/floor_screen/editable_table.js index fd3dded8c86..79af8a263ce 100644 --- a/addons/pos_restaurant/static/src/app/floor_screen/editable_table.js +++ b/addons/pos_restaurant/static/src/app/floor_screen/editable_table.js @@ -1,9 +1,9 @@ /** @odoo-module */ -import { getLimits, useMovable, constrain } from "@point_of_sale/app/movable_hook"; +import { getLimits, useMovable, constrain } from "@point_of_sale/app/utils/movable_hook"; import { onWillUnmount, useEffect, useRef, Component } from "@odoo/owl"; -import { Table } from "./table"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { Table } from "@pos_restaurant/app/floor_screen/table"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; const MIN_TABLE_SIZE = 30; // px diff --git a/addons/pos_restaurant/static/src/app/floor_screen/floor_screen.js b/addons/pos_restaurant/static/src/app/floor_screen/floor_screen.js index 19b31a2ee5c..daab70f2e60 100644 --- a/addons/pos_restaurant/static/src/app/floor_screen/floor_screen.js +++ b/addons/pos_restaurant/static/src/app/floor_screen/floor_screen.js @@ -4,15 +4,15 @@ import { ConnectionLostError } from "@web/core/network/rpc_service"; import { debounce } from "@web/core/utils/timing"; import { registry } from "@web/core/registry"; -import { TextInputPopup } from "@point_of_sale/js/Popups/TextInputPopup"; -import { NumberPopup } from "@point_of_sale/js/Popups/NumberPopup"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { TextInputPopup } from "@point_of_sale/app/utils/input_popups/text_input_popup"; +import { NumberPopup } from "@point_of_sale/app/utils/input_popups/number_popup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; -import { EditableTable } from "./editable_table"; -import { EditBar } from "./edit_bar"; -import { Table } from "./table"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { EditableTable } from "@pos_restaurant/app/floor_screen/editable_table"; +import { EditBar } from "@pos_restaurant/app/floor_screen/edit_bar"; +import { Table } from "@pos_restaurant/app/floor_screen/table"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { useService } from "@web/core/utils/hooks"; import { Component, diff --git a/addons/pos_restaurant/static/src/app/floor_screen/table.js b/addons/pos_restaurant/static/src/app/floor_screen/table.js index 2d71cc21500..ca5acaf4c9b 100644 --- a/addons/pos_restaurant/static/src/app/floor_screen/table.js +++ b/addons/pos_restaurant/static/src/app/floor_screen/table.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class Table extends Component { static template = "pos_restaurant.Table"; diff --git a/addons/pos_restaurant/static/src/app/navbar/BackButton.js b/addons/pos_restaurant/static/src/app/navbar/BackButton.js index 3f0013a3338..7847e2a40c5 100644 --- a/addons/pos_restaurant/static/src/app/navbar/BackButton.js +++ b/addons/pos_restaurant/static/src/app/navbar/BackButton.js @@ -1,7 +1,7 @@ /** @odoo-module */ -import { BackButton } from "@point_of_sale/app/navbar/BackButton"; -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { BackButton } from "@point_of_sale/app/navbar/back_button/back_button"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { TipScreen } from "@pos_restaurant/js/Screens/TipScreen"; import { patch } from "@web/core/utils/patch"; diff --git a/addons/pos_restaurant/static/src/app/pos_bus.js b/addons/pos_restaurant/static/src/app/pos_bus.js index 022d36415c8..c9ffc029cb4 100644 --- a/addons/pos_restaurant/static/src/app/pos_bus.js +++ b/addons/pos_restaurant/static/src/app/pos_bus.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { patch } from "@web/core/utils/patch"; -import { PosBus } from "@point_of_sale/app/pos_bus"; +import { PosBus } from "@point_of_sale/app/bus/pos_bus_service"; patch(PosBus.prototype, "pos_restaurant.PosBus", { // Override diff --git a/addons/pos_restaurant/static/src/app/pos_store.js b/addons/pos_restaurant/static/src/app/pos_store.js index 1e6a8c1525b..6891c7e06c0 100644 --- a/addons/pos_restaurant/static/src/app/pos_store.js +++ b/addons/pos_restaurant/static/src/app/pos_store.js @@ -1,9 +1,9 @@ /** @odoo-module */ import { patch } from "@web/core/utils/patch"; -import { PosStore } from "@point_of_sale/app/pos_store"; -import { PaymentScreen } from "@point_of_sale/js/Screens/PaymentScreen/PaymentScreen"; -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { PosStore } from "@point_of_sale/app/store/pos_store"; +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { FloorScreen } from "@pos_restaurant/app/floor_screen/floor_screen"; import { TipScreen } from "@pos_restaurant/js/Screens/TipScreen"; diff --git a/addons/pos_restaurant/static/src/js/Screens/BillScreen.js b/addons/pos_restaurant/static/src/js/Screens/BillScreen.js index ec92e6f0a53..f1e3b7cc091 100644 --- a/addons/pos_restaurant/static/src/js/Screens/BillScreen.js +++ b/addons/pos_restaurant/static/src/js/Screens/BillScreen.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { ReceiptScreen } from "@point_of_sale/js/Screens/ReceiptScreen/ReceiptScreen"; +import { ReceiptScreen } from "@point_of_sale/app/screens/receipt_screen/receipt_screen"; import { registry } from "@web/core/registry"; export class BillScreen extends ReceiptScreen { diff --git a/addons/pos_restaurant/static/src/js/Screens/PaymentScreen.js b/addons/pos_restaurant/static/src/js/Screens/PaymentScreen.js index 01c667d736a..38ba7965375 100644 --- a/addons/pos_restaurant/static/src/js/Screens/PaymentScreen.js +++ b/addons/pos_restaurant/static/src/js/Screens/PaymentScreen.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PaymentScreen } from "@point_of_sale/js/Screens/PaymentScreen/PaymentScreen"; +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; import { patch } from "@web/core/utils/patch"; patch(PaymentScreen.prototype, "pos_restaurant.PaymentScreen", { diff --git a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ActionpadWidget.js b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ActionpadWidget.js index 8e57b77d7f3..8b630bed07c 100644 --- a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ActionpadWidget.js +++ b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ActionpadWidget.js @@ -1,6 +1,6 @@ /** @odoo-module */ import { patch } from "@web/core/utils/patch"; -import { ActionpadWidget } from "@point_of_sale/js/Screens/ProductScreen/ActionpadWidget"; +import { ActionpadWidget } from "@point_of_sale/app/screens/product_screen/action_pad/action_pad"; import { nbsp } from "@web/core/utils/strings"; /** * @props partner diff --git a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/OrderlineNoteButton.js b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/OrderlineNoteButton.js index 64f9bb7bcf3..071c559544d 100644 --- a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/OrderlineNoteButton.js +++ b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/OrderlineNoteButton.js @@ -1,10 +1,10 @@ /** @odoo-module */ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { useService } from "@web/core/utils/hooks"; -import { TextAreaPopup } from "@point_of_sale/js/Popups/TextAreaPopup"; +import { TextAreaPopup } from "@point_of_sale/app/utils/input_popups/textarea_popup"; import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class OrderlineNoteButton extends Component { static template = "OrderlineNoteButton"; diff --git a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/PrintBillButton.js b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/PrintBillButton.js index 07c739f5996..49c9aeeb191 100644 --- a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/PrintBillButton.js +++ b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/PrintBillButton.js @@ -1,7 +1,7 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { Component } from "@odoo/owl"; export class PrintBillButton extends Component { diff --git a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/SplitBillButton.js b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/SplitBillButton.js index 90bdb93b9f4..b5283ef5c03 100644 --- a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/SplitBillButton.js +++ b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/SplitBillButton.js @@ -1,7 +1,7 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { Component } from "@odoo/owl"; export class SplitBillButton extends Component { diff --git a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/TableGuestsButton.js b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/TableGuestsButton.js index cf4279cc258..22b32e3d445 100644 --- a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/TableGuestsButton.js +++ b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/TableGuestsButton.js @@ -1,12 +1,12 @@ /** @odoo-module */ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { useService } from "@web/core/utils/hooks"; -import { NumberPopup } from "@point_of_sale/js/Popups/NumberPopup"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { NumberPopup } from "@point_of_sale/app/utils/input_popups/number_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { Component } from "@odoo/owl"; import { sprintf } from "@web/core/utils/strings"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class TableGuestsButton extends Component { static template = "TableGuestsButton"; diff --git a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/TransferOrderButton.js b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/TransferOrderButton.js index 960896763a7..7320f9b0665 100644 --- a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/TransferOrderButton.js +++ b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ControlButtons/TransferOrderButton.js @@ -1,7 +1,7 @@ /** @odoo-module */ -import { usePos } from "@point_of_sale/app/pos_hook"; -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { Component } from "@odoo/owl"; export class TransferOrderButton extends Component { diff --git a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ProductScreen.js b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ProductScreen.js index 312f472bc1c..d8a5f624960 100644 --- a/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ProductScreen.js +++ b/addons/pos_restaurant/static/src/js/Screens/ProductScreen/ProductScreen.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { patch } from "@web/core/utils/patch"; patch(ProductScreen.prototype, "pos_restaurant.ProductScreen", { diff --git a/addons/pos_restaurant/static/src/js/Screens/ReceiptScreen/ReceiptScreen.js b/addons/pos_restaurant/static/src/js/Screens/ReceiptScreen/ReceiptScreen.js index 582eec03229..55f4e6d6d74 100644 --- a/addons/pos_restaurant/static/src/js/Screens/ReceiptScreen/ReceiptScreen.js +++ b/addons/pos_restaurant/static/src/js/Screens/ReceiptScreen/ReceiptScreen.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { ReceiptScreen } from "@point_of_sale/js/Screens/ReceiptScreen/ReceiptScreen"; +import { ReceiptScreen } from "@point_of_sale/app/screens/receipt_screen/receipt_screen"; import { patch } from "@web/core/utils/patch"; import { onWillUnmount } from "@odoo/owl"; import { FloorScreen } from "@pos_restaurant/app/floor_screen/floor_screen"; diff --git a/addons/pos_restaurant/static/src/js/Screens/SplitBillScreen/SplitBillScreen.js b/addons/pos_restaurant/static/src/js/Screens/SplitBillScreen/SplitBillScreen.js index 159d3232258..9a59be09038 100644 --- a/addons/pos_restaurant/static/src/js/Screens/SplitBillScreen/SplitBillScreen.js +++ b/addons/pos_restaurant/static/src/js/Screens/SplitBillScreen/SplitBillScreen.js @@ -1,10 +1,10 @@ /** @odoo-module */ -import { Order } from "@point_of_sale/js/models"; +import { Order } from "@point_of_sale/app/store/models"; -import { SplitOrderline } from "./SplitOrderline"; +import { SplitOrderline } from "@pos_restaurant/js/Screens/SplitBillScreen/SplitOrderline"; import { registry } from "@web/core/registry"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component, useState } from "@odoo/owl"; import { groupBy } from "@web/core/utils/arrays"; diff --git a/addons/pos_restaurant/static/src/js/Screens/TicketScreen.js b/addons/pos_restaurant/static/src/js/Screens/TicketScreen.js index e8c9bf7140b..a67cbe2b93f 100644 --- a/addons/pos_restaurant/static/src/js/Screens/TicketScreen.js +++ b/addons/pos_restaurant/static/src/js/Screens/TicketScreen.js @@ -1,9 +1,9 @@ /** @odoo-module */ -import { TicketScreen } from "@point_of_sale/js/Screens/TicketScreen/TicketScreen"; +import { TicketScreen } from "@point_of_sale/app/screens/ticket_screen/ticket_screen"; import { useAutofocus } from "@web/core/utils/hooks"; import { patch } from "@web/core/utils/patch"; import { parseFloat } from "@web/views/fields/parsers"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; import { Component, useState } from "@odoo/owl"; patch(TicketScreen.prototype, "pos_restaurant.TicketScreen", { diff --git a/addons/pos_restaurant/static/src/js/Screens/TipScreen.js b/addons/pos_restaurant/static/src/js/Screens/TipScreen.js index f6e1eff1b1c..80e9479f95d 100644 --- a/addons/pos_restaurant/static/src/js/Screens/TipScreen.js +++ b/addons/pos_restaurant/static/src/js/Screens/TipScreen.js @@ -3,9 +3,9 @@ import { parseFloat } from "@web/views/fields/parsers"; import { renderToElement } from "@web/core/utils/render"; import { registry } from "@web/core/registry"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { useService } from "@web/core/utils/hooks"; import { Component, useRef, onMounted } from "@odoo/owl"; diff --git a/addons/pos_restaurant/static/src/js/models.js b/addons/pos_restaurant/static/src/js/models.js index cb0992dadce..668f3a21230 100644 --- a/addons/pos_restaurant/static/src/js/models.js +++ b/addons/pos_restaurant/static/src/js/models.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PosGlobalState, Order, Orderline, Payment } from "@point_of_sale/js/models"; +import { PosGlobalState, Order, Orderline, Payment } from "@point_of_sale/app/store/models"; import { ConnectionLostError } from "@web/core/network/rpc_service"; import { patch } from "@web/core/utils/patch"; diff --git a/addons/pos_restaurant/static/src/js/payment.js b/addons/pos_restaurant/static/src/js/payment.js index e95fa9ef959..47a38d0193b 100644 --- a/addons/pos_restaurant/static/src/js/payment.js +++ b/addons/pos_restaurant/static/src/js/payment.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PaymentInterface } from "@point_of_sale/js/payment"; +import { PaymentInterface } from "@point_of_sale/app/payment/payment_interface"; import { patch } from "@web/core/utils/patch"; patch(PaymentInterface.prototype, "pos_restaurant.PaymentInterface", { diff --git a/addons/pos_sale/static/src/app/pos_store.js b/addons/pos_sale/static/src/app/pos_store.js index 8cd3b1d53fd..18791f18c7f 100644 --- a/addons/pos_sale/static/src/app/pos_store.js +++ b/addons/pos_sale/static/src/app/pos_store.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { PosStore } from "@point_of_sale/app/pos_store"; +import { PosStore } from "@point_of_sale/app/store/pos_store"; import { patch } from "@web/core/utils/patch"; patch(PosStore.prototype, "pos_sale.PosStore", { diff --git a/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderList.js b/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderList.js index 8b7dc5cd3f8..6a40a69a318 100644 --- a/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderList.js +++ b/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderList.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { Component, useState } from "@odoo/owl"; -import { SaleOrderRow } from "./SaleOrderRow"; +import { SaleOrderRow } from "@pos_sale/js/OrderManagementScreen/SaleOrderRow"; import { useService } from "@web/core/utils/hooks"; /** diff --git a/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementControlPanel.js b/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementControlPanel.js index 6e79a09dac4..371e73b41ac 100644 --- a/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementControlPanel.js +++ b/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementControlPanel.js @@ -2,7 +2,7 @@ import { useAutofocus, useService } from "@web/core/utils/hooks"; import { Component, useState } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; // NOTE: These are constants so that they are only instantiated once // and they can be used efficiently by the OrderManagementControlPanel. diff --git a/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementScreen.js b/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementScreen.js index 6c7a05a6fce..087e3bcde4e 100644 --- a/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementScreen.js +++ b/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementScreen.js @@ -4,18 +4,18 @@ import { sprintf } from "@web/core/utils/strings"; import { parseFloat } from "@web/views/fields/parsers"; import { useBus, useService } from "@web/core/utils/hooks"; import { registry } from "@web/core/registry"; -import { ControlButtonsMixin } from "@point_of_sale/js/ControlButtonsMixin"; -import { Orderline } from "@point_of_sale/js/models"; +import { ControlButtonsMixin } from "@point_of_sale/app/utils/control_buttons_mixin"; +import { Orderline } from "@point_of_sale/app/store/models"; -import { SelectionPopup } from "@point_of_sale/js/Popups/SelectionPopup"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; -import { ConfirmPopup } from "@point_of_sale/js/Popups/ConfirmPopup"; -import { NumberPopup } from "@point_of_sale/js/Popups/NumberPopup"; +import { SelectionPopup } from "@point_of_sale/app/utils/input_popups/selection_popup"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; +import { NumberPopup } from "@point_of_sale/app/utils/input_popups/number_popup"; -import { SaleOrderList } from "./SaleOrderList"; -import { SaleOrderManagementControlPanel } from "./SaleOrderManagementControlPanel"; +import { SaleOrderList } from "@pos_sale/js/OrderManagementScreen/SaleOrderList"; +import { SaleOrderManagementControlPanel } from "@pos_sale/js/OrderManagementScreen/SaleOrderManagementControlPanel"; import { Component, onMounted, useRef } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; /** * ID getter to take into account falsy many2one value. diff --git a/addons/pos_sale/static/src/js/SetSaleOrderButton.js b/addons/pos_sale/static/src/js/SetSaleOrderButton.js index c1600336b11..b034dc2a0c5 100644 --- a/addons/pos_sale/static/src/js/SetSaleOrderButton.js +++ b/addons/pos_sale/static/src/js/SetSaleOrderButton.js @@ -1,7 +1,7 @@ /** @odoo-module */ -import { ProductScreen } from "@point_of_sale/js/Screens/ProductScreen/ProductScreen"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; import { Component } from "@odoo/owl"; export class SetSaleOrderButton extends Component { diff --git a/addons/pos_sale/static/src/js/models.js b/addons/pos_sale/static/src/js/models.js index e42680dfa33..5a1afcc8d70 100644 --- a/addons/pos_sale/static/src/js/models.js +++ b/addons/pos_sale/static/src/js/models.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { Order, Orderline } from "@point_of_sale/js/models"; +import { Order, Orderline } from "@point_of_sale/app/store/models"; import { patch } from "@web/core/utils/patch"; patch(Order.prototype, "pos_sale.Order", { diff --git a/addons/pos_sale_loyalty/static/src/js/models.js b/addons/pos_sale_loyalty/static/src/js/models.js index 306b1090653..78d741a48df 100644 --- a/addons/pos_sale_loyalty/static/src/js/models.js +++ b/addons/pos_sale_loyalty/static/src/js/models.js @@ -1,7 +1,7 @@ /** @odoo-module alias=pos_sale_loyalty.models **/ -import { Orderline } from '@point_of_sale/js/models'; +import { Orderline } from "@point_of_sale/app/store/models"; import { patch } from "@web/core/utils/patch"; patch(Orderline.prototype, "pos_sale_loyalty.Orderline", { diff --git a/addons/pos_sale_product_configurator/static/src/js/Screens/ProductScreen/ControlButtons/ProductInfoButton.js b/addons/pos_sale_product_configurator/static/src/js/Screens/ProductScreen/ControlButtons/ProductInfoButton.js index 75975912ad6..eabef2f5951 100644 --- a/addons/pos_sale_product_configurator/static/src/js/Screens/ProductScreen/ControlButtons/ProductInfoButton.js +++ b/addons/pos_sale_product_configurator/static/src/js/Screens/ProductScreen/ControlButtons/ProductInfoButton.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { ProductInfoButton } from "@point_of_sale/js/Screens/ProductScreen/ControlButtons/ProductInfoButton"; +import { ProductInfoButton } from "@point_of_sale/app/screens/product_screen/control_buttons/product_info_button/product_info_button"; import { patch } from "@web/core/utils/patch"; patch(ProductInfoButton.prototype, "pos_sale_product_configurator.ProductInfoButton", { diff --git a/addons/pos_six/static/src/js/BalanceButton.js b/addons/pos_six/static/src/js/BalanceButton.js index 4949de911a2..6e47bb95044 100644 --- a/addons/pos_six/static/src/js/BalanceButton.js +++ b/addons/pos_six/static/src/js/BalanceButton.js @@ -1,7 +1,7 @@ /** @odoo-module */ import { Component } from "@odoo/owl"; -import { usePos } from "@point_of_sale/app/pos_hook"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; export class BalanceButton extends Component { static template = "BalanceButton"; diff --git a/addons/pos_six/static/src/js/models.js b/addons/pos_six/static/src/js/models.js index 41103ac55b8..7a064b18343 100644 --- a/addons/pos_six/static/src/js/models.js +++ b/addons/pos_six/static/src/js/models.js @@ -1,6 +1,6 @@ /** @odoo-module */ -import { register_payment_method } from "@point_of_sale/js/models"; +import { register_payment_method } from "@point_of_sale/app/store/models"; import { PaymentSix } from "@pos_six/js/payment_six"; register_payment_method("six", PaymentSix); diff --git a/addons/pos_six/static/src/js/payment_six.js b/addons/pos_six/static/src/js/payment_six.js index 5d0bb038dee..d998eaa9d0d 100644 --- a/addons/pos_six/static/src/js/payment_six.js +++ b/addons/pos_six/static/src/js/payment_six.js @@ -2,8 +2,8 @@ /* global timapi */ import { _t } from "@web/core/l10n/translation"; -import { PaymentInterface } from "@point_of_sale/js/payment"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { PaymentInterface } from "@point_of_sale/app/payment/payment_interface"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { escape } from "@web/core/utils/strings"; window.onTimApiReady = function () {}; diff --git a/addons/pos_stripe/static/src/js/models.js b/addons/pos_stripe/static/src/js/models.js index 840199dfba8..f4c5f0867c6 100644 --- a/addons/pos_stripe/static/src/js/models.js +++ b/addons/pos_stripe/static/src/js/models.js @@ -1,5 +1,5 @@ /** @odoo-module */ -import { register_payment_method } from "@point_of_sale/js/models"; +import { register_payment_method } from "@point_of_sale/app/store/models"; import { PaymentStripe } from "@pos_stripe/js/payment_stripe"; register_payment_method("stripe", PaymentStripe); diff --git a/addons/pos_stripe/static/src/js/payment_stripe.js b/addons/pos_stripe/static/src/js/payment_stripe.js index d25a39db060..4509953d865 100644 --- a/addons/pos_stripe/static/src/js/payment_stripe.js +++ b/addons/pos_stripe/static/src/js/payment_stripe.js @@ -2,8 +2,8 @@ /* global StripeTerminal */ import { _t } from "@web/core/l10n/translation"; -import { PaymentInterface } from "@point_of_sale/js/payment"; -import { ErrorPopup } from "@point_of_sale/js/Popups/ErrorPopup"; +import { PaymentInterface } from "@point_of_sale/app/payment/payment_interface"; +import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { sprintf } from "@web/core/utils/strings"; export class PaymentStripe extends PaymentInterface {