-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
10.0 pos ms issues 3 #1035
Merged
ilmir-k
merged 4 commits into
itpp-labs:10.0
from
KolushovAlexandr:10.0-pos_ms_issues-3
Jun 27, 2019
Merged
10.0 pos ms issues 3 #1035
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8791f5b
:ambulance: plenty same pos_ID poses caused cross multi-session messa…
KolushovAlexandr 0742550
:ambulance: order loss for multiple multisessions working at the same…
KolushovAlexandr 1e93e84
:ambulance: error on starting a multisession without floors
KolushovAlexandr f7f584b
:book: pos ms restaurant readme
KolushovAlexandr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
🚑 order loss for multiple multisessions working at the same time
- Loading branch information
commit 07425500a391b4a58418439556a1690e8b578228
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,8 @@ def prepare_new_session(self, message): | |
self.write({ | ||
'run_ID': run_ID, | ||
}) | ||
old_orders = self.env['pos_multi_session_sync.order'].search([('state', '=', 'draft'), | ||
old_orders = self.env['pos_multi_session_sync.order'].search([('multi_session_ID', '=', self.multi_session_ID), | ||
('state', '=', 'draft'), | ||
('run_ID', '<', run_ID)]) | ||
if old_orders: | ||
old_orders.write({'state': 'unpaid'}) | ||
|
@@ -165,7 +166,7 @@ def set_order(self, message): | |
order = order.create({ | ||
'order': json.dumps(message), | ||
'order_uid': order_uid, | ||
'multi_session_ID': self.id, | ||
'multi_session_ID': self.multi_session_ID, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
'run_ID': run_ID, | ||
'nonce': message['data']['nonce'] | ||
}) | ||
|
@@ -211,8 +212,8 @@ def get_sync_all(self, message): | |
orders.append(msg) | ||
else: | ||
for order in self.env['pos_multi_session_sync.order'] \ | ||
.search([('multi_session_ID', '=', self.id), ('state', '=', 'draft'), | ||
('run_ID', '=', run_ID)]): | ||
.search([('multi_session_ID', '=', self.multi_session_ID), ('state', '=', 'draft'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
('run_ID', '=', run_ID)]): | ||
msg = json.loads(order.order) | ||
msg['data']['message_ID'] = pos.multi_session_message_ID | ||
msg['data']['revision_ID'] = order.revision_ID | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍