odoo/odoo#89063

Created by Robin Engels (roen)
label
odoo-dev:15.0-opw-2813512-double_clicking_validate-roen
head
8d7a3efafb83a92efa5531fb7fed1077c0cb294e
target
15.0
merged
2 years ago by Robin Engels (roen)
forward-ports

[FIX] point_of_sale: fix traceback when fast click validate

Current behavior:
When clicking multiple times on the validate button in PoS
a traceback appears.
When creating a customer from the PoS, if you click mutliple times
on the create button the customer would be created multiple times
in the Db.

Steps to reproduce issue 1:
- To reproduce you need a slow internet connection, you
can do that in the developper menu of chrome (F12) and
in the network tab select 'slow 3G' instead of 'no throttling'
- Go in a PoS session, make an order
- Go in the payment screen
- Press validate multiple times.
- A traceback appears

Steps to reproduce issue 2:
- Go in the customer selection screen
- Go in the create customer screen
- Enter a name, and click multiple times on the create button
- If you check customer list the new customer should appear
multiple times

opw-2813512
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr