Not correct open record in info window(based on view) when double click
Description
Environment
Activity
Carlos Ruiz April 19, 2018 at 9:16 AM
@Nikita Polkovnikov, still don't get it.
If you can set up a sample in demo or test with the Payment Info window I can help you with the configuration
I have an installation where I have two windows for C_Payment - one for receipts and the other for payments.
I configured the Zoom Condition for the Table C_Payment, and the info window zoom without problem.
Nikita Polkovnikov April 19, 2018 at 7:32 AM
Example:
1) Exists table "C_Order".
2) This table having several window. (window1, window2, window3)
3) In field AD_Table.AD_Window_ID setted value "window1".
4) We create info window based on "C_Order_v" and in field AD_InfoWindow.AD_Table_ID set "C_Order".
5) When we press double click on row, opens "window1"
We want open "window2" or "window3" when press double click on row.
If in field AD_InfoWindow.AD_Table_ID setted example C_Order, opening window which setted in table C_Order in field AD_Table.AD_Window_ID.
This issue is solve this bug.
Maybe exist another way opening different windows in info window?
Thanks!
Nikita Polkovnikov April 19, 2018 at 6:40 AM
Hi @Carlos Ruiz, thanks for answer.
When we create info window, we set view name (example C_Payment_V) in field AD_Table_ID.
This causes error when press double click on row.
If in field "AD_Table_ID" setting (example C_Payment) all work.
Thanks!
Carlos Ruiz April 11, 2018 at 11:24 AM
Hi @Nikita Polkovnikov, I don't understand the issue.
The "Payment Info" window is based on the view C_Payment_V and it opens correctly the payment window on double click zoom.
Could it be wrong definition of your view or info window?
Regards,
Carlos Ruiz
Good day.
The entries not correct opening in window when double click on row in info window
Reproduction:
1) Create view
2) Create info window on base this view
3) Open info window
4) Double click on any row
5) Opening empty window
Solution:
1) Open view in iDempiere
2) Open the key field, which determines which entry to open by double-clicking
3) Set this column IsKey='Y'. All another column set IsKey='N'
4) In class DefaultInfoFactory change method create(int AD_InfoWindow_ID):
@Override public InfoWindow create(int AD_InfoWindow_ID) { MInfoWindow infoWindow = new MInfoWindow(Env.getCtx(), AD_InfoWindow_ID, (String) null); String tableName = infoWindow.getAD_Table().getTableName(); String keyColumn = DB.getSQLValueStringEx(null, "SELECT ColumnName FROM AD_Column WHERE AD_Table_ID = ? AND IsKey = 'Y' AND IsActive = 'Y'", infoWindow.getAD_Table().getAD_Table_ID()); if (keyColumn == null || keyColumn.isEmpty()) keyColumn = tableName + "_ID"; InfoPanel info = create(-1, tableName, keyColumn, null, false, null, AD_InfoWindow_ID, false); if (info instanceof InfoWindow) return (InfoWindow) info; else return null; }
Best regards
Palich.ru Development Team