Make mandatory location on BP quick entry optional on certain tables

Description

As mentioned in the forums https://groups.google.com/forum/#!msg/idempiere/Og-yvQI9Thg/5-HMKiYMCAAJ.

Sometimes location should not be mandatory when creating Business Partners from the quick entry dialog.

The attached patch (sponsored by TrekGlobal) solves that by creating a new client SysConfig (BPARTNER_QUICK_ENTRY_OPTIONAL_LOCATION_TABLES) where the client can list all the tables where location should be optional, separated by comma.

Environment

None

Activity

Show:
Nicolas Micoud
February 28, 2019, 2:59 PM

Hello Carlos,

I think - but I need to study it further - that both tickets can be solved using a single patch (if we find a way to make a link between Quick Entry panel / parent window fields).

I will come back when finding a relevant patch.

Regards,

Nicolas

Carlos Ruiz
February 28, 2019, 2:42 PM

Hi , I think you're confusing this ticket with IDEMPIERE-3905.

This ticket is not modifying the color or style in any way, is a different issue that is being contributed here coming from TrekGlobal, solving a different problem similar to the problem that you mentioned in forum:

  • must the location be mandatory when filling BP on payment?

The color ticket is a different thing - and doesn't sound as blocking, it sounds like a minor issue (presentation), but would be better to keep the discussion about color in forums or in the other ticket - also you said you can solve it using styles.

Regards,

Carlos Ruiz

Nicolas Micoud
February 28, 2019, 2:12 PM

Hello Diego,

I think the style is blocking.
If I see a label in red, I understand that the corresponding field must be filled in order to save.

That's not the case here, that's why I wanted to find a solution that could set the good value to the "mandatory" property of the field of Quick Entry panel when opening it, according to the parent window (which contains or not the BPartnerLocation for instance).

I think your patch should be considered as a temporary solution (no offense here), I know how (at least "my") users will react if I deploy this patch in production -> "Hi Nicolas, please rollback"

I will try to work on it.

Regards,

Nicolas

Diego Ruiz
February 28, 2019, 1:48 PM

Hi Nicolas,

The patch is to address the logic problem in the Quick Entry window, if you want to create a BPartner with QuickEntry in the Payment window, where the location is not needed, you won't be able to save the record unless you set an address. With the patch, you can specify which tables do not need to have this mandatory validation, in a way that you can save the Business Partner from the Quick Entry. Location is a special field that has a special callout, that's the purpose of the patch.

What you mention is mainly about styles, I didn't modify that as even if the field is shown in red it will allow the user to save an empty value.

Kind Regards,
Diego Ruiz

Nicolas Micoud
February 28, 2019, 1:34 PM

Hi,

Haven't tested but AFAIU, the patch will only solve the BPLocation field issue.

Wouldn't be better to have something more generic ?
If the QuickEntry panel is opened from the payment window, the ContactName will still appear in red :-/

Regards,

Nicolas

Fixed

Assignee

Carlos Ruiz

Reporter

Diego Ruiz

Labels

Tested By

None

Priority

Minor