Openbravo Issue Tracking System - Retail Modules
View Issue Details
0023588Retail ModulesWeb POSpublic2013-04-19 11:322013-06-06 12:03
adrianromero 
marvintm 
urgentmajorrandom
closedfixed 
5
 
RMP23RMP23 
marvintm
No
0023588: Orders tried to synchronize before custmers
After a postmortem research in a case when an order after been synchronized cannot be saved and is logged in "Errors while importing POS data", But, from this window after executing the process save, the order is saved without any issue.

The source of the issue is that the record in "Errors while importing POS data" for the document "BR8005/0001785" has a creation date: 04-19-2013 08:44:24 but the business partner of this order "ryan flores" has a creation date: 04-19-2013 08:44:25. One second before that means that the order of synchronization is incorrect.

Also attach the error logged in openbravo_hibernate.log that shows that the error why the order is not saved is because the partner does not exist.
In web pos, in offline mode, create a business partner, and create an order associated with that business partner.

Restore the connectivity with the server, and verify that the orders has been synchronized but cannot be saved and the customer has been saved properly.

Verify that the error logged is because the partner does not exist and that saving again the order does not raise any error.
No tags attached.
related to defect 0022458 closed marvintm Order synchronization fails in case the session is recovered and a customer was created while being offline 
log openbravo_hibernate.part.log (4,181) 2013-04-19 11:32
https://issues.openbravo.com/file_download.php?file_id=6106&type=bug
Issue History
2013-04-19 11:32adrianromeroNew Issue
2013-04-19 11:32adrianromeroAssigned To => guilleaer
2013-04-19 11:32adrianromeroFile Added: openbravo_hibernate.part.log
2013-04-19 11:33adrianromeroRelationship addedrelated to 0022458
2013-04-19 11:41adrianromeroResolution time => 1337378400
2013-04-19 11:41adrianromeroTarget Version => RMP22
2013-04-19 11:44adrianromeroAssigned Toguilleaer => marvintm
2013-04-22 13:23dmitry_mezentsevPrioritynormal => immediate
2013-04-22 13:23dmitry_mezentsevNote Added: 0058086
2013-04-22 17:06marvintmNote Added: 0058116
2013-04-22 17:06marvintmPriorityimmediate => urgent
2013-04-26 12:49guilleaerTarget VersionRMP22 => RMP23
2013-05-21 17:33hgbotCheckin
2013-05-21 17:33hgbotNote Added: 0058735
2013-05-21 17:33hgbotStatusnew => resolved
2013-05-21 17:33hgbotResolutionopen => fixed
2013-05-21 17:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5db688afcda4c98629a693232b8cddce7f22427c [^]
2013-05-23 07:52hgbotCheckin
2013-05-23 07:52hgbotNote Added: 0058871
2013-05-23 07:52hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5db688afcda4c98629a693232b8cddce7f22427c [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.ch/rev/5db688afcda4c98629a693232b8cddce7f22427c [^]
2013-05-28 19:06marvintmStatusresolved => closed
2013-05-29 12:19hgbotCheckin
2013-05-29 12:19hgbotNote Added: 0059033
2013-05-29 12:19hgbotStatusclosed => resolved
2013-05-29 12:19hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.ch/rev/5db688afcda4c98629a693232b8cddce7f22427c [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.multiorder/rev/5db688afcda4c98629a693232b8cddce7f22427c [^]
2013-06-06 12:03guilleaerReview Assigned To => marvintm
2013-06-06 12:03guilleaerNote Added: 0059244
2013-06-06 12:03guilleaerStatusresolved => closed
2013-06-06 12:03guilleaerFixed in Version => RMP23

Notes
(0058086)
dmitry_mezentsev   
2013-04-22 13:23   
Potential regression so setting priority to Immediate.
(0058116)
marvintm   
2013-04-22 17:06   
We have not been able to reproduce the issue. However, we have found a set of steps which might trigger the problem:
- The network goes down
- The user creates a customer. As we are offline, the customer is not synchronized.
- The user creates the order. Just before paying the order, the network comes back.
- The client may take some seconds to detect that we are online, so initially the client still considers itself to be offline.
- The user pays the order, which is sent to the backend (because we are not checking whether we are offline or not, before sending the order).
- Some seconds later, the client finds out that it is online, and synchronizes the customers (but too late, as the order was already sent some seconds ago).


There are several solutions to this problem. The easiest way would be not to send the order if the client still thinks that it's offline. Another (probably better) solution would be not to send the order if the customer is pending to be sent (by querying the database, so doing the check for every order just before sending it).

In any case, it's not a regression, so changing the priority again.
(0058735)
hgbot   
2013-05-21 17:33   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 5db688afcda4c98629a693232b8cddce7f22427c
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Tue May 21 16:44:43 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5db688afcda4c98629a693232b8cddce7f22427c [^]

fixed issue 23588: Always the same flow is used to process orders avoiding to sync customers before orders

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/utils/ordersSyncUtils.js
---
(0058871)
hgbot   
2013-05-23 07:52   
Repository: erp/pmods/org.openbravo.retail.posterminal.ch
Changeset: 5db688afcda4c98629a693232b8cddce7f22427c
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Tue May 21 16:44:43 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.ch/rev/5db688afcda4c98629a693232b8cddce7f22427c [^]

fixed issue 23588: Always the same flow is used to process orders avoiding to sync customers before orders

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/utils/ordersSyncUtils.js
---
(0059033)
hgbot   
2013-05-29 12:19   
Repository: erp/pmods/org.openbravo.retail.posterminal.multiorder
Changeset: 5db688afcda4c98629a693232b8cddce7f22427c
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Tue May 21 16:44:43 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.multiorder/rev/5db688afcda4c98629a693232b8cddce7f22427c [^]

fixed issue 23588: Always the same flow is used to process orders avoiding to sync customers before orders

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/utils/ordersSyncUtils.js
---
(0059244)
guilleaer   
2013-06-06 12:03   
closed again because it has changed "automatically" to resolved