Openbravo Issue Tracking System - Retail Modules
View Issue Details
0027339Retail ModulesWeb POSpublic2014-08-14 18:032014-09-30 19:22
Orekaria 
Orekaria 
normalmajoralways
closedfixed 
5
 
RR14Q4RR14Q4 
marvintm
No
0027339: Stabilization: When the server is not available and there is not enough cache data, the app should wait until available
Stabilization: When the server is not available and there is not enough cache data, the app should wait until available
insert this snippet in the ob-terminal-model.js, initializeCommonComponents function

    var r = Math.floor((Math.random() * 5) + 1);
    if (r === 1) {
      ajaxRequest.go(ajaxRequest.data).response('success').error('fail');
      return;
    }
    ajaxRequest.go(ajaxRequest.data).response('fail').error('fail');

verify that the attached screenshot is shown
No tags attached.
related to feature request 0027329 new Retail Stabilization: Overhaul the loading process (since the url is entered until the webpos has loaded) 
blocks design defect 0027228 new marvintm Stabilization: Web POS should validate that models have been imported properly to Web POS 
png notEnoughCacheData.png (179,596) 2014-08-14 18:03
https://issues.openbravo.com/file_download.php?file_id=7136&type=bug
png
Issue History
2014-08-14 18:03OrekariaNew Issue
2014-08-14 18:03OrekariaAssigned To => Orekaria
2014-08-14 18:03OrekariaFile Added: notEnoughCacheData.png
2014-08-14 18:03OrekariaTriggers an Emergency Pack => No
2014-08-14 18:05OrekariaSummaryWhen the server is not available and there is not enough cache data, the user should be informed and the application stopped => Stabilization: When the server is not available and there is not enough cache data, the app should wait until available
2014-08-14 18:05OrekariaDescription Updatedbug_revision_view_page.php?rev_id=6280#r6280
2014-08-14 18:06OrekariaRelationship addedrelated to 0027329
2014-08-14 18:07OrekariaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6282#r6282
2014-08-14 18:15hgbotCheckin
2014-08-14 18:15hgbotNote Added: 0069376
2014-08-14 18:15hgbotStatusnew => resolved
2014-08-14 18:15hgbotResolutionopen => fixed
2014-08-14 18:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/400283ce95112df5cafebee0002603b1fe175c26 [^]
2014-08-15 09:41OrekariaNote Added: 0069385
2014-08-16 15:28OrekariaRelationship addedblocks 0027228
2014-08-17 14:02OrekariaStatusresolved => new
2014-08-17 14:02OrekariaResolutionfixed => open
2014-08-17 14:03OrekariaNote Edited: 0069385bug_revision_view_page.php?bugnote_id=0069385#r6317
2014-08-17 14:40hgbotCheckin
2014-08-17 14:40hgbotNote Added: 0069420
2014-08-17 14:40hgbotStatusnew => resolved
2014-08-17 14:40hgbotResolutionopen => fixed
2014-08-17 14:40hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/400283ce95112df5cafebee0002603b1fe175c26 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4d904c6583771b1eb9de5f1bd731d33c37caf1b4 [^]
2014-08-25 11:15mtaalNote Added: 0069702
2014-08-25 11:15mtaalStatusresolved => new
2014-08-25 11:15mtaalResolutionfixed => open
2014-08-25 12:28hgbotCheckin
2014-08-25 12:28hgbotNote Added: 0069706
2014-08-25 12:28hgbotStatusnew => resolved
2014-08-25 12:28hgbotResolutionopen => fixed
2014-08-25 12:28hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4d904c6583771b1eb9de5f1bd731d33c37caf1b4 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/61bca557e09453499e0200eb23c7ee9b5dbd16d8 [^]
2014-09-01 11:24mtaalNote Added: 0069886
2014-09-01 11:24mtaalStatusresolved => new
2014-09-01 11:24mtaalResolutionfixed => open
2014-09-07 20:22OrekariaStatusnew => scheduled
2014-09-07 20:22Orekariafix_in_branch => pi
2014-09-07 20:22OrekariaStatusscheduled => resolved
2014-09-07 20:22OrekariaFixed in Version => RR14Q4
2014-09-07 20:22OrekariaResolutionopen => fixed
2014-09-30 19:22marvintmReview Assigned To => marvintm
2014-09-30 19:22marvintmStatusresolved => closed

Notes
(0069376)
hgbot   
2014-08-14 18:15   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 400283ce95112df5cafebee0002603b1fe175c26
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Thu Aug 14 18:15:17 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/400283ce95112df5cafebee0002603b1fe175c26 [^]

Fixes issue 27339: A message is shown to the user when not enough cache data is available to work offline...
The message is not internationalized because the labels are missing if this code is reached

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0069385)
Orekaria   
2014-08-15 09:41   
(edited on: 2014-08-17 14:03)
Note:

in the changeset, the line

  me.trigger('initializedCommonComponents');

is still called before, because the modal popup is created on that initilizations

(0069420)
hgbot   
2014-08-17 14:40   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4d904c6583771b1eb9de5f1bd731d33c37caf1b4
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Sun Aug 17 14:07:55 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4d904c6583771b1eb9de5f1bd731d33c37caf1b4 [^]

Fixes issue 27339: the OB.Format check was inverted

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0069702)
mtaal   
2014-08-25 11:15   
Reopen because small change on check with null is needed:
if (!OB.I18N.labels || !OB.Format) {
(0069706)
hgbot   
2014-08-25 12:28   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 61bca557e09453499e0200eb23c7ee9b5dbd16d8
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Mon Aug 25 12:27:28 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/61bca557e09453499e0200eb23c7ee9b5dbd16d8 [^]

Fixes issue 27339: When the cache has not enough data, show a message. Wider check. Added comments.

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0069886)
mtaal   
2014-09-01 11:24   
Hi,
In the first change set I see this:
 if (!OB.I18N.labels || !OB.Format) {

but in the other changesets I see this:
if (OB.I18N.labels === null || OB.Format === null) {
if (OB.I18N.labels === null || OB.Format) {

I think the approach in the first changeset is fine, the approach in the other 2 is not.

Can you make this change?

gr. Martin