Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] point_of_sale: fix traceback when fast click validate #89063

Conversation

robinengels
Copy link
Contributor

@robinengels robinengels commented Apr 19, 2022

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

@robodoo
Copy link
Contributor

robodoo commented Apr 19, 2022

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Apr 19, 2022
@robinengels robinengels force-pushed the 15.0-opw-2813512-double_clicking_validate-roen branch 7 times, most recently from a20c8fa to 3a63c10 Compare April 21, 2022 09:10
@robinengels robinengels marked this pull request as ready for review April 21, 2022 09:11
@robinengels
Copy link
Contributor Author

@pimodoo

@caburj
Copy link
Contributor

caburj commented May 5, 2022

I would prefer having a state variable in the component that will serve a lock, such that if it's true, no need to execute the method. Practically similar to your solution but more principled (at least in my opinion). Also, I think you changed the wrong saveChanges. The right one is in PartnerListScreen.

@robinengels robinengels force-pushed the 15.0-opw-2813512-double_clicking_validate-roen branch 2 times, most recently from 69a52a8 to 56322e3 Compare May 9, 2022 13:07
@robinengels
Copy link
Contributor Author

@caburj this should be better

@robinengels robinengels force-pushed the 15.0-opw-2813512-double_clicking_validate-roen branch 2 times, most recently from d412a00 to bb85533 Compare May 9, 2022 15:01
@robinengels robinengels requested a review from caburj May 9, 2022 15:02
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
@robinengels robinengels force-pushed the 15.0-opw-2813512-double_clicking_validate-roen branch from bb85533 to 8d7a3ef Compare May 16, 2022 11:38
robinengels added a commit to odoo-dev/odoo that referenced this pull request May 16, 2022
partial backport of : odoo#89063

opw-2813512
@kitan191
Copy link
Contributor

@robodoo delegate+

@robinengels
Copy link
Contributor Author

@robodoo r+

@fw-bot
Copy link
Contributor

fw-bot commented May 20, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #91511, #91516

5 similar comments
@fw-bot
Copy link
Contributor

fw-bot commented May 21, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #91511, #91516

@fw-bot
Copy link
Contributor

fw-bot commented May 22, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #91511, #91516

@fw-bot
Copy link
Contributor

fw-bot commented May 23, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #91511, #91516

@fw-bot
Copy link
Contributor

fw-bot commented May 24, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #91511, #91516

@fw-bot
Copy link
Contributor

fw-bot commented May 25, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #91511, #91516

robodoo pushed a commit that referenced this pull request May 25, 2022
partial backport of : #89063

opw-2813512

closes #91469

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
@fw-bot
Copy link
Contributor

fw-bot commented May 26, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #91511, #91516

1 similar comment
@fw-bot
Copy link
Contributor

fw-bot commented May 28, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #91511, #91516

@fw-bot fw-bot deleted the 15.0-opw-2813512-double_clicking_validate-roen branch May 30, 2022 18:46
@fw-bot
Copy link
Contributor

fw-bot commented Jun 5, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #91511, #91516

odooaktiv pushed a commit to odooaktiv/odoo that referenced this pull request Jun 13, 2022
partial backport of : odoo#89063

opw-2813512

closes odoo#91469

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
@fw-bot
Copy link
Contributor

fw-bot commented Jun 21, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #91511, #91516

1 similar comment
@fw-bot
Copy link
Contributor

fw-bot commented Jul 23, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #91511, #91516

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants