Skip to content
Browse files

[FIX] point_of_sale: lost pos orders on IntegrityError

This revision is similar to

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.

inherits from

We therefore choose to use this Exception class,
to include all kind of psycopg2 exceptions that prevent
the transaction to be committed.


closes #32577

Signed-off-by: Denis Ledoux <>
  • Loading branch information...
beledouxdenis committed Apr 10, 2019
1 parent e0ba543 commit 39fd19ffd7799301b94199390e7dfc10f9762254
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/point_of_sale/models/
@@ -615,7 +615,7 @@ def create_from_ui(self, orders):

except psycopg2.OperationalError:
except psycopg2.DatabaseError:
# do not hide transactional errors, the order(s) won't be saved!
except Exception as e:

0 comments on commit 39fd19f

Please sign in to comment.
You can’t perform that action at this time.