From cbf7a1a19b95be36b7914e08bab374f289e3bc1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Honor=C3=A9?= Date: Fri, 28 Aug 2020 08:37:09 +0200 Subject: [PATCH] [MIG] pos_timeout: Migration to 13.0 --- pos_timeout/__manifest__.py | 12 ++++++------ pos_timeout/i18n/es.po | 2 +- pos_timeout/i18n/fr.po | 6 +++--- pos_timeout/i18n/hr_HR.po | 2 +- pos_timeout/i18n/it.po | 2 +- pos_timeout/i18n/nl_NL.po | 2 +- pos_timeout/i18n/pos_timeout.pot | 2 +- pos_timeout/models/pos_config.py | 2 +- pos_timeout/readme/DESCRIPTION.rst | 2 +- pos_timeout/static/src/js/pos_timeout.js | 3 ++- pos_timeout/views/view_pos_config.xml | 19 +++++++++++++++---- setup/pos_timeout/odoo/__init__.py | 1 - setup/pos_timeout/odoo/addons/__init__.py | 1 - 13 files changed, 33 insertions(+), 23 deletions(-) delete mode 100644 setup/pos_timeout/odoo/__init__.py delete mode 100644 setup/pos_timeout/odoo/addons/__init__.py diff --git a/pos_timeout/__manifest__.py b/pos_timeout/__manifest__.py index 269549ad..bb34e524 100644 --- a/pos_timeout/__manifest__.py +++ b/pos_timeout/__manifest__.py @@ -6,14 +6,14 @@ { "name": "Point of Sale - timeout", "summary": "Set the timeout of the point of sale", - "version": "10.0.1.0.0", - "category": "Point Of sale", + "version": "13.0.1.0.0", + "category": "Sales/Point Of Sale", "website": "https://odoo-community.org/", "author": "GRAP, Odoo Community Association (OCA)", "license": "AGPL-3", - "depends": ["point_of_sale",], - "images": ["static/description/pos_config.png",], - "data": ["views/view_pos_config.xml", "views/templates.xml",], - "qweb": ["static/src/xml/pos_timeout.xml",], + "depends": ["point_of_sale"], + "images": ["static/description/pos_config.png"], + "data": ["views/view_pos_config.xml", "views/templates.xml"], + "qweb": ["static/src/xml/pos_timeout.xml"], "installable": True, } diff --git a/pos_timeout/i18n/es.po b/pos_timeout/i18n/es.po index 5b95f9c1..a86bb01c 100644 --- a/pos_timeout/i18n/es.po +++ b/pos_timeout/i18n/es.po @@ -24,7 +24,7 @@ msgid "" "Defines the value of the client-side timeout for the creation of PoS " "Order(s) from the POS UI.\n" " The value is expressed in seconds, for a single order.\n" -" If not defined, the default Odoo value will be used: 7.5 seconds.\n" +" If not defined, the default Odoo value will be used: 30 seconds.\n" " If the call contains more than one order (after a long disconnection period " "for example, or if the previous call raised the timeout),\n" " the effective timeout value applied will be equal to the defined timeout " diff --git a/pos_timeout/i18n/fr.po b/pos_timeout/i18n/fr.po index 3c1e58ff..bb1b2453 100644 --- a/pos_timeout/i18n/fr.po +++ b/pos_timeout/i18n/fr.po @@ -22,7 +22,7 @@ msgid "" "Defines the value of the client-side timeout for the creation of PoS " "Order(s) from the POS UI.\n" " The value is expressed in seconds, for a single order.\n" -" If not defined, the default Odoo value will be used: 7.5 seconds.\n" +" If not defined, the default Odoo value will be used: 30 seconds.\n" " If the call contains more than one order (after a long disconnection period " "for example, or if the previous call raised the timeout),\n" " the effective timeout value applied will be equal to the defined timeout " @@ -43,10 +43,10 @@ msgstr "pos.config" #~ msgid "" #~ "Define the timeout for the creation of PoS Order in the Front Office UI.\n" #~ " The value is expressed in seconds.\n" -#~ " If not defined, the default Odoo value will be used (7.5 seconds)." +#~ " If not defined, the default Odoo value will be used (30 seconds)." #~ msgstr "" #~ "Définit le timeout pour la création des commandes de vente dans la partie " #~ "front office du point de vente.\n" #~ " La valeur est exprimée en secondes.\n" #~ " Si elle n'est pas définie, la valeur par défaut de Odoo sera utilisée. " -#~ "(7.5 secondes)." +#~ "(30 secondes)." diff --git a/pos_timeout/i18n/hr_HR.po b/pos_timeout/i18n/hr_HR.po index 110f76c3..b97f55c8 100644 --- a/pos_timeout/i18n/hr_HR.po +++ b/pos_timeout/i18n/hr_HR.po @@ -26,7 +26,7 @@ msgid "" "Defines the value of the client-side timeout for the creation of PoS " "Order(s) from the POS UI.\n" " The value is expressed in seconds, for a single order.\n" -" If not defined, the default Odoo value will be used: 7.5 seconds.\n" +" If not defined, the default Odoo value will be used: 30 seconds.\n" " If the call contains more than one order (after a long disconnection period " "for example, or if the previous call raised the timeout),\n" " the effective timeout value applied will be equal to the defined timeout " diff --git a/pos_timeout/i18n/it.po b/pos_timeout/i18n/it.po index cb4b22df..ccb6f7eb 100644 --- a/pos_timeout/i18n/it.po +++ b/pos_timeout/i18n/it.po @@ -24,7 +24,7 @@ msgid "" "Defines the value of the client-side timeout for the creation of PoS " "Order(s) from the POS UI.\n" " The value is expressed in seconds, for a single order.\n" -" If not defined, the default Odoo value will be used: 7.5 seconds.\n" +" If not defined, the default Odoo value will be used: 30 seconds.\n" " If the call contains more than one order (after a long disconnection period " "for example, or if the previous call raised the timeout),\n" " the effective timeout value applied will be equal to the defined timeout " diff --git a/pos_timeout/i18n/nl_NL.po b/pos_timeout/i18n/nl_NL.po index 49e14de7..3d201931 100644 --- a/pos_timeout/i18n/nl_NL.po +++ b/pos_timeout/i18n/nl_NL.po @@ -25,7 +25,7 @@ msgid "" "Defines the value of the client-side timeout for the creation of PoS " "Order(s) from the POS UI.\n" " The value is expressed in seconds, for a single order.\n" -" If not defined, the default Odoo value will be used: 7.5 seconds.\n" +" If not defined, the default Odoo value will be used: 30 seconds.\n" " If the call contains more than one order (after a long disconnection period " "for example, or if the previous call raised the timeout),\n" " the effective timeout value applied will be equal to the defined timeout " diff --git a/pos_timeout/i18n/pos_timeout.pot b/pos_timeout/i18n/pos_timeout.pot index 58bf34ce..3aa2037d 100644 --- a/pos_timeout/i18n/pos_timeout.pot +++ b/pos_timeout/i18n/pos_timeout.pot @@ -17,7 +17,7 @@ msgstr "" #: model:ir.model.fields,help:pos_timeout.field_pos_config_pos_order_timeout msgid "Defines the value of the client-side timeout for the creation of PoS Order(s) from the POS UI.\n" " The value is expressed in seconds, for a single order.\n" -" If not defined, the default Odoo value will be used: 7.5 seconds.\n" +" If not defined, the default Odoo value will be used: 30 seconds.\n" " If the call contains more than one order (after a long disconnection period for example, or if the previous call raised the timeout),\n" " the effective timeout value applied will be equal to the defined timeout value multiplied by the number of orders.\n" "" diff --git a/pos_timeout/models/pos_config.py b/pos_timeout/models/pos_config.py index 1e2ff029..a5dee5b4 100644 --- a/pos_timeout/models/pos_config.py +++ b/pos_timeout/models/pos_config.py @@ -14,7 +14,7 @@ class PosConfig(models.Model): " client-side timeout for the creation of PoS Order(s)" " from the POS UI.\n" " The value is expressed in seconds, for a single order.\n" - " If not defined, the default Odoo value will be used: 7.5 seconds.\n" + " If not defined, the default Odoo value will be used: 30 seconds.\n" " If the call contains more than one order" " (after a long disconnection period for example, or if the previous" " call raised the timeout),\n the effective timeout value applied will" diff --git a/pos_timeout/readme/DESCRIPTION.rst b/pos_timeout/readme/DESCRIPTION.rst index c5058818..24aa6e9d 100644 --- a/pos_timeout/readme/DESCRIPTION.rst +++ b/pos_timeout/readme/DESCRIPTION.rst @@ -1,6 +1,6 @@ This module extends the functionality of Point of Sale module. -By default, in Odoo a timeout is set to 7.5 seconds for the creation of +By default, in Odoo a timeout is set to 30 seconds for the creation of a PoS order. This threshold is usually sufficient, but in some cases it is not, mainly if the connection is bad, or if some custom modules add extra long treatments. diff --git a/pos_timeout/static/src/js/pos_timeout.js b/pos_timeout/static/src/js/pos_timeout.js index bf29872f..30c2f8fc 100644 --- a/pos_timeout/static/src/js/pos_timeout.js +++ b/pos_timeout/static/src/js/pos_timeout.js @@ -3,9 +3,9 @@ @author: Sylvain LE GAL (https://twitter.com/legalsylvain) License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). *****************************************************************************/ -"use strict"; odoo.define("pos_timeout.models", function(require) { + "use strict"; var models = require("point_of_sale.models"); /** *********************************************************************** @@ -14,6 +14,7 @@ odoo.define("pos_timeout.models", function(require) { */ var PosModelParent = models.PosModel.prototype; models.PosModel = models.PosModel.extend({ + // eslint-disable-next-line no-unused-vars _save_to_server: function(orders, options) { // Get PoS Config Settings var timeout = this.config.pos_order_timeout; diff --git a/pos_timeout/views/view_pos_config.xml b/pos_timeout/views/view_pos_config.xml index 5f1d679d..b63bcb59 100644 --- a/pos_timeout/views/view_pos_config.xml +++ b/pos_timeout/views/view_pos_config.xml @@ -2,11 +2,22 @@ pos.config - + - - - +
+

Technical settings

+
+
+
+ Timeout +
+
+ +
+
+
+
diff --git a/setup/pos_timeout/odoo/__init__.py b/setup/pos_timeout/odoo/__init__.py deleted file mode 100644 index de40ea7c..00000000 --- a/setup/pos_timeout/odoo/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/pos_timeout/odoo/addons/__init__.py b/setup/pos_timeout/odoo/addons/__init__.py deleted file mode 100644 index de40ea7c..00000000 --- a/setup/pos_timeout/odoo/addons/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__)