# HG changeset patch
# User Miguel de Juana <miguel.dejuana@openbravo.com>
# Date 1460471203 -7200
#      Tue Apr 12 16:26:43 2016 +0200
# Node ID 9f87d36ab0a9c545669d7dc5dea8c0d59844ded3
# Parent  4c6f84951bcdc107054f2908a1934d160f15394e
Fixed issue 0032652: WebPOS is Loading all ProductPrices even if MultiPricelist is not activated

- Do not update lastUpdatedTimestamp value if there is no data

diff --git a/web/org.openbravo.mobile.core/source/data/ob-datasource.js b/web/org.openbravo.mobile.core/source/data/ob-datasource.js
--- a/web/org.openbravo.mobile.core/source/data/ob-datasource.js
+++ b/web/org.openbravo.mobile.core/source/data/ob-datasource.js
@@ -407,7 +407,7 @@
             handleIncrementalRequest(limit, offset + limit, params, incremental);
           } else {
             OB.UTIL.completeLoadingStep();
-            if (lastUpdated) {
+            if (lastUpdated && data.length > 0) {
               if (window.localStorage.getItem('requestTimestamp' + me.request.model.prototype.modelName) && window.localStorage.getItem('requestTimestamp' + me.request.model.prototype.modelName) !== 'null') {
                 window.localStorage.setItem('lastUpdatedTimestamp' + me.request.model.prototype.modelName, window.localStorage.getItem('requestTimestamp' + me.request.model.prototype.modelName));
               } else {
