diff --git a/pos_order_mgmt/README.rst b/pos_order_mgmt/README.rst index 0432d954..826df053 100644 --- a/pos_order_mgmt/README.rst +++ b/pos_order_mgmt/README.rst @@ -37,17 +37,23 @@ reprint past tickets or return them. Configuration ============= -To configure this module, you need to: +To configure this module, you need to go to *Point of Sale > Configuration > +Point of Sale* and enable *Order Management* -#. Go to *Point of Sale > Configuration > Point of Sale* and select one of - them. -#. Change *Max Done Orders Quantity To Load* to your desired amount (10 by - default). Please note that the more you load, the more it will take to load +.. image:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_order_mgmt/static/description/order-mgmt-config.png + +#. Change *Maximum orders to load* to your desired amount (10 by default). + Please note that the more you load, the more it will take to load them in the session opening. You can also set it to 0 and you'll just be able to load them from the order list screen. -#. Set *Reprint Done Orders* on if you want to be able to reprint past orders + +#. Enable *Reprint orders* on if you want to be able to reprint past orders in that PoS. -#. Set *Return Done Orders* on if you want to be able to return past orders + +#. Enable *Return orders* on if you want to be able to return past orders + in that PoS. + +#. Enable *Duplicate orders* on if you want to be able to return past orders in that PoS. Usage diff --git a/pos_order_mgmt/__manifest__.py b/pos_order_mgmt/__manifest__.py index 4b9238c2..8bc6bede 100644 --- a/pos_order_mgmt/__manifest__.py +++ b/pos_order_mgmt/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'POS Frontend Orders Management', 'summary': 'Manage old POS Orders from the frontend', - 'version': '12.0.1.0.2', + 'version': '12.0.1.0.3', 'category': 'Point of Sale', 'author': 'GRAP, ' 'Tecnativa, ' diff --git a/pos_order_mgmt/i18n/pos_order_mgmt.pot b/pos_order_mgmt/i18n/pos_order_mgmt.pot index 7d28f377..affcd7a3 100644 --- a/pos_order_mgmt/i18n/pos_order_mgmt.pot +++ b/pos_order_mgmt/i18n/pos_order_mgmt.pot @@ -14,23 +14,18 @@ msgstr "" "Plural-Forms: \n" #. module: pos_order_mgmt -#: model_terms:ir.ui.view,arch_db:pos_order_mgmt.view_pos_config_form -msgid "Allow to duplicate done orders in this POS" -msgstr "" - -#. module: pos_order_mgmt -#: model_terms:ir.ui.view,arch_db:pos_order_mgmt.view_pos_config_form -msgid "Allow to reprint done orders in this POS" +#: model:ir.model.fields,help:pos_order_mgmt.field_pos_config__iface_copy_done_order +msgid "Allows to duplicate already done orders in the frontend" msgstr "" #. module: pos_order_mgmt #: model_terms:ir.ui.view,arch_db:pos_order_mgmt.view_pos_config_form -msgid "Allow to return done orders in this POS" +msgid "Allows to manage already done orders in the frontend." msgstr "" #. module: pos_order_mgmt -#: model:ir.model.fields,help:pos_order_mgmt.field_pos_config__iface_copy_done_order -msgid "Allows to duplicate already done orders in the frontend" +#: model:ir.model.fields,help:pos_order_mgmt.field_pos_config__iface_order_mgmt +msgid "Allows to manage orders in the frontend" msgstr "" #. module: pos_order_mgmt @@ -47,7 +42,7 @@ msgstr "" #. openerp-web #: code:addons/pos_order_mgmt/static/src/xml/pos.xml:36 #, python-format -msgid "Amount Total" +msgid "Amount" msgstr "" #. module: pos_order_mgmt @@ -59,16 +54,16 @@ msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:352 -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:407 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:353 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:408 #, python-format msgid "Can not execute this action because the POS is currently offline" msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:351 -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:406 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:352 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:407 #, python-format msgid "Connection error" msgstr "" @@ -111,18 +106,12 @@ msgstr "" #. module: pos_order_mgmt #: model:ir.model.fields,field_description:pos_order_mgmt.field_pos_config__iface_copy_done_order -#: model_terms:ir.ui.view,arch_db:pos_order_mgmt.view_pos_config_form -msgid "Duplicate Done Orders" -msgstr "" - -#. module: pos_order_mgmt -#: model_terms:ir.ui.view,arch_db:pos_order_mgmt.view_pos_config_form -msgid "Load Done Order Max Qty." +msgid "Duplicate Orders" msgstr "" #. module: pos_order_mgmt #: model:ir.model.fields,field_description:pos_order_mgmt.field_pos_config__iface_load_done_order_max_qty -msgid "Max. Done Orders Quantity To Load" +msgid "Maximum Orders to load" msgstr "" #. module: pos_order_mgmt @@ -131,8 +120,8 @@ msgid "Maximum number of orders to load on the PoS at its init. Set it to 0 to l msgstr "" #. module: pos_order_mgmt -#: model_terms:ir.ui.view,arch_db:pos_order_mgmt.view_pos_config_form -msgid "Maximum number orders to load" +#: model:ir.model.fields,field_description:pos_order_mgmt.field_pos_config__iface_order_mgmt +msgid "Order Management" msgstr "" #. module: pos_order_mgmt @@ -173,7 +162,7 @@ msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:253 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:254 #, python-format msgid "Refund " msgstr "" @@ -195,14 +184,12 @@ msgstr "" #. module: pos_order_mgmt #: model:ir.model.fields,field_description:pos_order_mgmt.field_pos_config__iface_reprint_done_order -#: model_terms:ir.ui.view,arch_db:pos_order_mgmt.view_pos_config_form -msgid "Reprint Done Orders" +msgid "Reprint Orders" msgstr "" #. module: pos_order_mgmt #: model:ir.model.fields,field_description:pos_order_mgmt.field_pos_config__iface_return_done_order -#: model_terms:ir.ui.view,arch_db:pos_order_mgmt.view_pos_config_form -msgid "Return Done Orders" +msgid "Return Orders" msgstr "" #. module: pos_order_mgmt @@ -226,7 +213,7 @@ msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:369 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:370 #, python-format msgid "Unable to load some order lines because the products are not available in the POS cache.\n" "\n" @@ -237,7 +224,7 @@ msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:368 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:369 #, python-format msgid "Unknown Products" msgstr "" diff --git a/pos_order_mgmt/models/pos_config.py b/pos_order_mgmt/models/pos_config.py index 19141593..8f53d4be 100644 --- a/pos_order_mgmt/models/pos_config.py +++ b/pos_order_mgmt/models/pos_config.py @@ -2,6 +2,7 @@ # Copyright 2018 Tecnativa S.L. - David Vidal # Copyright 2019 Coop IT Easy SCRLfs # Pierrick Brun +# Copyright 2019 Druidoo - Iván Todorovich # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import fields, models @@ -10,26 +11,32 @@ from odoo import fields, models class PosConfig(models.Model): _inherit = 'pos.config' + iface_order_mgmt = fields.Boolean( + string='Order Management', + help='Allows to manage orders in the frontend', + default=True, + ) + iface_reprint_done_order = fields.Boolean( - string='Reprint Done Orders', + string='Reprint Orders', default=True, help='Allows to reprint already done orders in the frontend', ) iface_return_done_order = fields.Boolean( - string='Return Done Orders', + string='Return Orders', default=True, help='Allows to return already done orders in the frontend', ) iface_copy_done_order = fields.Boolean( - string='Duplicate Done Orders', + string='Duplicate Orders', default=True, help='Allows to duplicate already done orders in the frontend', ) iface_load_done_order_max_qty = fields.Integer( - string='Max. Done Orders Quantity To Load', + string='Maximum Orders to load', default=10, required=True, help='Maximum number of orders to load on the PoS at its init. ' diff --git a/pos_order_mgmt/readme/CONFIGURE.rst b/pos_order_mgmt/readme/CONFIGURE.rst index 971dfdec..4bd22f33 100644 --- a/pos_order_mgmt/readme/CONFIGURE.rst +++ b/pos_order_mgmt/readme/CONFIGURE.rst @@ -1,12 +1,18 @@ -To configure this module, you need to: +To configure this module, you need to go to *Point of Sale > Configuration > +Point of Sale* and enable *Order Management* -#. Go to *Point of Sale > Configuration > Point of Sale* and select one of - them. -#. Change *Max Done Orders Quantity To Load* to your desired amount (10 by - default). Please note that the more you load, the more it will take to load +.. image:: ../static/description/order-mgmt-config.png + +#. Change *Maximum orders to load* to your desired amount (10 by default). + Please note that the more you load, the more it will take to load them in the session opening. You can also set it to 0 and you'll just be able to load them from the order list screen. -#. Set *Reprint Done Orders* on if you want to be able to reprint past orders + +#. Enable *Reprint orders* on if you want to be able to reprint past orders in that PoS. -#. Set *Return Done Orders* on if you want to be able to return past orders + +#. Enable *Return orders* on if you want to be able to return past orders + in that PoS. + +#. Enable *Duplicate orders* on if you want to be able to return past orders in that PoS. diff --git a/pos_order_mgmt/static/description/index.html b/pos_order_mgmt/static/description/index.html index 81502856..6b339b4a 100644 --- a/pos_order_mgmt/static/description/index.html +++ b/pos_order_mgmt/static/description/index.html @@ -388,17 +388,19 @@ reprint past tickets or return them.

Configuration

-

To configure this module, you need to:

+

To configure this module, you need to go to Point of Sale > Configuration > +Point of Sale and enable Order Management

+https://raw.githubusercontent.com/OCA/pos/12.0/pos_order_mgmt/static/description/order-mgmt-config.png
    -
  1. Go to Point of Sale > Configuration > Point of Sale and select one of -them.
  2. -
  3. Change Max Done Orders Quantity To Load to your desired amount (10 by -default). Please note that the more you load, the more it will take to load +
  4. Change Maximum orders to load to your desired amount (10 by default). +Please note that the more you load, the more it will take to load them in the session opening. You can also set it to 0 and you’ll just be able to load them from the order list screen.
  5. -
  6. Set Reprint Done Orders on if you want to be able to reprint past orders +
  7. Enable Reprint orders on if you want to be able to reprint past orders in that PoS.
  8. -
  9. Set Return Done Orders on if you want to be able to return past orders +
  10. Enable Return orders on if you want to be able to return past orders +in that PoS.
  11. +
  12. Enable Duplicate orders on if you want to be able to return past orders in that PoS.
diff --git a/pos_order_mgmt/static/description/order-mgmt-config.png b/pos_order_mgmt/static/description/order-mgmt-config.png new file mode 100644 index 00000000..5d27647a Binary files /dev/null and b/pos_order_mgmt/static/description/order-mgmt-config.png differ diff --git a/pos_order_mgmt/static/src/css/pos.css b/pos_order_mgmt/static/src/css/pos.css index 1f2544e3..f8c1ec0f 100644 --- a/pos_order_mgmt/static/src/css/pos.css +++ b/pos_order_mgmt/static/src/css/pos.css @@ -1,4 +1,5 @@ /* Copyright 2018 Tecnativa - David Vidal + Copyright 2019 Druidoo - Iván Todorovich License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */ @@ -6,7 +7,7 @@ font-size: 20px; } -.order-line .button { +.orderlist-screen .order-line .button { cursor: pointer; top: 0px; line-height: 32px; @@ -19,13 +20,13 @@ transition: all 150ms linear; } -.order-line .button:active { +.orderlist-screen .order-line .button:active { background: black; border-color: black; color: white; } -.order-returned-warning { +.orderlist-screen .order-returned-warning { font-size: 16px; font-style: italic; padding: 8px 0; @@ -33,3 +34,12 @@ color: white; text-align: center; } + +.orderlist-screen table td[name='td_ol_amount_total'] { + text-align: right; +} + +/* Keep the table from breaking when the customer name is too long */ +.orderlist-screen table td:not([name='td_ol_customer']) { + white-space: nowrap; +} diff --git a/pos_order_mgmt/static/src/js/widgets.js b/pos_order_mgmt/static/src/js/widgets.js index 9503b262..2d6c7660 100644 --- a/pos_order_mgmt/static/src/js/widgets.js +++ b/pos_order_mgmt/static/src/js/widgets.js @@ -2,6 +2,7 @@ Copyright 2018 Tecnativa - David Vidal Copyright 2019 Druidoo - Ivan Todorovich License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */ + odoo.define('pos_order_mgmt.widgets', function (require) { "use strict"; diff --git a/pos_order_mgmt/static/src/xml/pos.xml b/pos_order_mgmt/static/src/xml/pos.xml index 9615dae8..769ae352 100644 --- a/pos_order_mgmt/static/src/xml/pos.xml +++ b/pos_order_mgmt/static/src/xml/pos.xml @@ -2,7 +2,7 @@ - +
@@ -10,7 +10,7 @@
-
+
@@ -33,7 +33,7 @@ Ref. Customer Date - Amount Total + Amount diff --git a/pos_order_mgmt/views/view_pos_config.xml b/pos_order_mgmt/views/view_pos_config.xml index c49f5ba0..c2221379 100644 --- a/pos_order_mgmt/views/view_pos_config.xml +++ b/pos_order_mgmt/views/view_pos_config.xml @@ -1,6 +1,7 @@ @@ -9,54 +10,37 @@ pos.config - -
+
+
- +
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- +