Browse Source

[MIG] pos_timeout: Migration to 13.0

pull/528/head
François Honoré 4 years ago
parent
commit
cbf7a1a19b
  1. 12
      pos_timeout/__manifest__.py
  2. 2
      pos_timeout/i18n/es.po
  3. 6
      pos_timeout/i18n/fr.po
  4. 2
      pos_timeout/i18n/hr_HR.po
  5. 2
      pos_timeout/i18n/it.po
  6. 2
      pos_timeout/i18n/nl_NL.po
  7. 2
      pos_timeout/i18n/pos_timeout.pot
  8. 2
      pos_timeout/models/pos_config.py
  9. 2
      pos_timeout/readme/DESCRIPTION.rst
  10. 3
      pos_timeout/static/src/js/pos_timeout.js
  11. 19
      pos_timeout/views/view_pos_config.xml
  12. 1
      setup/pos_timeout/odoo/__init__.py
  13. 1
      setup/pos_timeout/odoo/addons/__init__.py

12
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,
}

2
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 "

6
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)."

2
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 "

2
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 "

2
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 "

2
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"
""

2
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"

2
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.

3
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;

19
pos_timeout/views/view_pos_config.xml

@ -2,11 +2,22 @@
<odoo>
<record id="view_pos_config_form" model="ir.ui.view">
<field name="model">pos.config</field>
<field name="inherit_id" ref="point_of_sale.view_pos_config_form" />
<field name="inherit_id" ref="point_of_sale.pos_config_view_form" />
<field name="arch" type="xml">
<field name="iface_invoicing" position="before">
<field name="pos_order_timeout" />
</field>
<div id="accounting_section" position="after">
<h2>Technical settings</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_right_pane">
<span class="o_form_label">Timeout</span>
<div class="text-muted">
<label for="pos_order_timeout" />
</div>
<field name="pos_order_timeout" />
</div>
</div>
</div>
</div>
</field>
</record>
</odoo>

1
setup/pos_timeout/odoo/__init__.py

@ -1 +0,0 @@
__import__('pkg_resources').declare_namespace(__name__)

1
setup/pos_timeout/odoo/addons/__init__.py

@ -1 +0,0 @@
__import__('pkg_resources').declare_namespace(__name__)
Loading…
Cancel
Save