# HG changeset patch
# User Rafa Alonso <rafael.alonso@openbravo.com>
# Date 1426747503 -3600
#      Thu Mar 19 07:45:03 2015 +0100
# Node ID 0d46bce541e5b5ba98f7d45bf12a68779f91b8eb
# Parent  85f400462a048f3d6e430b3cc2874dac1f0a7a58
Fixes issue 29343: When loading from cache fails, the application will invalidate the cache

The problem was that the application checks if the local storage variable 'cacheAvailableForUser' had any value

Completely removing the value from the local storage, solves the problem

diff -r 85f400462a04 -r 0d46bce541e5 web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
--- a/web/org.openbravo.mobile.core/source/model/ob-terminal-model.js	Mon Mar 09 15:49:28 2015 +0530
+++ b/web/org.openbravo.mobile.core/source/model/ob-terminal-model.js	Thu Mar 19 07:45:03 2015 +0100
@@ -234,7 +234,7 @@ OB.Model.Terminal = Backbone.Model.exten
       } else {
         // not enough data in cache
         OB.MobileApp.model.loadingErrorsActions('processPropertyLoaders: not enough data in cache');
-        window.localStorage.setItem('cacheAvailableForUser:' + this.user, false);
+        window.localStorage.removeItem('cacheAvailableForUser:' + OB.MobileApp.model.user);
         // OB.MobileApp.model.logout();
         // window.location.reload();
       }
