Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022030Openbravo ERPA. Platformpublic2012-10-22 14:472012-10-31 13:30
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
3.0MP173.0MP18 
alostale
Core
No
0022030: Adding and then removing summary field gives datasource javascript error
See the attached image and steps to reproduce.
    go to sales order screen
    remove all filters
    click the dropdown on the Document No column
    pick the Add Summary Field option in the dropdown menu
    click the Document No in the Source Field column (Summary input should become sth. like #{D}, Title = New Field )
    click Save
    click the dropdown on the New Field column
    pick the Remove Summary Field option
No tags attached.
png Selection_003.png (160,315) 2012-10-22 14:47
https://issues.openbravo.com/file_download.php?file_id=5668&type=bug
png
Issue History
2012-10-22 14:47mtaalNew Issue
2012-10-22 14:47mtaalAssigned To => mtaal
2012-10-22 14:47mtaalFile Added: Selection_003.png
2012-10-22 14:47mtaalModules => Core
2012-10-25 11:51mtaalReview Assigned To => AugustoMauch
2012-10-25 11:52mtaalNote Added: 0053689
2012-10-25 11:54hgbotCheckin
2012-10-25 11:54hgbotNote Added: 0053690
2012-10-25 11:54hgbotStatusnew => resolved
2012-10-25 11:54hgbotResolutionopen => fixed
2012-10-25 11:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8dd5c8c26c733993d7bdc8405dd2e0afa4ebdd31 [^]
2012-10-30 09:11alostaleReview Assigned ToAugustoMauch => alostale
2012-10-30 09:11alostaleNote Added: 0053782
2012-10-30 09:11alostaleStatusresolved => closed
2012-10-30 09:11alostaleFixed in Version => 3.0MP18
2012-10-31 13:30hudsonbotCheckin
2012-10-31 13:30hudsonbotNote Added: 0053924

Notes
(0053689)
mtaal   
2012-10-25 11:52   
Issue was caused by the fact that the datasource of the viewgrid was used by the formula/summary editor also. When closing the formula/summary editor it gets destroyed. In ob-smartclient.js we have code that destroys the datasource of a canvas it has one. This happened here also, only this same datasource was being re-used in the summary row.

So the data source may only be removed when the viewgrid itself gets destroyed. For this the potentiallyShared flag is used (this flag was already there).
(0053690)
hgbot   
2012-10-25 11:54   
Repository: erp/devel/pi
Changeset: 8dd5c8c26c733993d7bdc8405dd2e0afa4ebdd31
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Oct 25 11:53:06 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8dd5c8c26c733993d7bdc8405dd2e0afa4ebdd31 [^]

Fixes issue 22030: Adding and then removing summary field gives datasource javascript error
Datasource of the grid was shared/re-used in the formula editor when this editor is closed the ds was destroyed. The code changes prevent this.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-tab.js.ftl
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0053782)
alostale   
2012-10-30 09:11   
code reviewed and tested on pi@b2e90dcc4dc7
(0053924)
hudsonbot   
2012-10-31 13:30   
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/9e773cbcb723 [^]

Maturity status: Test