Contextual Menu for Info Window Parameters

Description

info window doesnt have implemented right click contextual menu.

minimal requirements
1. implement regular contextual menu
2. implement value preferences

Environment

2.0.0.v20140521-2045

Attachments

6

Activity

Show:

Diego Ruiz August 12, 2015 at 2:22 PM

Tested:

Test case.
Open Business Partner Info from Sales Order and set the value preference as XXX in the name Field for SuperUser. Then open the Business Partner Info from Invoice (Customer) and set the value preference as YYY for field Name. Logout and re login, Values are still there as expected.

Login as GardenAdmin and did the whole process again.

The result was that both users have the value preferences that were set as expected.

I see no problem in this ticket

Regards,
Diego Ruiz

Hiep Lq August 1, 2015 at 3:21 PM

preference don't work with field without default value is fix at experiental repository.
just remove condition !Util.isEmpty(mField.getVO().DefaultValue, true)

Carlos Ruiz January 14, 2015 at 3:03 PM

bringing chat from IRC:

<CarlosRuiz> hieplq, I integrated
<CarlosRuiz> tested with InfoProduct - set a value preference for warehouse (also tested with SKU)
<CarlosRuiz> re-login
<CarlosRuiz> opened info window again but the value preference is not shown
<hieplq> wait me point it .
<CarlosRuiz> ah - but a value preference is to set a default value for user - and if there is a default set by dictionary - the default dict must prevail
<hieplq> comment out line it will ok with other !Util.isEmpty(mField.getVO().DefaultValue, true)
<CarlosRuiz> which class?
<hieplq> it in infowindow
<hieplq> this purpose of this line is void default value type set to field. without this line, all number field will load with 0 (want null)
<hieplq> for test you can comment out this code. i will make a complete patch for it at tomorro
<CarlosRuiz> ok - will comment on ticket

Hiep Lq December 12, 2014 at 4:52 AM

combine all to one patch to easy apply

Tomáš Švikruha October 7, 2014 at 6:15 AM

I've tested it with additional patch and works fine (without last patch old value preferences was not loaded in info window processes).

Hiep Lq October 7, 2014 at 2:51 AM

fix bug with below improve:

1. fix: when open value preference in a field of process of info window, "info window" checkbox don't display.
2. i think window checkbox is not need in case "open value preference in a field of process of info window" because hidden it.

3. relate to load preference for field in process dialog when call process from a infoWindow

if a field have no "value preference" we will search up to "value preference" of next level (window, process, org,...).
list it here to discus

I. dialog value preference show from field at process called by infoWindow have below level of value preference (ignore standard as org, user, client)
+ apply only for this field of this process called by this info window (1)
+ apply only for this field of all process called by this info window (2)
+ apply only for this field of this process called by any (all) info window (3)
+ apply only for this field of all process called by all info window (4)
order should (1), (2), (3) (4) or (1), (3), (2), (4)

II. dialog value preference show from field at process called by window (gear button) have below level of value preference (ignore standard as org, user, client)
+ apply only for this field of this process called by this window (4)
+ apply only for this field of all process called by this window (5)
+ apply only for this field of this process called any (all) this window (6)
+ apply only for this field of all process called by all window (7)
III. dialog value preference show from field at process at stand-alone window (process show by click menu item)
+ apply only for this field of this process called by this window (7)
+ apply only for this field of all process called by this window (8)
+ apply only for this field of all process called by all window (9)

III just a case of II. have no problem
(**) when load value preference for field at I, if (1), (2), (3), (4) return null will continue seach in (4), (5), (6), (7) ok?
(***) in case load value preference for II and III, no value in I is effect to II and III. true?

in my patch,
order is (1), (2), (3) (4). it mean, priority is all process, all info window, all process + infowindow
(**) yes
(***) yes, because behavior of current will don't effect (override) by value set for process in infoWindow

Hiep Lq September 17, 2014 at 12:48 PM

Because logic in InfoWindow.addSelectionColumn
if (!Util.isEmpty(mField.getVO().DefaultValue, true)) {
// set default value
mField.setValue(mField.getDefault(), true);
}

just parameter have default value has effect of value preference

Hiep Lq September 17, 2014 at 2:59 AM
Edited

IDEMPIERE-1969-step2.patch is for bellow request

next step will add:
1. when save preference for infoWindo data is:
preferenceFor = 'I'
process_id = null
infowindow_id = current id
window_id = id of window call info window or null in case open infowindow from menu

2. also add improve for
now you can add preference for process all from button of process in infoWindow
data in this case

preferenceFor = 'P'
process_id = current
infowindow_id = current id
window_id = id of window call info window or null in case open infowindow from menu
(in real, window_id always null, because when show in dialog mode, process button is hidden)

Fixed

Details

Assignee

Reporter

Tested By

Carlos Ruiz
Diego Ruiz

Components

Affects versions

Priority

Created May 28, 2014 at 7:40 AM
Updated September 5, 2023 at 11:16 AM
Resolved August 19, 2015 at 10:17 PM