[FIX] point_of_sale : get the order_number from the same sequence as SO #162119
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Steps to reproduce:
1- Install POS and POS restaurant
2- Activate self ordering
3- Create a self order from the mobile menu
4- Create another order from the Shop POS
Current behavior before PR:
There is a conflict happening in order numbers between Self order and other orders where at some point we might have two orders with the same number. This is happening because when adding the order from Shop we get the sequence number from the JS side in Order class
odoo/addons/point_of_sale/static/src/app/store/models.js
Line 1383 in d82ffde
odoo/addons/pos_self_order/controllers/orders.py
Line 19 in d82ffde
Desired behavior after PR is merged:
We are now getting the sequence number from ir_sequence in both scenarios by fetching the ir_sequence module data when setup the Order JS class.
opw-3809595
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr