tab & field: find window options control and isselection overwrite

Description

Allow to overwrite IsSelection at Field definition and control Find Window options (advanced and more fields group) on Tab level

Environment

None

Activity

Show:
Murilo Habermann Torquato
June 24, 2019, 1:04 AM
Edited

Hi ,

Since the default behaviour will remain the same, the aggregated value will be more flexibility when creating solutions with the application dictionary.

Below I comment about what the attached patch does.

Advanced search and find only by selection column:

Currently I'm using iDempiere more just than an ERP, but as a powerfull framework that allows fast development of any kind of business applications.

Some of that applications must follow strict requirements on what users can and can't do. The default behaviour of Find Window is great, but for some use cases is very permissive and can cause security and performance issues when common users have power to do whatever they want.

I agree with you about advanced Roles, and they bypass the implemented restrictions.

Below you can see how it looks like when the default behaviour is changed with new options:

1 - Find is allowed only by selection column and advanced find is not allowed:

2 - Find is allowed only by selection column and advanced find is allowed (default) :

3 - Find is allowed by any column (default) column and advanced find is not allowed:

Override "Is Selection" column on field:

When we share the same table, on different windows (a good example is the R_Request tables) we can override is selection column to simplify users experience. For example: everyone needs "Document No" as a quick search parameter, then it's defined as "isSelection" column at column level.

Sales Team: uses a specific "sales requests" window with some default values and "tab filters". They also need "Order" as a quick parameter for search. Then this is defined as field level.

Engineering Team: uses a specific "engineering requests" window with some default values and "tab filters". They also need "Product" as a quick parameter for search. Then this is defined as field level.

See screenshot below on "2 - Window, Tab & Field"

Dynamic Validation (Find)

As we discussed here https://groups.google.com/forum/#!topic/idempiere/gRlMlvPnbsI now we have:

1 - Table & Column

2 - Window, Tab & Field

3 - Window Customization

4 - Example of reference used to "Remove All" validations

Observations

1 - It's a big patch because i was dealing with things that changes the same files and by this way is easier to deal.
2 - need help to test oracle script
3 - with this ticket i already included on views (AD_Field, AD_Field_vt, AD_Tab, AD_Tab_vt and AD_Window_vt) the EntityType field used by this ticket

Carlos Ruiz
September 24, 2019, 12:34 PM

Hi ,

I checked this with as I have doubts about the convenience of this.

So, your patch add three things:
1 - Added in tab configuration a way to hide the advanced and the extended fields in Find window
2 - Override "Is Selection" column on field
3 - Dynamic Validation (Find)

I'm OK with 2 and 3 - they seem straight and necessary

About the first I didn't feel the approach is correct, because if somebody needs to configure a role with and another without advanced/extended find then it would require to duplicate the windows - some with the flags set and the copied window without.

Heng Sin agreed this is better to make it configurable per role and suggested to add those options also to AD_Tab_Customization, that way I think it solves my concern, the options are configurable per window/role without the need of duplicating windows.

Regards,

Carlos Ruiz

Murilo Habermann Torquato
September 25, 2019, 2:11 PM

Hi ,

I agree about using AD_Tab_Customization for the hide advanced field configuration. It's really more effective.

i'll rewrite this patch and submit for review

Murilo Habermann Torquato
December 2, 2019, 2:18 PM

Hi ,

 

Attached a new patch version using AD_Tab_Customization as we commented.

NOTE: advanced users ALWAYS bypass IsFindOnlySelection and IsAllowAdvancedFind options on FindWindow.

 

 

Deepak Pansheriya
September 14, 2020, 2:02 AM

Pull Request created.

Assignee

Deepak Pansheriya

Reporter

Murilo Habermann Torquato

Tested By

None

Fix versions

Priority

Major
Configure