Location dialog panel

Description

List of cities used the postal as a filter
When closing the panel (using ok button), it alse saves the BPartnerLocation
Title shows BPartner name (but seems the title is always hide ????)

https://bitbucket.org/nmicoud/idempiere-nm/commits/5d1e30ec593e2b7c0434ff4ee1053b0c038301bf

Regards,

Nicolas

Environment

None

Activity

Show:
Nicolas Micoud
January 27, 2014, 10:43 AM

Hi Carlos,

I reopen the ticket and will submit one patch per issue as i really think they are useful.

Regards,

Nicolas

Nicolas Micoud
January 27, 2014, 10:59 AM

Hi Carlos,

This patch adds (and shows !) a title to the WLocationDialog panel.
It adds the bpartner name before the New or Update address message.

Note that if you open the panel for organization or locator (or any window without a C_BPartner_ID field), it will only display the message.

Regards,

Nicolas

Nicolas Micoud
January 27, 2014, 11:37 AM

Another patch that could fill the cities list according to the content of the Postal field.

I attached a csv files with some cities.

If there is only one city that matches, it is auto select.
If several cities match the postal, you will have to select the desired one.

If you create a location in France, and write 75000 in Postal, it will auto select Paris. (Note that Paris has many postal 75000, 75001, 75xxx)

I don't see why it couldn't be used in aother countries because when you enter the postal, it will update the cities list and you will only get the cities that match the postal.
But it needs to first select the postal and then the city.
And if no city match the postal, you won't notice any difference.

Note that when you select a postal, the focus is set on the city list.
That may be determined with a new checkbox on the country window ?
or automatically set if the City field is put after the Postal ?

Regards,

Nicolas

Nicolas Micoud
January 27, 2014, 11:54 AM

for #3

The first goal was to avoid saving twice.
Lots of users don't understand why you have to first save the location (C_Location) and then the C_BPartner_Location. For them, it is the same thing.
That's why i've ahrdcoded that fact that when you save a location while on the C_BPartner_Location table, it also save the C_BPartner_Location.

But that could be extended to all the C_Location field with this code which has to be put right after "setValue(ii);" (around line 200 of WLocationEditor)

gridField.getGridTab().setValue(gridField, ii);
gridField.getGridTab().dataSave(true);

But note that if some mandatory fields are not filled, it will display an error message.
So, wondering if we could add an option on the column (or the field) to say "Save location also save parent record" ?

About the orphan record, that perhaps could be managed in PO in a kind of afterDelete that will be executed after the deletion of a record that has a C_Location_ID column ? (like the PO_Record delete related chat, attachment, ...)

WDYT ?

Nicolas

Carlos Ruiz
July 30, 2020, 9:45 AM

Hi ,

I tried applying the two patches, the patch

can be applied in eclipse with a Fuzz Factor, but the patch

is conflicting.

If this is still needed, can you please create a pull request with the changes for actual core?

Regards,

Carlos Ruiz

Assignee

Nicolas Micoud

Reporter

Nicolas Micoud

Labels

Tested By

None

Components

Priority

Major
Configure