From c087603d0b2fb6f81cdfd3afc1b94f7acb6bd2bd Mon Sep 17 00:00:00 2001 From: "Xavier Luyckx (xlu)" Date: Tue, 27 Jun 2023 12:15:27 +0000 Subject: [PATCH] [REF] pos*: introduce bootstrap pos*: point_of_sale,pos_discount,pos_hr,pos_loyalty, pos_restaurant,pos_sale,pos_sale_product_configurator,pos_six Prior to this commit, the point_of_sale module relied on custom CSS. To enhance user experience, increase flexibility, and simplify maintenance, most of the custom css was replaced in this PR with Bootstrap utility classes. Task: 3354582 Authored-by: Xavier Luyckx (xlu) Part-of: odoo/odoo#129544 Co-authored-by: vlst , Pedram (pebr) --- addons/point_of_sale/__manifest__.py | 32 +- .../error_popup/barcode_error_popup.xml | 17 +- .../static/src/app/debug/debug_widget.scss | 83 +- .../static/src/app/debug/debug_widget.xml | 164 +- .../order_import_popup/order_import_popup.xml | 16 +- .../src/app/errors/popups/error_popup.xml | 16 +- .../errors/popups/error_traceback_popup.xml | 18 +- .../app/errors/popups/offline_error_popup.xml | 14 +- .../app/navbar/back_button/back_button.xml | 4 +- .../cash_move_popup/cash_move_popup.scss | 94 - .../cash_move_popup/cash_move_popup.xml | 45 +- .../app/navbar/cashier_name/cashier_name.xml | 4 +- .../app/navbar/closing_popup/closing_popup.js | 2 +- .../navbar/closing_popup/closing_popup.xml | 82 +- .../customer_facing_display_button.xml | 13 +- .../static/src/app/navbar/navbar.scss | 31 + .../static/src/app/navbar/navbar.xml | 47 +- .../app/navbar/proxy_status/proxy_status.xml | 10 +- .../sale_details_button.xml | 4 +- .../sync_notification/sync_notification.xml | 10 +- .../src/app/notification/notification.scss | 29 - .../src/app/notification/notification.xml | 4 +- .../src/app/popup/popup_controller.scss | 36 + .../static/src/app/popup/popup_controller.xml | 2 +- .../point_of_sale/static/src/app/pos_app.scss | 97 + .../point_of_sale/static/src/app/pos_app.xml | 8 +- .../partner_editor/partner_editor.scss | 23 + .../partner_editor/partner_editor.xml | 82 +- .../partner_list/partner_line/partner_line.js | 2 +- .../partner_line/partner_line.scss | 35 + .../partner_line/partner_line.xml | 22 +- .../screens/partner_list/partner_list.scss | 33 + .../app/screens/partner_list/partner_list.xml | 62 +- .../screens/payment_screen/numpad/numpad.scss | 15 + .../screens/payment_screen/numpad/numpad.xml | 2 +- .../numpad/numpad_button/numpad_button.xml | 2 +- .../payment_lines/payment_lines.scss | 29 + .../payment_lines/payment_lines.xml | 26 +- .../payment_screen/payment_screen.scss | 52 + .../screens/payment_screen/payment_screen.xml | 83 +- .../payment_status/payment_status.scss | 10 + .../payment_status/payment_status.xml | 18 +- .../product_screen/action_pad/action_pad.scss | 9 + .../product_screen/action_pad/action_pad.xml | 32 +- .../category_button/category_button.xml | 6 +- .../control_buttons/control_buttons.scss | 22 + .../control_buttons/control_buttons_popup.xml | 8 +- .../customer_button/customer_button.xml | 4 +- .../customer_note_button.xml | 6 +- .../fiscal_position_button.xml | 4 +- .../product_info_button.xml | 6 +- .../refund_button/refund_button.xml | 6 +- .../screens/product_screen/numpad/numpad.scss | 44 + .../screens/product_screen/numpad/numpad.xml | 34 +- .../screens/product_screen/order/order.scss | 8 + .../screens/product_screen/order/order.xml | 12 +- .../order_summary/order_summary.xml | 8 +- .../product_screen/orderline/orderline.js | 4 +- .../product_screen/orderline/orderline.scss | 17 + .../product_screen/orderline/orderline.xml | 21 +- .../product_screen/product/product.scss | 22 + .../product_screen/product/product.xml | 10 +- .../product_info_popup/product_info_popup.js | 3 +- .../product_info_popup.scss | 7 + .../product_info_popup/product_info_popup.xml | 157 +- .../control_panel/control_panel.scss | 43 + .../control_panel/control_panel.xml | 64 +- .../product_list/product_list.scss | 12 + .../product_list/product_list.xml | 14 +- .../screens/product_screen/product_screen.xml | 27 +- .../receipt_screen/receipt/receipt.xml | 2 +- .../receipt_screen/receipt_screen.scss | 48 + .../screens/receipt_screen/receipt_screen.xml | 69 +- .../receipt_screen/reprint_receipt_screen.xml | 20 +- .../screens/scale_screen/scale_screen.scss | 5 + .../app/screens/scale_screen/scale_screen.xml | 36 +- .../static/src/app/screens/screens.scss | 39 + .../invoice_button/invoice_button.xml | 6 +- .../order_details/order_details.xml | 26 +- .../order_details/orderline_details.xml | 18 +- .../reprint_receipt_button.xml | 6 +- .../ticket_screen/search_bar/search_bar.scss | 0 .../ticket_screen/search_bar/search_bar.xml | 8 +- .../screens/ticket_screen/ticket_screen.scss | 231 + .../screens/ticket_screen/ticket_screen.xml | 70 +- .../cash_opening_popup/cash_opening_popup.xml | 33 +- .../static/src/app/store/pos_store.js | 2 - .../product_configurator_popup.xml | 102 +- .../edit_list_input/edit_list_input.xml | 10 +- .../select_lot_popup/select_lot_popup.xml | 30 +- .../app/utils/confirm_popup/confirm_popup.xml | 16 +- .../date_picker_popup/date_picker_popup.xml | 22 +- .../app/utils/input_popups/number_popup.scss | 5 + .../app/utils/input_popups/number_popup.xml | 76 +- .../utils/input_popups/selection_popup.scss | 3 + .../utils/input_popups/selection_popup.xml | 23 +- .../utils/input_popups/text_input_popup.xml | 23 +- .../app/utils/input_popups/textarea_popup.xml | 23 +- .../money_details_popup.scss | 3 + .../money_details_popup.xml | 30 +- .../src/css/popups/cash_opening_popup.css | 34 - .../src/css/popups/closing_pos_popup.css | 218 - .../src/css/popups/closing_pos_popup.scss | 41 + .../static/src/css/popups/common.css | 35 +- .../src/css/popups/money_details_popup.css | 23 - .../static/src/css/popups/popups.scss | 105 + .../src/css/popups/product_info_popup.css | 186 - .../static/src/css/popups/text_area_popup.css | 16 - addons/point_of_sale/static/src/scss/pos.scss | 3894 +---------------- .../static/src/scss/pos_variables_extra.scss | 33 +- .../discount_button/discount_button.xml | 4 +- .../src/app/login_screen/login_screen.xml | 20 +- addons/pos_hr/static/src/css/pos.css | 116 - addons/pos_hr/static/src/css/pos.scss | 27 + .../overrides/components/navbar/navbar.xml | 8 +- .../e_wallet_button/e_wallet_button.xml | 4 +- .../promo_code_button/promo_code_button.xml | 6 +- .../reset_programs_button.xml | 6 +- .../reward_button/reward_button.xml | 6 +- .../pos_loyalty/static/src/css/Loyalty.scss | 28 - .../order_summary/order_summary.xml | 12 +- .../data/pos_restaurant_demo.xml | 16 +- .../src/app/bill_screen/bill_screen.xml | 21 +- .../orderline_note_button.xml | 6 +- .../print_bill_button/print_bill_button.xml | 4 +- .../split_bill_button/split_bill_button.xml | 4 +- .../table_guests_button.xml | 4 +- .../transfer_order_button.xml | 6 +- .../static/src/app/floor_screen/edit_bar.xml | 130 +- .../src/app/floor_screen/editable_table.js | 4 +- .../src/app/floor_screen/editable_table.xml | 4 +- .../src/app/floor_screen/floor_screen.js | 2 - .../src/app/floor_screen/floor_screen.scss | 244 +- .../src/app/floor_screen/floor_screen.xml | 23 +- .../static/src/app/floor_screen/table.js | 4 +- .../static/src/app/floor_screen/table.xml | 8 +- .../split_bill_screen/split_bill_screen.xml | 34 +- .../split_orderline/split_orderline.xml | 12 +- .../static/src/app/tip_screen/tip_screen.xml | 57 +- .../overrides/components/navbar/navbar.xml | 4 +- .../actionpad_widget/actionpad_widget.xml | 6 +- .../product_screen/orderline/orderline.xml | 4 +- .../product_screen/product_screen.xml | 16 +- .../order_receipt/order_receipt.xml | 12 +- .../ticket_screen/ticket_screen.xml | 6 +- .../static/src/overrides/models/pos_store.js | 2 +- .../static/src/scss/restaurant.scss | 308 +- .../SplitBillScreen/SplitBillScreen.scss | 8 + .../tours/helpers/BillScreenTourMethods.js | 2 +- .../tours/helpers/FloorScreenTourMethods.js | 2 +- .../sale_order_list/sale_order_list.xml | 16 +- .../sale_order_management_control_panel.xml | 46 +- .../sale_order_management_screen.xml | 4 +- .../sale_order_row/sale_order_row.xml | 18 +- .../set_sale_order_button.xml | 4 +- addons/pos_sale/static/src/css/pos_sale.css | 88 - .../product_info_button.xml | 4 +- .../product_info_popup/product_info_popup.xml | 22 +- .../src/app/balance_button/balance_button.xml | 6 +- 159 files changed, 2372 insertions(+), 6584 deletions(-) create mode 100644 addons/point_of_sale/static/src/app/navbar/navbar.scss delete mode 100644 addons/point_of_sale/static/src/app/notification/notification.scss create mode 100644 addons/point_of_sale/static/src/app/popup/popup_controller.scss create mode 100644 addons/point_of_sale/static/src/app/pos_app.scss create mode 100644 addons/point_of_sale/static/src/app/screens/partner_list/partner_editor/partner_editor.scss create mode 100644 addons/point_of_sale/static/src/app/screens/partner_list/partner_line/partner_line.scss create mode 100644 addons/point_of_sale/static/src/app/screens/partner_list/partner_list.scss create mode 100644 addons/point_of_sale/static/src/app/screens/payment_screen/numpad/numpad.scss create mode 100644 addons/point_of_sale/static/src/app/screens/payment_screen/payment_lines/payment_lines.scss create mode 100644 addons/point_of_sale/static/src/app/screens/payment_screen/payment_screen.scss create mode 100644 addons/point_of_sale/static/src/app/screens/payment_screen/payment_status/payment_status.scss create mode 100644 addons/point_of_sale/static/src/app/screens/product_screen/action_pad/action_pad.scss create mode 100644 addons/point_of_sale/static/src/app/screens/product_screen/control_buttons/control_buttons.scss create mode 100644 addons/point_of_sale/static/src/app/screens/product_screen/numpad/numpad.scss create mode 100644 addons/point_of_sale/static/src/app/screens/product_screen/order/order.scss create mode 100644 addons/point_of_sale/static/src/app/screens/product_screen/orderline/orderline.scss create mode 100644 addons/point_of_sale/static/src/app/screens/product_screen/product/product.scss create mode 100644 addons/point_of_sale/static/src/app/screens/product_screen/product_info_popup/product_info_popup.scss create mode 100644 addons/point_of_sale/static/src/app/screens/product_screen/product_list/control_panel/control_panel.scss create mode 100644 addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.scss create mode 100644 addons/point_of_sale/static/src/app/screens/receipt_screen/receipt_screen.scss create mode 100644 addons/point_of_sale/static/src/app/screens/scale_screen/scale_screen.scss create mode 100644 addons/point_of_sale/static/src/app/screens/screens.scss create mode 100644 addons/point_of_sale/static/src/app/screens/ticket_screen/search_bar/search_bar.scss create mode 100644 addons/point_of_sale/static/src/app/screens/ticket_screen/ticket_screen.scss create mode 100644 addons/point_of_sale/static/src/app/utils/input_popups/number_popup.scss create mode 100644 addons/point_of_sale/static/src/app/utils/input_popups/selection_popup.scss create mode 100644 addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.scss delete mode 100644 addons/point_of_sale/static/src/css/popups/closing_pos_popup.css create mode 100644 addons/point_of_sale/static/src/css/popups/closing_pos_popup.scss create mode 100644 addons/point_of_sale/static/src/css/popups/popups.scss delete mode 100644 addons/point_of_sale/static/src/css/popups/product_info_popup.css delete mode 100644 addons/point_of_sale/static/src/css/popups/text_area_popup.css delete mode 100644 addons/pos_hr/static/src/css/pos.css create mode 100644 addons/pos_hr/static/src/css/pos.scss create mode 100644 addons/pos_restaurant/static/src/xml/Screens/SplitBillScreen/SplitBillScreen.scss diff --git a/addons/point_of_sale/__manifest__.py b/addons/point_of_sale/__manifest__.py index c275471a0c9..c4069d3f632 100644 --- a/addons/point_of_sale/__manifest__.py +++ b/addons/point_of_sale/__manifest__.py @@ -77,16 +77,32 @@ # Main PoS assets, they are loaded in the PoS UI and in the PoS unit tests 'point_of_sale._assets_pos': [ - # scss variables and utilities - 'point_of_sale/static/src/scss/pos_variables_extra.scss', + # 'preparation_display' bootstrap customization layer + 'web/static/src/scss/functions.scss', + # 'point_of_sale/static/src/scss/primary_variables.scss', TO DO - CREATE + + # 'webclient' bootstrap customization layer ('include', 'web._assets_helpers'), - 'web/static/src/scss/bootstrap_overridden.scss', + ('include', 'web._assets_backend_helpers'), + 'web/static/src/scss/pre_variables.scss', 'web/static/lib/bootstrap/scss/_variables.scss', - 'web/static/fonts/fonts.scss', + + # Import Bootstrap + ('include', 'web._assets_bootstrap_backend'), + + # Icons 'web/static/src/libs/fontawesome/css/font-awesome.css', 'web/static/lib/odoo_ui_icons/*', + 'web/static/src/webclient/icons.scss', + + # scss variables and utilities + 'point_of_sale/static/src/scss/pos_variables_extra.scss', + 'web/static/src/scss/bootstrap_overridden.scss', + 'web/static/fonts/fonts.scss', 'web/static/src/legacy/scss/fontawesome_overridden.scss', + + # JS framework 'web/static/src/boot.js', 'web/static/src/session.js', @@ -228,14 +244,6 @@ 'web/static/tests/main.js', 'web/static/tests/setup.js', - # These 2 lines below are taken from web.assets_frontend - # They're required for the web.frontend_legacy to work properly - # It is expected to add other lines coming from the web.assets_frontend - # if we need to add more and more legacy stuff that would require other scss or js. - ('include', 'web._assets_helpers'), - 'web/static/src/scss/pre_variables.scss', - 'web/static/lib/bootstrap/scss/_variables.scss', - ('include', 'web.frontend_legacy'), ("include", "web.assets_backend_legacy_lazy"), ## END copy of web.tests_assets 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 c701a475f02..254fe96acf1 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 @@ -3,20 +3,15 @@ diff --git a/addons/point_of_sale/static/src/app/debug/debug_widget.scss b/addons/point_of_sale/static/src/app/debug/debug_widget.scss index 0fb0537852d..24c7e66a5d6 100644 --- a/addons/point_of_sale/static/src/app/debug/debug_widget.scss +++ b/addons/point_of_sale/static/src/app/debug/debug_widget.scss @@ -4,87 +4,6 @@ right: 10px; top: 106px; width: 200px; - font-size: 10px; - - background: rgba(0, 0, 0, 0.82); - color: white; - padding-bottom: 10px; cursor: move; -webkit-transform: translate3d(0, 0, 0); -} - -.debug-widget .toggle { - position: absolute; - font-size: 16px; - cursor: pointer; - top: 0px; - right: 0px; - padding: 10px; - padding-right: 15px; -} - -.debug-widget .content { - overflow: hidden; -} - -.debug-widget header { - position: relative; -} - -.debug-widget h1 { - background: black; - padding-top: 10px; - padding-left: 10px; - margin-top: 0; - margin-bottom: 0; -} - -.debug-widget .category { - background: black; - padding-left: 10px; - margin: 0px; - font-weight: bold; - padding-top: 3px; - padding-bottom: 3px; -} - -.debug-widget .button { - padding: 5px; - padding-left: 15px; - display: block; - cursor: pointer; -} - -.debug-widget .button:active { - background: rgba(96, 21, 177, 0.45); -} - -.debug-widget input { - margin-left: 10px; - margin-top: 7px; - padding: 4px; - width: 180px; - border: none; - box-sizing: border-box; - -moz-box-sizing: border-box; - border-radius: 3px; -} - -.debug-widget .status { - padding: 5px; - padding-left: 15px; - display: block; - cursor: default; -} - -.debug-widget .status.on { - background-color: #6cd11d; -} - -.debug-widget .event { - padding: 5px; - padding-left: 15px; - display: block; - cursor: default; - background-color: #1E1E1E; -} +}; diff --git a/addons/point_of_sale/static/src/app/debug/debug_widget.xml b/addons/point_of_sale/static/src/app/debug/debug_widget.xml index b029d5398d2..f8df9c3561c 100644 --- a/addons/point_of_sale/static/src/app/debug/debug_widget.xml +++ b/addons/point_of_sale/static/src/app/debug/debug_widget.xml @@ -3,88 +3,100 @@ -
+
-

Debug Window

+

Debug Window

- -
-

Electronic Scale

-
    -
  • - -
  • -
  • Set Weight
  • -
  • Reset
  • -
+ +
-

Barcode Scanner

-
    -
  • - -
  • -
  • Scan
  • -
  • Scan EAN-13
  • -
+
+
Electronic Scale
+ +
    + + +
+
-

Orders

- - +
-

Hardware Status

-
    -
  • Weighing
  • -
  • - Refresh Display -
  • -
-

Hardware Events

-
    -
  • Open Cashbox
  • -
  • Print Receipt
  • -
  • Read Weighing Scale
  • -
-

Others

-
    -
  • - Buffer: - -
  • -
+
+
Orders
+ +
+ +
+
Hardware Status
+
    +
  • Weighing
  • + +
+
+ +
+
Hardware Events
+
    +
  • Open Cashbox
  • +
  • Print Receipt
  • +
  • Read Weighing Scale
  • +
+
+ +
+
Others
+
    +
  • + Buffer: + +
  • +
+
diff --git a/addons/point_of_sale/static/src/app/debug/order_import_popup/order_import_popup.xml b/addons/point_of_sale/static/src/app/debug/order_import_popup/order_import_popup.xml index 3520605b67c..6a01fbfdda3 100644 --- a/addons/point_of_sale/static/src/app/debug/order_import_popup/order_import_popup.xml +++ b/addons/point_of_sale/static/src/app/debug/order_import_popup/order_import_popup.xml @@ -3,10 +3,12 @@