Openbravo Issue Tracking System - Retail Modules
View Issue Details
0027362Retail ModulesWeb POSpublic2014-08-18 18:432014-09-17 01:50
Orekaria 
Orekaria 
normalmajorN/A
closedfixed 
5
 
RR14Q4RR14Q4 
marvintm
No
0027362: Stabilization, performance, developer tools: it would be nice to add checks, etc while not in production
Stabilization, performance, developer tools: it would be nice to add checks, etc while not in production.
There are some checks in the core/WebPOS that are intented to raise errors only while development

e.g: Verify that in the ob-terminal-model.js file this lines are intended to help only while developing:

  renderTerminalMain: function () {
    if (this.renderMain) {
      this.loadTerminalInfo();
    } else {
      OB.error('There is no renderMain method in Terminal Model');
    }
  },
A new class has been added: OB.UTIL.Debug

To use it, call the OB.UTIL.Debug.execute with the callback that must be called and with the optional 'this' parameter

The code will only be executed is a module is in development or the application is running in an openbravo test job


An example of use has been added to ob-terminal-model.js; renderTerminalMain method


Documentation from the ob-debug.js file

/**
 * This class activates when StaticResourceComponentJava add the 'isDebug' variable to the javascript generated file
 *
 * If a module is in development or the application is running the tests, add the 'isDebug' variable will be set to true
 *
 * This option is intended to run additional code (checks, etc) that will not be run while in production
 *
 * This improves performance at the same time that the developer have a tool to improve stability.
 */
No tags attached.
related to defect 0027187RR14Q4 closed Orekaria The flow to manage data from other sources than the server or the local database, should not raise an exception 
blocks feature request 0027329 new Retail Stabilization: Overhaul the loading process (since the url is entered until the webpos has loaded) 
blocks defect 0027365RR14Q4 closed Orekaria Stabilization: The ob-i18n.js file contains unuseful code 
blocks feature request 0027400RR14Q4 closed Orekaria Stabilization: Overhaul Version management 
blocks feature request 0027430 new Retail Stabilization: Add debug logic to test the different online and caching states 
Issue History
2014-08-18 18:43OrekariaNew Issue
2014-08-18 18:43OrekariaAssigned To => marvintm
2014-08-18 18:43OrekariaTriggers an Emergency Pack => No
2014-08-18 18:43OrekariaRelationship addedblocks 0027329
2014-08-18 18:50hgbotCheckin
2014-08-18 18:50hgbotNote Added: 0069468
2014-08-18 18:50hgbotStatusnew => resolved
2014-08-18 18:50hgbotResolutionopen => fixed
2014-08-18 18:50hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8b3dea147b15605b4a4e9d2cf4faa8f781686414 [^]
2014-08-18 18:53OrekariaStatusresolved => new
2014-08-18 18:53OrekariaResolutionfixed => open
2014-08-18 18:55OrekariaDescription Updatedbug_revision_view_page.php?rev_id=6334#r6334
2014-08-18 18:55OrekariaProposed Solution updated
2014-08-18 18:57OrekariaProposed Solution updated
2014-08-18 19:07hgbotCheckin
2014-08-18 19:07hgbotNote Added: 0069469
2014-08-18 19:07hgbotStatusnew => resolved
2014-08-18 19:07hgbotResolutionopen => fixed
2014-08-18 19:07hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/8b3dea147b15605b4a4e9d2cf4faa8f781686414 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8f6c95fce41e85ae8b912a4a40d7961a156ecfbf [^]
2014-08-18 20:15hgbotCheckin
2014-08-18 20:15hgbotNote Added: 0069470
2014-08-18 20:25OrekariaStatusresolved => new
2014-08-18 20:25OrekariaResolutionfixed => open
2014-08-18 20:25OrekariaAssigned Tomarvintm => Orekaria
2014-08-18 20:26OrekariaNote Deleted: 0069469
2014-08-18 20:26OrekariaNote Deleted: 0069470
2014-08-18 20:26hgbotCheckin
2014-08-18 20:26hgbotNote Added: 0069471
2014-08-18 20:26hgbotStatusnew => resolved
2014-08-18 20:26hgbotResolutionopen => fixed
2014-08-18 20:26hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8f6c95fce41e85ae8b912a4a40d7961a156ecfbf [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a8c5e5baca930cce04a7d7c388fc58dfca4dad26 [^]
2014-08-18 20:33hgbotCheckin
2014-08-18 20:33hgbotNote Added: 0069472
2014-08-18 21:25OrekariaRelationship addedblocks 0027365
2014-08-19 19:44hudsonbotCheckin
2014-08-19 19:44hudsonbotNote Added: 0069523
2014-08-21 12:38OrekariaStatusresolved => new
2014-08-21 12:38OrekariaResolutionfixed => open
2014-08-21 12:39OrekariaStatusnew => scheduled
2014-08-21 12:39Orekariafix_in_branch => pi
2014-08-21 12:46hgbotCheckin
2014-08-21 12:46hgbotNote Added: 0069570
2014-08-21 12:46hgbotCheckin
2014-08-21 12:46hgbotNote Added: 0069571
2014-08-21 21:06OrekariaRelationship addedblocks 0027400
2014-08-21 21:33hgbotCheckin
2014-08-21 21:33hgbotNote Added: 0069581
2014-08-24 18:27OrekariaRelationship addedrelated to 0027187
2014-08-24 18:31hgbotCheckin
2014-08-24 18:31hgbotNote Added: 0069681
2014-08-25 13:11OrekariaStatusscheduled => acknowledged
2014-08-25 13:13OrekariaStatusacknowledged => scheduled
2014-08-25 13:15OrekariaStatusscheduled => acknowledged
2014-08-26 11:51hgbotCheckin
2014-08-26 11:51hgbotNote Added: 0069748
2014-09-02 20:18hgbotCheckin
2014-09-02 20:18hgbotNote Added: 0069922
2014-09-02 22:15OrekariaStatusacknowledged => scheduled
2014-09-02 22:15OrekariaStatusscheduled => resolved
2014-09-02 22:15OrekariaFixed in Version => RR14Q4
2014-09-02 22:15OrekariaResolutionopen => fixed
2014-09-03 04:16hudsonbotCheckin
2014-09-03 04:16hudsonbotNote Added: 0069926
2014-09-14 14:27OrekariaRelationship addedblocks 0027430
2014-09-15 15:14marvintmReview Assigned To => marvintm
2014-09-15 15:14marvintmStatusresolved => closed
2014-09-16 12:23hgbotCheckin
2014-09-16 12:23hgbotNote Added: 0070138
2014-09-17 01:50hudsonbotCheckin
2014-09-17 01:50hudsonbotNote Added: 0070161

Notes
(0069468)
hgbot   
2014-08-18 18:50   
Repository: erp/devel/pi
Changeset: 8b3dea147b15605b4a4e9d2cf4faa8f781686414
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Mon Aug 18 18:49:47 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8b3dea147b15605b4a4e9d2cf4faa8f781686414 [^]

Fixes issue 27362: The new variable 'isDebug' will be inserted at the beginning of the generated javascript file
- this variable will be inserted and set to true, if any module is in development or the application is running a test job

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceComponent.java
---
(0069471)
hgbot   
2014-08-18 20:26   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: a8c5e5baca930cce04a7d7c388fc58dfca4dad26
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Mon Aug 18 20:26:37 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a8c5e5baca930cce04a7d7c388fc58dfca4dad26 [^]

Fixes issue 27362: the class OB.UTIL.Debug has been added
This class is intended to help while developing apps and to improve performance
- to call this class, use OB.UTIL.Debug.execute with the callback to be executed
- the optional parameter 'this' will pass the calling object
- an example of use is provided in the change to ob-terminal-model.js

---
M src/org/openbravo/mobile/core/MobileCoreComponentProvider.java
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
A web/org.openbravo.mobile.core/source/utils/ob-debug.js
---
(0069472)
hgbot   
2014-08-18 20:33   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 18434e8a50f84ea770e5e9033f6a189df0248905
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Mon Aug 18 20:33:11 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/18434e8a50f84ea770e5e9033f6a189df0248905 [^]

Related to issue 27362: ob-debug.js console.log set to console.error so it will be shown in the browser.log of the test jobs

---
M web/org.openbravo.mobile.core/source/utils/ob-debug.js
---
(0069523)
hudsonbot   
2014-08-19 19:44   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/dfa98e390e6a [^]
Maturity status: Test
(0069570)
hgbot   
2014-08-21 12:46   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 803fe71cddd5f82033fa55818d26c5353d6a3481
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Thu Aug 21 12:38:51 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/803fe71cddd5f82033fa55818d26c5353d6a3481 [^]

Related to issue 27362: doble quotes changed to single quotes

---
M web/org.openbravo.mobile.core/source/utils/ob-debug.js
---
(0069571)
hgbot   
2014-08-21 12:46   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 021b701c72bec872edbd915a9b6b215ef3ec24ff
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Thu Aug 21 12:46:42 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/021b701c72bec872edbd915a9b6b215ef3ec24ff [^]

Related to issue 27362: added global OB.UTIL.Debug.isDebug check availability

---
M web/org.openbravo.mobile.core/source/utils/ob-debug.js
---
(0069581)
hgbot   
2014-08-21 21:33   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: edfdffbd8d7353f0b6988dd2979b32c662ea958a
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Thu Aug 21 21:05:53 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/edfdffbd8d7353f0b6988dd2979b32c662ea958a [^]

Related to issue 27362: added a isDefined check

---
M web/org.openbravo.mobile.core/source/utils/ob-debug.js
---
(0069681)
hgbot   
2014-08-24 18:31   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: daa3a046381df3d9850994cca58b775344de86f8
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Sun Aug 24 18:31:19 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/daa3a046381df3d9850994cca58b775344de86f8 [^]

Related to issue 27362: Used OB.UTIL.Debug to shwow an exception when the 'OB.Dal.missingLocalStorageLogic' is called

---
M web/org.openbravo.mobile.core/source/data/ob-dal.js
---
(0069748)
hgbot   
2014-08-26 11:51   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: fa794b1b98554b3a280d88820f2bc225e75ee3b2
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Tue Aug 26 11:51:16 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fa794b1b98554b3a280d88820f2bc225e75ee3b2 [^]

Issue 27362: Added a global error handler while debugging and an offline mode variable

---
M web/org.openbravo.mobile.core/source/utils/ob-debug.js
---
(0069922)
hgbot   
2014-09-02 20:18   
Repository: erp/devel/pi
Changeset: f9f85e0ce62c98cef49cb5e1379cf3133828fc66
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Tue Sep 02 20:17:41 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f9f85e0ce62c98cef49cb5e1379cf3133828fc66 [^]

Related to issue 27362: If in development or the Openbravo.property's 'test.environment' property is true...
- the debug flag is set to true
- the generated javascript will not be compressed (to help debugging in test environments)

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceComponent.java
---
(0069926)
hudsonbot   
2014-09-03 04:16   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/e15f9ad57ecb [^]
Maturity status: Test
(0070138)
hgbot   
2014-09-16 12:23   
Repository: erp/devel/pi
Changeset: 097d466bd729440ee1b062f6250a35605fa5a109
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Tue Sep 16 12:22:29 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/097d466bd729440ee1b062f6250a35605fa5a109 [^]

Related to issue 27362: Removed dead code

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceComponent.java
---
(0070161)
hudsonbot   
2014-09-17 01:50   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/8faa150d42bc [^]
Maturity status: Test