Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0049826Openbravo ERPA. Platformpublic2022-07-18 11:142023-01-31 08:29
jarmendariz 
gonzalo_fernandez 
normalmajorhave not tried
closedfixed 
5
 
PR23Q2 
Core
No
0049826: Foreign key selector within Custom HQL selector grid does not show proper values
In a Selector Reference we can define a field that refers to a foreign reference to another table. In that case, in the grid view we see a dropdown selector for that field that shows all available values with the current filter.

In case this selector uses an custom HQL query, that foreign key selector does not group its values by the foreign key and shows a list of checkboxes with no label.

https://openbravo.atlassian.net/browse/RM-2514 [^]
- Log in as System administrator
- Go to Reference Window
- Select 'On hand warehouse'
- On Tab 'Defined Selector', double click the associated entry
- Modify the HQL query to add a location address field and save:

select w.id as id, w.name as name, w.locationAddress as location
from Warehouse w
where @additional_filters@
and w.active=true

- In subtab 'Defined Selector Field' create a new entry with the following info:
  - Name: location
  - Display column alias: location
  - Reference: C_Location
  - Show in grid: Yes
  - Clause left part: w.locationAddress

Logout then login and switch to 'F&B International Group admin' role

- Open 'Sales Order' Window and create a new entry
- Select 'F&B EspaƱa, S.A' in Organization
- In 'Warehouse' selector, click the glass icon
- Click in the dropdown arrow in location column, then you can notice that two
 checkboxes appears but with no description

An alternative way to reproduce it is to installed the attached diff. It will add two properties to the Product selector on the Lines subtab of the Sales Order window.
No tags attached.
blocks feature request 0049375 new bcolorado Workflows adaptations for product price with exceptions. 
diff 49826-reproducer.diff (8,205) 2023-01-30 12:31
https://issues.openbravo.com/file_download.php?file_id=18082&type=bug
Issue History
2022-07-18 11:14jarmendarizNew Issue
2022-07-18 11:14jarmendarizAssigned To => Triage Platform Base
2022-07-18 11:14jarmendarizModules => Core
2022-07-18 11:14jarmendarizTriggers an Emergency Pack => No
2022-07-18 11:19jarmendarizRelationship addedblocks 0049375
2022-07-23 17:50cbernerAssigned ToTriage Platform Base => ablasco
2022-08-31 09:52psanjuanTypedefect => design defect
2023-01-04 14:19AugustoMauchAssigned Toablasco => gonzalo_fernandez
2023-01-04 14:19AugustoMauchStatusnew => scheduled
2023-01-09 11:45alostaleDescription Updatedbug_revision_view_page.php?rev_id=25361#r25361
2023-01-16 07:43hgbotNote Added: 0145430
2023-01-30 12:31AugustoMauchFile Added: 49826-reproducer.diff
2023-01-30 12:31AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25476#r25476
2023-01-30 13:05hgbotResolutionopen => fixed
2023-01-30 13:05hgbotStatusscheduled => resolved
2023-01-30 13:05hgbotFixed in Version => PR23Q2
2023-01-30 13:05hgbotNote Added: 0146025
2023-01-30 13:05hgbotNote Added: 0146026
2023-01-31 08:29AugustoMauchStatusresolved => closed

Notes
(0145430)
hgbot   
2023-01-16 07:43   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/809 [^]
(0146025)
hgbot   
2023-01-30 13:05   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 048594b4942ac35c5bf52c0219fabb5871372ef7
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 30-01-2023 13:05:28
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/048594b4942ac35c5bf52c0219fabb5871372ef7 [^]

Fixes ISSUE-49826: Merge branch 'fix/49826-foreign-key-selector'

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
---
(0146026)
hgbot   
2023-01-30 13:05   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/809 [^]