From fcdd2acc5a5dfe57befce4b58f47ebace6073a67 Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Wed, 7 Jun 2023 08:04:40 +0000 Subject: [PATCH] [REF] pos*: namespace component templates, remove useless super calls pos*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_in_pos, point_of_sale, pos_discount, pos_epson_printer, pos_hr, pos_loyalty, pos_mercury, pos_restaurant, pos_sale, pos_sale_product_configurator, pos_six Previously, none of the templates of the pos were namespaced, this means that depending on context, you have to access them differently: in xpath the module prefix is necessary even if the template name itself isn't namespace, but in owl components you cannot use the namespaced version because owl doesn't have the notion of modules. This commit namespaces the component templates of all the pos modules so that it's consistent with the rest of the code base. It also removes some extraneous calls to super.setup() that were leftover and are not necessary for components extending directly owl's base Component. closes odoo/odoo#124069 Related: odoo/enterprise#42094 Signed-off-by: Joseph Caburnay (jcb) --- .../src/xml/Screens/ReceiptScreen/OrderReceipt.xml | 2 +- addons/l10n_co_pos/static/src/xml/pos.xml | 2 +- .../static/src/xml/OrderReceipt.xml | 4 ++-- .../l10n_fr_pos_cert/static/src/xml/Orderline.xml | 2 +- addons/l10n_in_pos/static/src/xml/pos_receipt.xml | 4 ++-- .../app/barcode/error_popup/barcode_error_popup.js | 2 +- .../barcode/error_popup/barcode_error_popup.xml | 2 +- .../customer_display/customer_display_template.xml | 14 +++++++------- .../static/src/app/debug/debug_widget.js | 1 - .../debug/order_import_popup/order_import_popup.js | 2 +- .../order_import_popup/order_import_popup.xml | 2 +- .../static/src/app/errors/popups/error_popup.js | 2 +- .../static/src/app/errors/popups/error_popup.xml | 2 +- .../src/app/errors/popups/error_traceback_popup.js | 2 +- .../app/errors/popups/error_traceback_popup.xml | 2 +- .../src/app/errors/popups/offline_error_popup.js | 2 +- .../src/app/errors/popups/offline_error_popup.xml | 2 +- .../src/app/navbar/back_button/back_button.js | 3 +-- .../src/app/navbar/back_button/back_button.xml | 2 +- .../src/app/navbar/cashier_name/cashier_name.js | 2 +- .../src/app/navbar/cashier_name/cashier_name.xml | 2 +- .../src/app/navbar/closing_popup/closing_popup.js | 2 +- .../src/app/navbar/closing_popup/closing_popup.xml | 2 +- .../customer_facing_display_button.js | 2 +- .../customer_facing_display_button.xml | 2 +- .../src/app/navbar/proxy_status/proxy_status.js | 3 +-- .../src/app/navbar/proxy_status/proxy_status.xml | 2 +- .../sale_details_button/sale_details_button.js | 4 ++-- .../sale_details_button/sale_details_button.xml | 2 +- .../sale_details_button/sales_detail_report.xml | 2 +- .../navbar/sync_notification/sync_notification.js | 2 +- .../navbar/sync_notification/sync_notification.xml | 2 +- addons/point_of_sale/static/src/app/pos_app.js | 2 +- addons/point_of_sale/static/src/app/pos_app.xml | 2 +- .../partner_list/partner_editor/partner_editor.js | 3 +-- .../partner_list/partner_editor/partner_editor.xml | 2 +- .../partner_list/partner_line/partner_line.js | 2 +- .../partner_list/partner_line/partner_line.xml | 2 +- .../src/app/screens/partner_list/partner_list.js | 3 +-- .../src/app/screens/partner_list/partner_list.xml | 2 +- .../app/screens/payment_screen/numpad/numpad.js | 3 +-- .../app/screens/payment_screen/numpad/numpad.xml | 2 +- .../numpad/numpad_button/numpad_button.js | 2 +- .../numpad/numpad_button/numpad_button.xml | 2 +- .../payment_screen/payment_lines/payment_lines.js | 3 +-- .../payment_screen/payment_lines/payment_lines.xml | 2 +- .../app/screens/payment_screen/payment_screen.js | 3 +-- .../app/screens/payment_screen/payment_screen.xml | 2 +- .../payment_status/payment_status.js | 2 +- .../payment_status/payment_status.xml | 2 +- .../product_screen/action_pad/action_pad.js | 2 +- .../product_screen/action_pad/action_pad.xml | 2 +- .../category_button/category_button.js | 2 +- .../category_button/category_button.xml | 2 +- .../control_buttons/control_buttons_popup.js | 2 +- .../control_buttons/control_buttons_popup.xml | 2 +- .../customer_note_button/customer_note_button.js | 2 +- .../customer_note_button/customer_note_button.xml | 2 +- .../fiscal_position_button.js | 2 +- .../fiscal_position_button.xml | 2 +- .../pricelist_button/pricelist_button.js | 2 +- .../pricelist_button/pricelist_button.xml | 2 +- .../product_info_button/product_info_button.js | 2 +- .../product_info_button/product_info_button.xml | 2 +- .../app/screens/product_screen/numpad/numpad.js | 2 +- .../app/screens/product_screen/numpad/numpad.xml | 2 +- .../src/app/screens/product_screen/order/order.js | 3 +-- .../src/app/screens/product_screen/order/order.xml | 2 +- .../product_screen/order_summary/order_summary.js | 2 +- .../product_screen/order_summary/order_summary.xml | 2 +- .../screens/product_screen/orderline/orderline.js | 2 +- .../screens/product_screen/orderline/orderline.xml | 2 +- .../app/screens/product_screen/product/product.js | 2 +- .../app/screens/product_screen/product/product.xml | 2 +- .../product_info_popup/product_info_popup.js | 2 +- .../product_info_popup/product_info_popup.xml | 2 +- .../product_list/control_panel/control_panel.js | 3 +-- .../product_list/control_panel/control_panel.xml | 2 +- .../product_screen/product_list/product_list.js | 3 +-- .../product_screen/product_list/product_list.xml | 2 +- .../app/screens/product_screen/product_screen.js | 2 +- .../app/screens/product_screen/product_screen.xml | 2 +- .../receipt_screen/abstract_receipt_screen.js | 1 - .../app/screens/receipt_screen/receipt/receipt.js | 3 +-- .../app/screens/receipt_screen/receipt/receipt.xml | 6 +++--- .../receipt_screen/receipt/wrapped_product_name.js | 2 +- .../receipt/wrapped_product_name.xml | 2 +- .../app/screens/receipt_screen/receipt_screen.js | 2 +- .../app/screens/receipt_screen/receipt_screen.xml | 2 +- .../receipt_screen/reprint_receipt_screen.js | 2 +- .../receipt_screen/reprint_receipt_screen.xml | 2 +- .../src/app/screens/scale_screen/scale_screen.js | 2 +- .../src/app/screens/scale_screen/scale_screen.xml | 2 +- .../ticket_screen/invoice_button/invoice_button.js | 3 +-- .../invoice_button/invoice_button.xml | 2 +- .../ticket_screen/order_details/order_details.js | 2 +- .../ticket_screen/order_details/order_details.xml | 2 +- .../order_details/orderline_details.js | 2 +- .../order_details/orderline_details.xml | 2 +- .../reprint_receipt_button.js | 3 +-- .../reprint_receipt_button.xml | 2 +- .../src/app/screens/ticket_screen/ticket_screen.js | 3 +-- .../app/screens/ticket_screen/ticket_screen.xml | 2 +- .../store/cash_opening_popup/cash_opening_popup.js | 2 +- .../cash_opening_popup/cash_opening_popup.xml | 2 +- .../point_of_sale/static/src/app/store/models.js | 14 +++++++------- .../app/store/order_change_receipt_template.xml | 2 +- .../product_configurator_popup.js | 9 ++++----- .../product_configurator_popup.xml | 8 ++++---- .../edit_list_input/edit_list_input.js | 2 +- .../edit_list_input/edit_list_input.xml | 2 +- .../app/store/select_lot_popup/select_lot_popup.js | 2 +- .../store/select_lot_popup/select_lot_popup.xml | 2 +- .../src/app/utils/alert_popup/alert_popup.js | 2 +- .../src/app/utils/alert_popup/alert_popup.xml | 2 +- .../src/app/utils/confirm_popup/confirm_popup.js | 2 +- .../src/app/utils/confirm_popup/confirm_popup.xml | 2 +- .../utils/date_picker_popup/date_picker_popup.js | 2 +- .../utils/date_picker_popup/date_picker_popup.xml | 2 +- .../src/app/utils/input_popups/number_popup.js | 2 +- .../src/app/utils/input_popups/number_popup.xml | 2 +- .../src/app/utils/input_popups/selection_popup.js | 2 +- .../src/app/utils/input_popups/selection_popup.xml | 2 +- .../src/app/utils/input_popups/text_input_popup.js | 2 +- .../app/utils/input_popups/text_input_popup.xml | 2 +- .../src/app/utils/input_popups/textarea_popup.js | 2 +- .../src/app/utils/input_popups/textarea_popup.xml | 2 +- .../money_details_popup/money_details_popup.js | 2 +- .../money_details_popup/money_details_popup.xml | 2 +- .../static/tests/unit/popup_controller_tests.js | 1 - .../pos_discount/static/src/js/DiscountButton.js | 2 +- .../pos_discount/static/src/xml/DiscountButton.xml | 2 +- .../static/src/js/epson_printer.js | 2 +- .../static/src/xml/epos_templates.xml | 2 +- addons/pos_hr/static/src/js/HeaderLockButton.js | 3 +-- addons/pos_hr/static/src/js/LoginScreen.js | 2 +- addons/pos_hr/static/src/xml/CashierName.xml | 2 +- addons/pos_hr/static/src/xml/HeaderLockButton.xml | 2 +- addons/pos_hr/static/src/xml/LoginScreen.xml | 2 +- .../src/js/ControlButtons/PromoCodeButton.js | 2 +- .../src/js/ControlButtons/ResetProgramsButton.js | 2 +- .../static/src/js/ControlButtons/RewardButton.js | 2 +- .../src/xml/ControlButtons/PromoCodeButton.xml | 2 +- .../src/xml/ControlButtons/ResetProgramsButton.xml | 2 +- .../static/src/xml/ControlButtons/RewardButton.xml | 2 +- addons/pos_loyalty/static/src/xml/OrderSummary.xml | 2 +- .../static/src/js/PaymentTransactionPopup.js | 2 +- .../static/src/xml/PaymentTransactionPopup.xml | 2 +- .../static/src/app/floor_screen/edit_bar.js | 1 - .../static/src/app/floor_screen/floor_screen.js | 1 - .../ControlButtons/OrderlineNoteButton.js | 2 +- .../ControlButtons/PrintBillButton.js | 3 +-- .../ControlButtons/SplitBillButton.js | 2 +- .../ControlButtons/TableGuestsButton.js | 2 +- .../ControlButtons/TransferOrderButton.js | 2 +- .../js/Screens/SplitBillScreen/SplitBillScreen.js | 2 +- .../js/Screens/SplitBillScreen/SplitOrderline.js | 6 ++---- .../static/src/js/Screens/TicketScreen.js | 3 +-- .../static/src/js/Screens/TipScreen.js | 3 +-- .../xml/Screens/PaymentScreen/PaymentScreen.xml | 2 +- .../PaymentScreen/PaymentScreenPaymentLines.xml | 2 +- .../xml/Screens/ProductScreen/ActionpadWidget.xml | 2 +- .../ControlButtons/OrderlineNoteButton.xml | 2 +- .../ControlButtons/PrintBillButton.xml | 2 +- .../ControlButtons/SplitBillButton.xml | 2 +- .../ControlButtons/TableGuestsButton.xml | 2 +- .../ControlButtons/TransferOrderButton.xml | 2 +- .../src/xml/Screens/ProductScreen/Orderline.xml | 2 +- .../xml/Screens/ProductScreen/ProductScreen.xml | 2 +- .../src/xml/Screens/ReceiptScreen/OrderReceipt.xml | 2 +- .../Screens/SplitBillScreen/SplitBillScreen.xml | 2 +- .../xml/Screens/SplitBillScreen/SplitOrderline.xml | 2 +- .../static/src/xml/Screens/TicketScreen.xml | 4 ++-- .../pos_restaurant/static/src/xml/TipReceipt.xml | 2 +- .../src/js/OrderManagementScreen/SaleOrderList.js | 2 +- .../SaleOrderManagementControlPanel.js | 2 +- .../SaleOrderManagementScreen.js | 2 +- .../src/js/OrderManagementScreen/SaleOrderRow.js | 2 +- .../pos_sale/static/src/js/SetSaleOrderButton.js | 2 +- .../xml/OrderManagementScreen/SaleOrderList.xml | 2 +- .../SaleOrderManagementControlPanel.xml | 2 +- .../SaleOrderManagementScreen.xml | 2 +- .../src/xml/OrderManagementScreen/SaleOrderRow.xml | 2 +- .../static/src/xml/ProductScreen/Orderline.xml | 2 +- .../static/src/xml/ReceiptScreen/OrderReceipt.xml | 2 +- .../pos_sale/static/src/xml/SetSaleOrderButton.xml | 2 +- .../static/src/xml/Popups/ProductInfoPopup.xml | 2 +- .../ControlButtons/ProductInfoButton.xml | 2 +- addons/pos_six/static/src/js/BalanceButton.js | 2 +- addons/pos_six/static/src/xml/BalanceButton.xml | 2 +- 190 files changed, 210 insertions(+), 236 deletions(-) diff --git a/addons/l10n_ae_pos/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml b/addons/l10n_ae_pos/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml index 3ec842972ab..08656a8b220 100644 --- a/addons/l10n_ae_pos/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml +++ b/addons/l10n_ae_pos/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml @@ -1,6 +1,6 @@ - +
VAT diff --git a/addons/l10n_co_pos/static/src/xml/pos.xml b/addons/l10n_co_pos/static/src/xml/pos.xml index 6cc28addc9b..2afb47af61c 100644 --- a/addons/l10n_co_pos/static/src/xml/pos.xml +++ b/addons/l10n_co_pos/static/src/xml/pos.xml @@ -1,7 +1,7 @@ - +
diff --git a/addons/l10n_fr_pos_cert/static/src/xml/OrderReceipt.xml b/addons/l10n_fr_pos_cert/static/src/xml/OrderReceipt.xml index 2051b031946..e014f6aebb8 100644 --- a/addons/l10n_fr_pos_cert/static/src/xml/OrderReceipt.xml +++ b/addons/l10n_fr_pos_cert/static/src/xml/OrderReceipt.xml @@ -1,6 +1,6 @@ - +
@@ -9,7 +9,7 @@
- +
diff --git a/addons/l10n_fr_pos_cert/static/src/xml/Orderline.xml b/addons/l10n_fr_pos_cert/static/src/xml/Orderline.xml index ef790a1be8a..87417bd4bfa 100644 --- a/addons/l10n_fr_pos_cert/static/src/xml/Orderline.xml +++ b/addons/l10n_fr_pos_cert/static/src/xml/Orderline.xml @@ -1,7 +1,7 @@ - +
  • diff --git a/addons/l10n_in_pos/static/src/xml/pos_receipt.xml b/addons/l10n_in_pos/static/src/xml/pos_receipt.xml index 3402f545ab7..84856c69c35 100644 --- a/addons/l10n_in_pos/static/src/xml/pos_receipt.xml +++ b/addons/l10n_in_pos/static/src/xml/pos_receipt.xml @@ -1,6 +1,6 @@ - +
    @@ -17,7 +17,7 @@ - +
    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 57a8a52d905..8f519e9d43e 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 @@ -4,7 +4,7 @@ import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup"; import { _lt } from "@web/core/l10n/translation"; export class ErrorBarcodePopup extends ErrorPopup { - static template = "ErrorBarcodePopup"; + static template = "point_of_sale.ErrorBarcodePopup"; static defaultProps = { confirmText: _lt("Ok"), cancelText: _lt("Cancel"), diff --git a/addons/point_of_sale/static/src/app/barcode/error_popup/barcode_error_popup.xml b/addons/point_of_sale/static/src/app/barcode/error_popup/barcode_error_popup.xml index d92ee4daed1..c701a475f02 100644 --- a/addons/point_of_sale/static/src/app/barcode/error_popup/barcode_error_popup.xml +++ b/addons/point_of_sale/static/src/app/barcode/error_popup/barcode_error_popup.xml @@ -1,7 +1,7 @@ - +