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 ????)
I reopen the ticket and will submit one patch per issue as i really think they are useful.
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.
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 ?
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)
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, ...)
I tried applying the two patches, the patch
can be applied in eclipse with a Fuzz Factor, but the patch
If this is still needed, can you please create a pull request with the changes for actual core?