Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030405Openbravo ERPA. Platformpublic2015-07-22 10:022015-07-23 17:29
caristu 
caristu 
immediateminoralways
closedfixed 
5
 
3.0PR15Q2.33.0PR15Q2.3 
alostale
Core
Pre packaging ( pi )
2015-07-06
pi
http://code.openbravo.com/erp/devel/pi/rev/22f85795e81fcad7a6c4c5465ba60d582c69919b [^]
No
0030405: 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.0PR15Q2.4
2015-07-23 11:27alostaleTag Attached: Approved
2015-07-23 13:25caristuTarget Version3.0PR15Q2.4 => 3.0PR15Q2.3
2015-07-23 17:20hgbotCheckin
2015-07-23 17:20hgbotNote Added: 0079051
2015-07-23 17:20hgbotStatusscheduled => resolved
2015-07-23 17:20hgbotResolutionopen => fixed
2015-07-23 17:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q2.3/rev/d5b668d83b8d6136b071b7a102ac8490c64d659b [^]
2015-07-23 17:29alostaleNote Added: 0079053
2015-07-23 17:29alostaleStatusresolved => closed
2015-07-23 17:29alostaleFixed in Version => 3.0PR15Q2.3

Notes
(0079051)
hgbot   
2015-07-23 17:20   
Repository: erp/backports/3.0PR15Q2.3
Changeset: d5b668d83b8d6136b071b7a102ac8490c64d659b
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jul 23 13:25:31 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2.3/rev/d5b668d83b8d6136b071b7a102ac8490c64d659b [^]

Fixes issue 30405: 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
---
(0079053)
alostale   
2015-07-23 17:29   
code reviewed

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