Zoom from QuickInfo to a specific window

Description

Since we create a zoom link from Quick Info widged.

This works weel for most default tables and windows, but in some cases that we have multiple windows for the same table - as an example we can mention Request and Request (All) - we get stuck as we are not able to define to wich window that the zoom action will open, using always the default.

Attached a patch that changes the code to allow a specific window ID to be defined when creating the zoom link. Note that this is optional, just if needed the window ID can be defined, if not, just use as the original ticket.

Example:

select COALESCE(string_agg(DocumentNo||'&nbsp;&nbsp;&nbsp;<a href="javascript:void(0)" class="rp-href" onclick="zoomWindow(@#clientInfo_QuickInfoComponentId@, ''R_Request_ID'', '||r_request_id||',1500469)">'||title||'</a>', ' <br> '),'') FROM ( SELECT r.r_request_id, r.DocumentNo, r.Title from r_request r where r.R_RequestType_ID = 5000000 AND r.c_bpartner_id = @C_BPartner_ID@ ORDER BY r.created desc NATIVE_PostgreSQL_KEYWORKLIMIT 10) AS x

Environment

None

Attachments

2
  • 03 Jun 2019, 07:33 PM
  • 03 Jun 2019, 02:40 PM

Activity

Show:

Carlos Ruiz June 4, 2019 at 8:29 AM

For testing purposes:

Query with window parameter looks like:

select COALESCE(string_agg(DocumentNo||'&nbsp;&nbsp;&nbsp;<a href="javascript:void(0)" class="rp-href" onclick="zoomWindow(@#clientInfo_QuickInfoComponentId@, ''R_Request_ID'', '||r_request_id||',''b8440458-48d0-45f3-b37a-3fe5c86531a9'')">'||summary||'</a>', ' <br> '),'') FROM ( SELECT r.r_request_id, r.DocumentNo, r.summary from r_request r where r.c_bpartner_id = @C_BPartner_ID@ ORDER BY r.created desc NATIVE_PostgreSQL_KEYWORKLIMIT 10) AS x

The code from keeps working using zoom instead of zoomWindow.

Murilo Habermann Torquato June 3, 2019 at 7:38 PM

I agree with you , just adjusted a new patch

, the use is the same, but instedad of ID just inform 'UUID' on javascript.

I think that a lot of job related to UUID is needed into core (maybe a discussion first can guide us to better solutions and architecture)

for example on this i preferred to keep internal using ID and just implemented a method to get window ID by UU and keep the core without changes, in due of caching system and other lot of related implementations that trust on ID and is a hard work to change to UUID

Carlos Ruiz June 3, 2019 at 2:47 PM

Thanks , this looks good, however I think to make it worthy for plugins we would need to work with the zoom window UUID instead of the ID.

Fixed

Details

Assignee

Reporter

Labels

Fix versions

Priority

Created June 3, 2019 at 2:24 PM
Updated August 1, 2019 at 8:50 AM
Resolved June 4, 2019 at 8:29 AM