Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030404Openbravo ERPA. Platformpublic2015-07-22 10:022015-07-23 17:30
caristu 
caristu 
immediateminoralways
closedfixed 
5
 
3.0PR15Q33.0PR15Q3 
alostale
Core
Pre packaging ( pi )
2015-07-06
pi
http://code.openbravo.com/erp/devel/pi/rev/22f85795e81fcad7a6c4c5465ba60d582c69919b [^]
No
0030404: Unexpected behavior in grid view with OBUISEL_Selector reference when the Display Field is set
Is not possible to save a record in grid view if it includes a column with an OBUISEL_Selector reference which is not of custom query type and it has the Display Field set
As system administrator
1) Go to the [Reference] window, select the "Business Partner selector" reference and navigate to the Defined Selector tab. Set a value for the Display Field, for example Search Key.
2) Go to [Tables and Columns] and change the reference used for the C_BPartner_ID column in the C_Order table, using the "Business partner selector" instead.
As group admin
3) Go to the Sales Order window, try to save a record in grid view.
Approved
blocks defect 0030403 closed caristu Unexpected behavior in grid view with OBUISEL_Selector reference when the Display Field is set 
Issue History
2015-07-22 10:11alostaleTypedefect => backport
2015-07-22 10:11alostaleTarget Version => 3.0PR15Q3
2015-07-23 11:27alostaleTag Attached: Approved
2015-07-23 16:33hgbotCheckin
2015-07-23 16:33hgbotNote Added: 0079043
2015-07-23 16:33hgbotStatusscheduled => resolved
2015-07-23 16:33hgbotResolutionopen => fixed
2015-07-23 16:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q3/rev/6273bf287bb7ec722b49541ecd9739b389a519de [^]
2015-07-23 17:30alostaleNote Added: 0079056
2015-07-23 17:30alostaleStatusresolved => closed
2015-07-23 17:30alostaleFixed in Version => 3.0PR15Q3

Notes
(0079043)
hgbot   
2015-07-23 16:33   
Repository: erp/backports/3.0PR15Q3
Changeset: 6273bf287bb7ec722b49541ecd9739b389a519de
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jul 23 13:51:40 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q3/rev/6273bf287bb7ec722b49541ecd9739b389a519de [^]

Fixes issue 30404: selectors not working in grid view when display field is set

When setting the display field for a selector with FKSelectorUIDefinition as its UI Definition class, if the display field was referencing to a property of the main entity of the selector, the display field name returned as part of the gridProps in the view definition was 'entity'.
The _extraProperties in the datasource used by the selector does not contain the entity name if they are referencing to the main entity. That is the root of the problem: when trying to set the selected value of the selector picklist in grid view, the display field name was never found as we were using 'entity' instead of looking directly for 'property'.
This problem does not affect when setting as display field a field that references a property which does not belong to the main entity of the selector.
To solve this problem, now in FKSelectorUIDefinition we return 'property' as the display field name instead of 'entity' when the property belongs to the main entity.

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/reference/FKSelectorUIDefinition.java
---
(0079056)
alostale   
2015-07-23 17:30   
code reviewed

* tested with Search and OBUISEL_Selector references both in grid and form views * tested issue 0030297
* tested issue 0023890