Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028194Retail ModulesWeb POSpublic2014-11-17 17:162014-12-10 13:26
jonalegriaesarte 
aaroncalero 
normalminorhave not tried
closedfixed 
5
 
RR15Q1RR15Q1 
marvintm
No
0028194: When WEBPOS come back from offline to online the pending orders are sent in batches of 300 orders
When WEBPOS come back from offline to online the pending orders are sent in batches of 300 orders
Let's see an example:

1.- You get offline
2.- You create 1000 orders
3.- You come back online and only 300 orders are sent to the backend
4.- Then each time you save a new order, others 300 orders will be sent until there are no more orders to send.

It seems there is a limit hardcoded that causes this behavior. There should not be a limit in number of orders sent from WebPOS when you get online.
No tags attached.
blocks defect 0028257pi closed aaroncalero If a synchronization request to the backend takes too long the WebPOS goes offline 
Issue History
2014-11-17 17:16jonalegriaesarteNew Issue
2014-11-17 17:16jonalegriaesarteAssigned To => marvintm
2014-11-17 17:16jonalegriaesarteResolution time => 1417561200
2014-11-17 17:16jonalegriaesarteTriggers an Emergency Pack => No
2014-11-17 17:16jonalegriaesarteTarget Version => RR15Q1
2014-11-17 17:16jonalegriaesarteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7065#r7065
2014-11-17 17:21rafademiguelIssue Monitored: rafademiguel
2014-11-18 17:50mtaalNote Added: 0071787
2014-11-18 17:51mtaalNote Edited: 0071787bug_revision_view_page.php?bugnote_id=0071787#r7099
2014-11-18 17:51mtaalAssigned Tomarvintm => aaroncalero
2014-11-24 12:33hgbotCheckin
2014-11-24 12:33hgbotNote Added: 0071931
2014-11-24 12:33hgbotStatusnew => resolved
2014-11-24 12:33hgbotResolutionopen => fixed
2014-11-24 12:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1a1e3288744ee222379338da5992a4fc75d55b96 [^]
2014-12-10 13:26marvintmReview Assigned To => marvintm
2014-12-10 13:26marvintmStatusresolved => closed
2014-12-10 13:26marvintmFixed in Version => RR15Q1
2015-04-24 10:41OrekariaRelationship addedblocks 0028257

Notes
(0071787)
mtaal   
2014-11-18 17:50   
(edited on: 2014-11-18 17:51)
I guess the limit is there not to overload the backend. So the behavior can be to send batches of orders to the backend.

Maybe even smaller batches (100 orders seems to be fine).

But the logic should send all the batches of orders in one sync step when the user enters a order, so not one batch per order.

(0071931)
hgbot   
2014-11-24 12:33   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 1a1e3288744ee222379338da5992a4fc75d55b96
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Mon Nov 24 10:18:08 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1a1e3288744ee222379338da5992a4fc75d55b96 [^]

Fixed issue 28194: When WEBPOS come back from offline to online the pending orders are sent in batches of 300 orders

Added a limit = -1 clause to the sql that recovers the data to be sync'ed. This will override each model's dataLimit.
For each model, split the collection of records in batches of 100 to be sent to the backend.
Added a flag to mark if the model has been fully sync'ed.
Finally, changed the callbacks to call syncModel on the same model if the model hasn't been fully sync'ed

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---