Please a patch that allow adding records from right clicl popup when window if find through Zoom Conditions.
nb: the patch has been generated in another way, could you please tell me if you can integrate it easily ?
I also attach the full class.
nb2: I'm working on creating a VM based on Ubuntu
Hi , I did tests on my local:
created a copy of Unit of Measure window and set up quick entry fields
created a zoom condition for the table C_UOM with zoom logic -> @#AD_Client_ID@>10
revoked access to GardenAdmin to the original Unit of Measure window
Effectively as you say - the right click is not showing New/Update entries.
After applied your patch, it shows New/Update but when selected New it threw:
I made some debug to find out why it was working in my case and not in yours. And I find something interesting !
If you change the definition of the C_UoM_ID field to Search, it will work.
Is because of inconsistency between WTableDirEditor and WSearchEditor for the actionQuickEntry method.
In WSearchEditor, the zoomWinID is retrieved using Env.getZoomWindowID(MTable.getTable_ID(tableName), Record_ID, lookup.getWindowNo());
Whereas in WTableDirEditor, is using the MLookupFactory.ZoomWindow set ~ line 785 (ZoomWindow = table.getAD_Window_ID()
=> If this line is replaced by a search using ZoomConditions, that should resolve your issue.
But I don't think this is the right ticket to fix that (as it probably has lots of impacts).
Well - we cannot push a fix that throws a NPE
So, yes, I think is better to fix that too in this ticket.
My idea was to create a new ticket to incorporate before this one (fix inconsistency between WTableDirEditor / WSearchEditor).
Anyway, I've added some lines to retrieve the table using zoom conditions.
Is working now with M_Product.C_UoM_ID (table direct) and new column M_Product.YY_UoM_ID (table).