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] get login_number in the same transaction as update it #24486

Closed

Conversation

yelizariev
Copy link
Contributor

@yelizariev yelizariev commented Apr 27, 2018

Description of the issue/feature this PR addresses:

if you have two POS stations, that use same user, same pos.config,
i.e. create two sessions AND if you have bad luck, then those sessions will get
same login_number, which leads to losing half of the orders, because of POS stations
will generate the same pos_reference and only first order from the POSes is saved,
while another order is lost without let know to the cashier.

Current behavior before PR:

orders are lost

Desired behavior after PR is merged:

Be sure that login_number is not shared with another POS

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

@it-projects-llc

@yelizariev
Copy link
Contributor Author

@pimodoo it's related to POS

@yelizariev
Copy link
Contributor Author

cc @blaggacao

@pimodoo
Copy link
Collaborator

pimodoo commented May 9, 2018

Hello, we were able to reproduce the issue, by connecting the session at exact same time, we then tried to apply you PR, and face an issue, showing undefined value in the POS order number, cf: attached imaged
odoo pos pr login number

@yelizariev
Copy link
Contributor Author

@pimodoo are you sure that you restarted odoo after applying the update?

@pimodoo
Copy link
Collaborator

pimodoo commented May 11, 2018

@yelizariev I'll recheck, I think I didn't update the module so the template didn't have the login value.

@mart-e
Copy link
Contributor

mart-e commented May 11, 2018

I think I already saw this happen when two people used the PoS with the same account on different computers (which is a bad idea, let's be clear !).
We discussed this with @nim-odoo and did not accepted it in stable but I have no issue for master.

@yelizariev
Copy link
Contributor Author

yelizariev commented Jul 11, 2018

@mart-e it's master branch. Do we need someone's approvement?

@yelizariev
Copy link
Contributor Author

Can this be merged?

@robodoo robodoo added seen 🙂 CI 🤖 Robodoo has seen passing statuses labels Feb 20, 2019
@vedler
Copy link

vedler commented May 16, 2019

Status?

@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Sep 12, 2019
@mart-e mart-e changed the base branch from master to saas-12.5 September 12, 2019 11:28
…te it

Otherwise, if two POS stations are using the same user with the same pos.config,
i.e. create two session AND if you have bad luck, then those sessions will get
same login_number, which leads to losing half of orders, because POS stations
will generate same pos_reference and only first order from the POSes is saved,
while another order is lost without let know to cashier.
@mart-e
Copy link
Contributor

mart-e commented Sep 12, 2019

I was going to merge this but I am not sure this is still reproducible in saas-12.5.
@qle-odoo would it be that this problem is no longer an issue because of the tab synchronisation?

@pimodoo
Copy link
Collaborator

pimodoo commented Sep 12, 2019

@mart-e The problem is still there, you can merge it

@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Sep 12, 2019
@mart-e
Copy link
Contributor

mart-e commented Sep 12, 2019

Thanks for the update
@robodoo r+

robodoo pushed a commit that referenced this pull request Sep 12, 2019
…te it

Otherwise, if two POS stations are using the same user with the same pos.config,
i.e. create two session AND if you have bad luck, then those sessions will get
same login_number, which leads to losing half of orders, because POS stations
will generate same pos_reference and only first order from the POSes is saved,
while another order is lost without let know to cashier.

closes #24486

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
@robodoo
Copy link
Contributor

robodoo commented Sep 12, 2019

Merged at c0a897d, thanks!

@robodoo robodoo closed this Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses Point of Sale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants