Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033412Openbravo ERPA. Platformpublic2016-07-01 14:312016-08-23 15:57
JONHM 
caristu 
highminorhave not tried
closedfixed 
5
 
3.0PR16Q4 
AugustoMauch
Core
No
0033412: error in tree sub tab when creating record in its header
The console shows an error by having some window with a tab defined in tree grid view. In some cases this error causes wrong data visualization in form view.
1) Open window "account tree"
2) Select some record
3) Then select an element value and put it in tree grid view (press button toogle tree grid visibility)
4) Create a new record into header tab

The chrome console shows an error:
ISC_Combined.js:1410 Uncaught TypeError: Cannot read property 'id' of undefined

Into file:
https://code.openbravo.com/erp/devel/pi/file/cfff3c184b53/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-view-grid.js#l210 [^]

- getParentTabRecordId: function () {
- if (!this.view.parentView) {
- return null;
- }
- return this.view.parentView.viewGrid.getSelectedRecord().id;
- },


+ getParentTabRecordId: function () {
+ if (!this.view.parentView) {
+ return null;
+ }
+ if (this.view.parentView.viewGrid.getSelectedRecord())
+ return this.view.parentView.viewGrid.getSelectedRecord().id;
+ else
+ return null;
+ },
No tags attached.
related to defect 00318563.0PR16Q2 closed caristu It is not supported to have more than one "Tree and node image" record defined for same client 
Issue History
2016-07-01 14:31JONHMNew Issue
2016-07-01 14:31JONHMAssigned To => platform
2016-07-01 14:31JONHMModules => Core
2016-07-01 14:31JONHMTriggers an Emergency Pack => No
2016-07-14 12:13alostaleSummaryError caused by having some window with a tab defined in tree grid view => error in tree sub tab when creating record in its header
2016-07-14 12:13alostaleAssigned Toplatform => alostale
2016-07-14 12:13alostaleReview Assigned To => caristu
2016-07-14 12:17hgbotCheckin
2016-07-14 12:17hgbotNote Added: 0088476
2016-07-14 12:17hgbotStatusnew => resolved
2016-07-14 12:17hgbotResolutionopen => fixed
2016-07-14 12:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/05fe133ffcf71819bec9dc63844d8b512a6b1425 [^]
2016-07-20 16:32caristuNote Added: 0088605
2016-07-20 16:32caristuStatusresolved => new
2016-07-20 16:32caristuResolutionfixed => open
2016-07-20 16:32caristuNote Edited: 0088605bug_revision_view_page.php?bugnote_id=0088605#r12712
2016-08-11 18:40hudsonbotCheckin
2016-08-11 18:40hudsonbotNote Added: 0089012
2016-08-22 11:46caristuAssigned Toalostale => caristu
2016-08-22 14:00caristuStatusnew => scheduled
2016-08-22 14:01hgbotCheckin
2016-08-22 14:01hgbotNote Added: 0089279
2016-08-22 14:02caristuStatusscheduled => resolved
2016-08-22 14:02caristuResolutionopen => fixed
2016-08-22 14:03caristuFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/05fe133ffcf71819bec9dc63844d8b512a6b1425 [^] => http://code.openbravo.com/erp/devel/pi/rev/1fd172f8c1c8cf31c8164bc5c65e7a6939922b8b [^]
2016-08-22 14:03caristuReview Assigned Tocaristu => AugustoMauch
2016-08-22 14:03caristuIssue Monitored: AugustoMauch
2016-08-22 14:05caristuRelationship addedrelated to 0031856
2016-08-23 14:26hudsonbotCheckin
2016-08-23 14:26hudsonbotNote Added: 0089299
2016-08-23 15:57AugustoMauchNote Added: 0089310
2016-08-23 15:57AugustoMauchStatusresolved => closed
2016-08-23 15:57AugustoMauchFixed in Version => 3.0PR16Q4

Notes
(0088476)
hgbot   
2016-07-14 12:17   
Repository: erp/devel/pi
Changeset: 05fe133ffcf71819bec9dc63844d8b512a6b1425
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jul 14 12:15:48 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/05fe133ffcf71819bec9dc63844d8b512a6b1425 [^]

fixed bug 33412: error in tree sub tab when creating record in its header

  A JS error was thrown beacause tree subtab incorrectly assumed there was a
  record selected in its parent tab.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-view-grid.js
---
(0088605)
caristu   
2016-07-20 16:32   
Following steps to reproduce, the following error is raised in the backend:

org.openbravo.service.datasource.TreeDatasourceService - Error on tree datasource
java.lang.NullPointerException
    at org.openbravo.service.datasource.AccountTreeDatasourceService.getDatasourceSpecificParams(AccountTreeDatasourceService.java:54)

The problem is that the accountTreeId arrives with value "null" (String) at the datasource.

Proposed solution:

In AccountTreeDatasourceService add the following to the existing check:

  if (accountTreeId == null || "null".equals(accountTreeId)) {
      return datasourceParams;
  }

(0089012)
hudsonbot   
2016-08-11 18:40   
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/edaa05b1fb18 [^]
Maturity status: Test
(0089279)
hgbot   
2016-08-22 14:01   
Repository: erp/devel/pi
Changeset: 1fd172f8c1c8cf31c8164bc5c65e7a6939922b8b
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Aug 22 14:00:14 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1fd172f8c1c8cf31c8164bc5c65e7a6939922b8b [^]

related to issue 33412: prevent NPE

When refreshing a subtab in tree view, having a new record selected in the header, a NullPointerException was being thrown in the tree datasource because it was not possible to retrieve the tree information as no account id is provided in that case

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ADTreeDatasourceService.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/AccountTreeDatasourceService.java
---
(0089299)
hudsonbot   
2016-08-23 14:26   
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/49d28e45a11a [^]
Maturity status: Test
(0089310)
AugustoMauch   
2016-08-23 15:57   
Code reviewed and verified in pi@9bebb4948779