Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035688Openbravo ERPA. Platformpublic2017-04-04 16:132017-07-19 13:19
inigosanchez 
inigosanchez 
normalminorhave not tried
closedfixed 
5
 
3.0PR17Q1.13.0PR17Q1.1 
caristu
Core
Production - QA Approved
2016-09-14
3.0PR17Q1
https://code.openbravo.com/erp/devel/pi/rev/b23043be4cf63ad3ce1fd35047ece43b4530c3bd [^]
No
0035688: It is not possible to delete a record in tree view
It is not possible to delete a record in tree view. An error is thrown in console:
ISC_Combined.js:1410 Uncaught RangeError: Maximum call stack size exceeded
    at _2.isc_c_Comm__cloneObject [as $362] (ISC_Combined.js:3003)
    at _2.isc_c_Comm__clone [as $360] (ISC_Combined.js:3002)
    at _2.isc_c_Comm__cloneObject [as $362] (ISC_Combined.js:3003)
    at _2.isc_c_Comm__clone [as $360] (ISC_Combined.js:3002)
    at _2.isc_c_Comm__cloneArray [as $361] (ISC_Combined.js:3002)
    at _2.isc_c_Comm__clone [as $360] (ISC_Combined.js:3001)
    at _2.isc_c_Comm__cloneObject [as $362] (ISC_Combined.js:3003)
    at _2.isc_c_Comm__clone [as $360] (ISC_Combined.js:3002)
    at _2.isc_c_Comm__cloneObject [as $362] (ISC_Combined.js:3003)
    at _2.isc_c_Comm__clone [as $360] (ISC_Combined.js:3002)
- Log in as F&B International Group Admin
- Go to [Account Tree] window.
- Select "F&B International Group" record and go to [Element Value] subtab.
- Open tree view by clicking in "Toggle Tree Grid Visibility" button.
- Open PL | Profit & Loss node and select leaf node: Total Other Income (Expense). Delete it.

Note than leaf node is not removed properly. An error is thrown in console.
No tags attached.
blocks defect 0035686 closed inigosanchez It is not possible to delete a record in tree view 
Issue History
2017-04-04 16:15inigosanchezTypedefect => backport
2017-04-04 16:15inigosanchezTarget Version => 3.0PR17Q1.1
2017-04-07 11:44inigosanchezReview Assigned To => caristu
2017-04-07 12:02hgbotCheckin
2017-04-07 12:02hgbotNote Added: 0095904
2017-04-07 12:02hgbotStatusscheduled => resolved
2017-04-07 12:02hgbotResolutionopen => fixed
2017-04-07 12:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q1.1/rev/f5b269a1418aadd1d15f3fd52fba5fc4583462af [^]
2017-04-10 13:07caristuNote Added: 0095932
2017-04-10 13:07caristuStatusresolved => closed
2017-04-10 13:07caristuFixed in Version => 3.0PR17Q1.1
2017-07-19 13:19alostaleAssigned Toplatform => inigosanchez
2018-12-17 12:23adrianromeroRelationship addedrelated to 0039815
2018-12-17 12:33adrianromeroRelationship deletedrelated to 0039815

Notes
(0095904)
hgbot   
2017-04-07 12:02   
Repository: erp/backports/3.0PR17Q1.1
Changeset: f5b269a1418aadd1d15f3fd52fba5fc4583462af
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Apr 07 12:01:36 2017 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR17Q1.1/rev/f5b269a1418aadd1d15f3fd52fba5fc4583462af [^]

Fixed issue 35688: It is not possible to delete a record in tree view

The problem was related with Pre Delete Client Side Event Handler. The problem was
that a isc.clone method didn't work as expected. isc.clone method create a deep
clone of an object that can be edited without affecting the original but does not
handle looping references (will infinite loop). For this reason, in case of clone
currentGrid.getSelection() object in tree view an error was thrown.

In order to fix this problem, isc.shallowClone is used instead of isc.clone. This
method handle looping references properly.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0095932)
caristu   
2017-04-10 13:07   
Code review + testing OK.