Skip to content
Snippets Groups Projects
Commit 39fd19ff authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] point_of_sale: lost pos orders on IntegrityError


This revision is similar to
605b94e6

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: default avatarDenis Ledoux <beledouxdenis@users.noreply.github.com>
parent e0ba5433
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment