[REF] point_of_sale, pos*: reorganize static/src files

pos*: l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos,
l10n_sa_pos, pos_adyen, pos_discount, pos_epson_printer, pos_hr,
pos_hr_restaurant, pos_loyalty, pos_mercury, pos_restaurant, pos_sale,
pos_sale_loyalty, pos_sale_product_configurator, pos_six, pos_stripe

Previously, the pos followed the convention established in Odoo for a
very long time to organize its static source files, one folder for js,
one for css and one for xml. In a component-based workflow this makes it
hard to work with as the template of a component is very far in the file
tree from the component itself.

This commit adopts the new convention from the web module, and locates
the js and xml of components in the same folder. It also renames all
files to follow the convention of the rest of odoo that file names
should be snake_case. Some files had additionally been renamed to more
accurately reflect their purpose.

closes odoo/odoo#123498

Linked-to: https://github.com/odoo/enterprise/pull/41923
Related: odoo/enterprise#41923
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
Odoo's Mergebot
2023-06-05 17:51:08 +02:00
committed by GitHub
245 changed files with 422 additions and 398 deletions
@@ -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", {
+1 -1
View File
@@ -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", {
@@ -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", {
@@ -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", {
@@ -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", {
+2 -2
View File
@@ -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() {
@@ -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;
},
});
+1 -1
View File
@@ -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", {
+1 -1
View File
@@ -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", {
+3 -2
View File
@@ -120,7 +120,8 @@
# PoS files
'point_of_sale/static/src/**/*',
('remove', 'point_of_sale/static/src/backend/**/*'),
('remove', 'point_of_sale/static/src/entry/**/*'), # entry is only included in the prod bundle
# main.js boots the pos app, it is only included in the prod bundle as tests mount the app themselves
('remove', 'point_of_sale/static/src/app/main.js'),
# tour system FIXME: can this be added only in test mode? Are there any onboarding tours in PoS?
'web/static/lib/jquery/jquery.js',
'web_tour/static/src/tour_pointer/**/*',
@@ -137,7 +138,7 @@
# Bundle that starts the pos, loaded on /pos/ui
'point_of_sale.assets_prod': [
('include', 'point_of_sale._assets_pos'),
'point_of_sale/static/src/entry/main.js',
'point_of_sale/static/src/app/main.js',
],
# Bundle for the unit tests at /pos/ui/tests
'point_of_sale.assets_qunit_tests': [
+25
View File
@@ -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<ReturnType<typeof barcodeReaderService.start>>;
debug: ReturnType<typeof barcodeReaderService.start>;
hardware_proxy: ReturnType<typeof hardwareProxyService.start>;
popup: ReturnType<typeof popupService.start>;
number_buffer: ReturnType<typeof numberBufferService.start>;
pos_notification: ReturnType<typeof notificationService.start>;
pos_bus: ReturnType<typeof posBusService.start>;
customer_display: ReturnType<typeof customerDisplayService.start>;
report: ReturnType<typeof reportService.start>;
sound: ReturnType<typeof soundService.start>;
}
}
@@ -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 {
@@ -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 {
@@ -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";
@@ -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
*/
@@ -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 };
@@ -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 {
@@ -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) {
@@ -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() {
@@ -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 {
@@ -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";
/**
@@ -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
@@ -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";
@@ -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";
@@ -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";
@@ -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
@@ -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 {
@@ -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 {
@@ -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 {
@@ -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";
@@ -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";
@@ -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";
@@ -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
@@ -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";
/**
@@ -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";
@@ -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";
@@ -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";
@@ -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";
@@ -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";
@@ -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";
@@ -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 {
@@ -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 {
@@ -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";
@@ -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";
@@ -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";
@@ -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";
@@ -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 {
@@ -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 {
@@ -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
@@ -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 };
@@ -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 {
@@ -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";
@@ -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";
@@ -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:

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