From 67e148c20f82de862b3f78fc5a54d1e63555600e Mon Sep 17 00:00:00 2001 From: Joseph Caburnay Date: Wed, 20 May 2020 05:15:39 +0000 Subject: [PATCH] [IMP] point_of_sale: various pos backend views and pos ui improvements TASK-ID: 2230195 --- addons/point_of_sale/models/pos_config.py | 4 +- addons/point_of_sale/models/pos_session.py | 2 +- addons/point_of_sale/static/src/css/pos.css | 8 +++ .../Screens/PaymentScreen/PaymentScreen.xml | 60 ++++++++++--------- .../xml/Screens/ProductScreen/OrderWidget.xml | 2 +- .../point_of_sale/views/pos_config_view.xml | 13 ++-- addons/point_of_sale/views/pos_order_view.xml | 16 +++-- .../point_of_sale/views/pos_session_view.xml | 18 +++--- addons/pos_hr/views/pos_order_view.xml | 2 +- addons/pos_restaurant/models/pos_config.py | 4 +- .../pos_restaurant/views/pos_config_views.xml | 4 +- 11 files changed, 75 insertions(+), 58 deletions(-) diff --git a/addons/point_of_sale/models/pos_config.py b/addons/point_of_sale/models/pos_config.py index d63bced8eb9..dae8d95ddf8 100644 --- a/addons/point_of_sale/models/pos_config.py +++ b/addons/point_of_sale/models/pos_config.py @@ -194,8 +194,8 @@ class PosConfig(models.Model): use_pricelist = fields.Boolean("Use a pricelist.") tax_regime = fields.Boolean("Tax Regime") tax_regime_selection = fields.Boolean("Tax Regime Selection value") - start_category = fields.Boolean("Set Start Category", default=False) - limit_categories = fields.Boolean("Restrict Available Product Categories") + start_category = fields.Boolean("Start Category", default=False) + limit_categories = fields.Boolean("Restrict Product Categories") module_account = fields.Boolean(string='Invoicing', help='Enables invoice generation from the Point of Sale.') module_pos_restaurant = fields.Boolean("Is a Bar/Restaurant") module_pos_discount = fields.Boolean("Global Discounts") diff --git a/addons/point_of_sale/models/pos_session.py b/addons/point_of_sale/models/pos_session.py index 8abdcef3167..8e058ec8712 100644 --- a/addons/point_of_sale/models/pos_session.py +++ b/addons/point_of_sale/models/pos_session.py @@ -32,7 +32,7 @@ class PosSession(models.Model): index=True) name = fields.Char(string='Session ID', required=True, readonly=True, default='/') user_id = fields.Many2one( - 'res.users', string='Responsible', + 'res.users', string='Opened By', required=True, index=True, readonly=True, diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index a53f99fd54e..8b1dedd7cdf 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -1489,6 +1489,9 @@ td { padding-left: 0; flex-grow: 5; } +.payment-screen .customer-button { + margin-bottom: 10px; +} .payment-screen .payment-buttons .button { background: #e2e2e2; line-height: 73px; @@ -1618,6 +1621,11 @@ td { .payment-screen .payment-buttons { display: flex; flex-wrap: wrap; + flex-direction: column; + } + .payment-screen .payment-controls { + display: flex; + flex-wrap: wrap; } .payment-screen .payment-buttons .button { flex-basis: 30%; diff --git a/addons/point_of_sale/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml b/addons/point_of_sale/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml index e2382e2f3f3..d6ae732708b 100644 --- a/addons/point_of_sale/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml +++ b/addons/point_of_sale/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml @@ -49,35 +49,39 @@
-
- - - - - - - Customer - - +
+
+ + + + + + + Customer + + +
-
- Invoice -
-
- Email -
-
- Tip -
-
- Open Cashbox +
+
+ Invoice +
+
+ Email +
+
+ Tip +
+
+ Open Cashbox +
diff --git a/addons/point_of_sale/static/src/xml/Screens/ProductScreen/OrderWidget.xml b/addons/point_of_sale/static/src/xml/Screens/ProductScreen/OrderWidget.xml index 316453726fc..532309dce94 100644 --- a/addons/point_of_sale/static/src/xml/Screens/ProductScreen/OrderWidget.xml +++ b/addons/point_of_sale/static/src/xml/Screens/ProductScreen/OrderWidget.xml @@ -8,7 +8,7 @@
-

Your shopping cart is empty

+

This order is empty

diff --git a/addons/point_of_sale/views/pos_config_view.xml b/addons/point_of_sale/views/pos_config_view.xml index e3b849801e1..c1dd061b0d6 100644 --- a/addons/point_of_sale/views/pos_config_view.xml +++ b/addons/point_of_sale/views/pos_config_view.xml @@ -71,7 +71,7 @@
- Login with Employees + Authorized Employees
Use employee credentials to log in to the PoS session and switch cashier
@@ -102,7 +102,7 @@