Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033440Retail ModulesWeb POSpublic2016-07-06 12:162016-07-12 13:44
aaroncalero 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
 
marvintm
No
0033440: OB.Dal.removeRemoteModels fails if there is a remote model defined without a tableName
Iis is possible to define OB.Data.ExtensibleModels (such as Products, BPs,...) without tableName, which can be used to store temporary results (e.g. query results, function results). These models can be defined as remote models.

The OB.Dal.removeRemoteModels is executed on the logout, removing remote model's tables from the local database.

If a model without a table defined is configured as a remote model, the OB.Dal.removeRemoteModels call fails (only in development/debug mode) and the logout is never executed.
Define the following dummy model:
  OB.Model.ATest = OB.Data.ExtensibleModel.extend({
    remote: 'OBPOS_remote.customer'
  });
Having the instance in development mode, login in web pos, and then logout.
Verify the following exception appears in the browser console:
Uncaught OB.Dal.removeAll: tableName not found
And the application stays 'Logging out' forever.
Add a validation to the OB.Dal.removeRemoteModels to verify that the model has a tableName defined before calling to removeAll (OB.Dal.getTableName can be used for this).
No tags attached.
Issue History
2016-07-06 12:16aaroncaleroNew Issue
2016-07-06 12:16aaroncaleroAssigned To => Retail
2016-07-06 12:16aaroncaleroResolution time => 1468965600
2016-07-06 12:16aaroncaleroTriggers an Emergency Pack => No
2016-07-06 12:30marvintmStatusnew => acknowledged
2016-07-07 11:14ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2016-07-07 11:14ranjith_qualiantech_comStatusacknowledged => scheduled
2016-07-12 10:56hgbotCheckin
2016-07-12 10:56hgbotNote Added: 0088379
2016-07-12 10:56hgbotCheckin
2016-07-12 10:56hgbotNote Added: 0088380
2016-07-12 10:56hgbotStatusscheduled => resolved
2016-07-12 10:56hgbotResolutionopen => fixed
2016-07-12 10:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4edcaf0e555acabaa6e0b1ea889402d40bb1a028 [^]
2016-07-12 13:44marvintmReview Assigned To => marvintm
2016-07-12 13:44marvintmStatusresolved => closed

Notes
(0088379)
hgbot   
2016-07-12 10:56   
Repository: tools/automation/pi-mobile
Changeset: 8a382fb0ad91f177ff6e05657622ced3727340b8
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jul 12 14:26:16 2016 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/8a382fb0ad91f177ff6e05657622ced3727340b8 [^]

Verifies issue 33440 : Added automated test 'I33440_VerifyRemoteModelOnRemove'

---
A src-test/org/openbravo/test/mobile/quarantine/pack/RAN/loginout/I33440_VerifyRemoteModelOnRemove.java
---
(0088380)
hgbot   
2016-07-12 10:56   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4edcaf0e555acabaa6e0b1ea889402d40bb1a028
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jul 12 14:25:28 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4edcaf0e555acabaa6e0b1ea889402d40bb1a028 [^]

Fixes issue 33440 : Added validation to check the model has tablename or not

---
M web/org.openbravo.mobile.core/source/data/ob-dal.js
---