From 41137c304fe4d3b166391a8f0636c621fb358fa7 Mon Sep 17 00:00:00 2001 From: Gert Pellin Date: Mon, 25 Mar 2019 10:45:44 +0000 Subject: [PATCH 1/4] [FIX] point_of_sale: fix decimal point Before this fix there was no check if there was already a decimal point in the value when using the onscreen keypad. Fixes #32034 Steps to reproduce: * Open up POS interface * Add an item * Press the decimal point button multiple times (2 or more) * Note that pressing additional number keys do not display * Backspace must be pressed for the number of digits entered, plus the multiple decimal points, to clear all the hidden characters in the value buffer * Same behavior occurs with the Discount and Price values Current behavior: Multiple decimal point characters can be "entered" and are inserted into value buffer (Qty, Disc, or Price), but do not display on screen. Additional digits entered after multiple decimal point presses are inserted into buffer, but do not display on screen. Additional digits entered after the last valid digit on the screen are also inserted into the buffer. Backspace must be used to remove the invisible characters from the value buffer. Expected behavior: The value buffer for Qty, Disc, or Price should more closely match what is displayed on the screen. Characters which are invalid and aren't displayed on the screen, should not be inserted into the value buffer, including the decimal point button. closes odoo/odoo#32089 Signed-off-by: Quentin Lejeune (qle) --- addons/point_of_sale/static/src/js/models.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 5e00712be0d..795597574a3 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -2350,7 +2350,7 @@ exports.NumpadState = Backbone.Model.extend({ this.set({ buffer: "-" + newChar }); - } else { + } else if (!(newChar === '.') || oldBuffer.indexOf('.') === -1) { this.set({ buffer: (this.get('buffer')) + newChar }); From e0ba54331a5369c414bc501c69d1c33beeb3acba Mon Sep 17 00:00:00 2001 From: Olivier Colson Date: Wed, 27 Mar 2019 09:21:55 +0000 Subject: [PATCH 2/4] [FIX] l10n_ca: add missing child to tax group closes odoo/odoo#32144 Signed-off-by: Nicolas Martinelli (nim) --- addons/l10n_ca/data/account_tax_data.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_ca/data/account_tax_data.xml b/addons/l10n_ca/data/account_tax_data.xml index 864f8402fb1..d936dc451c4 100644 --- a/addons/l10n_ca/data/account_tax_data.xml +++ b/addons/l10n_ca/data/account_tax_data.xml @@ -110,7 +110,7 @@ sale 100 group - + From 39fd19ffd7799301b94199390e7dfc10f9762254 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 10 Apr 2019 09:28:16 +0000 Subject: [PATCH 3/4] [FIX] point_of_sale: lost pos orders on IntegrityError This revision is similar to 605b94e64c202d7dbb335ce37280fae87a3a6d87 except that instead of an OperationalError (e.g. a conccurent update), this is an IntegrityError which is raised, an sql constraint which is not met, e.g. a unique or required constraint. In the case of this opw, this is the picking name unique constraint which was not met, the picking sequence number has somehow been re-used. Both `psycopg2.OperationalError` and `psycopg2.IntegrityError` inherits from `psycopg2.DatabaseError` We therefore choose to use this Exception class, to include all kind of psycopg2 exceptions that prevent the transaction to be committed. opw-1965679 closes odoo/odoo#32577 Signed-off-by: Denis Ledoux --- addons/point_of_sale/models/pos_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index 21746b083ae..68ffa036317 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -615,7 +615,7 @@ class PosOrder(models.Model): try: pos_order.action_pos_order_paid() - except psycopg2.OperationalError: + except psycopg2.DatabaseError: # do not hide transactional errors, the order(s) won't be saved! raise except Exception as e: From 78ba90d54826c2ba11626e9a89b142964db25e2f Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 10 Apr 2019 17:45:04 +0000 Subject: [PATCH 4/4] [FIX] requirements: bump up jinja2 reqs Recommended by GitHub's repository alerts. We normally stick as close as possible to the version we depend on in the official DEB packages. This in turn depends on the version of Debian stable at the time of release - for 10.0 that would be Debian 8 (jessie) and thus Jinja 2.7.3 (albeit with security backports). However Jinja2 before 2.10.1 suffers from a few issues that could lead to crashes of Odoo processes. It seems it's worth an exception to our rule for pip users, similarly to previous bump up at d2605bccdba1838db5700a6ae0dd12ca9f9b20c7. closes odoo/odoo#32602 Signed-off-by: Christophe Simonis --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index eaf01b182b0..180e8ac8d6b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ feedparser==5.2.1 gevent==1.1.2 greenlet==0.4.10 jcconv==0.2.3 -Jinja2==2.8.1 +Jinja2==2.10.1 lxml==3.5.0 Mako==1.0.4 MarkupSafe==0.23