IDEMPIERE-4657 Search Dialog Columns are duplicated when table is present in multiple window tabs. (#540)

* IDEMPIERE-4657 Search Dialog Columns are duplicated when table is present in multiple window tabs.

* Improve query when different seqno (just check fields from first tab)
This commit is contained in:
Carlos Ruiz 2021-01-21 17:27:47 +01:00 committed by GitHub
parent 2d76f90f9c
commit 96393d2356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -468,6 +468,8 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener<Event>
+ " INNER JOIN AD_Tab tab ON (t.AD_Window_ID=tab.AD_Window_ID)"
+ " INNER JOIN AD_Field f ON (tab.AD_Tab_ID=f.AD_Tab_ID AND f.AD_Column_ID=c.AD_Column_ID) "
+ "WHERE t.AD_Table_ID=? "
+ " AND tab.IsSortTab='N'"
+ " AND tab.Ad_Tab_ID=(SELECT MIN(mt.AD_Tab_ID) FROM AD_tab mt WHERE mt.AD_Window_ID=t.AD_Window_ID AND mt.AD_Table_ID=t.AD_Table_ID AND mt.IsActive='Y')"
+ " AND (c.IsKey='Y' OR "
+ " (f.IsEncrypted='N' AND f.ObscureType IS NULL)) "
+ "ORDER BY c.IsKey DESC, f.SeqNo";