Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028468Openbravo ERPA. Platformpublic2014-12-22 18:002015-01-08 11:40
caristu 
AugustoMauch 
urgentmajoralways
closedno change required 
5
pi 
3.0PR15Q2 
Core
No
0028468: Some values entered by a selection function are lost in P&E windows under some circumstances
Values entered by a selection function are lost in P&E window under some circumstances. This behavior happens when filtering and selecting a record from another page of the datasource.
1) Install the attached module
2) Go to the [Sales Order] window. Click on the EM_Suptest_Proc which opens a P&E window.
3) Sort the grid by the date field descending
4) Select a couple of registers. Notice that the "Gridposition" field is filled because of the selection function of the P&E
5) Filter by documentno, using value "1000000". This is important because we need to retrieve a record from a different page. Click on the record to enter a value in the "Gridposition" field
6) Remove the filter
7) Filter again by the same value. Notice that the entered value in step 5) is lost.
No tags attached.
related to defect 00287123.0PR15Q2 closed alostale Records selection is lost in pick and execute window under some circumnstances 
? com.openbravo.support.test-1.0.0.obx (23,955) 2014-12-22 18:07
https://issues.openbravo.com/file_download.php?file_id=7630&type=bug
Issue History
2014-12-22 18:00caristuNew Issue
2014-12-22 18:00caristuAssigned To => AugustoMauch
2014-12-22 18:00caristuModules => Core
2014-12-22 18:00caristuResolution time => 1421622000
2014-12-22 18:00caristuTriggers an Emergency Pack => No
2014-12-22 18:00caristuIssue Monitored: networkb
2014-12-22 18:01caristuSummarySometimes some values entered by a selection function are lost in P&E windows => Some values entered by a selection function are lost in P&E windows under some circumstances
2014-12-22 18:01caristuDescription Updatedbug_revision_view_page.php?rev_id=7315#r7315
2014-12-22 18:06caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7317#r7317
2014-12-22 18:07caristuFile Added: com.openbravo.support.test-1.0.0.obx
2014-12-22 18:07caristuversion => pi
2014-12-22 18:14heccamIssue Monitored: heccam
2014-12-29 10:51AugustoMauchNote Added: 0072849
2014-12-29 10:51AugustoMauchStatusnew => feedback
2015-01-08 11:40AugustoMauchNote Added: 0073347
2015-01-08 11:40AugustoMauchStatusfeedback => closed
2015-01-08 11:40AugustoMauchResolutionopen => no change required
2015-01-21 12:38caristuRelationship addedrelated to 0028712

Notes
(0072849)
AugustoMauch   
2014-12-29 10:51   
The module is setting the value of the gridposition field in a selectionChanged function like this:

record.gridposition='a';

The problem is that when done this way, the value is not saved in the grid edited values, it is stored only in the record. Then, when the record is reloaded, its value is lost. This would not happen if the value were stored like this:

grid.setEditValue(grid.getRecordIndex(record), 'gridposition', 'a');

I have not found an easy way to automatically updated the grid edited values when the contents of its fields are modified using the first option. I propose to update the wiki to tell the users to use the second option, and avoid making any changes in the core code.
(0073347)
AugustoMauch   
2015-01-08 11:40   
The note [1] explains how to set the value to the column in a way that makes this a non-issue.

[1] https://issues.openbravo.com/view.php?id=28468#c72849 [^]