Location dialog panel
Description
Environment
Attachments
- 27 Jan 2014, 11:37 AM
- 27 Jan 2014, 11:37 AM
- 27 Jan 2014, 10:59 AM
Activity
Carlos Ruiz January 22, 2021 at 4:26 PM
Hi @Nicolas Micoud, sure, is clearer, but I think still all my points above are valid.
Nicolas Micoud January 22, 2021 at 9:01 AM
Paris was a wrong example as only few cities (big ones, I think there are only 3 in France) have several postal codes (because of districts).
Furthermore, the first 2 digits define the department (~ 100 in France)
nb:
"Grenoble" postal code is 38000
"Voiron" (Chartreuse!!) postal is 38500
My city is "Rives", postal code is 38140 (and some other little cities have this same postal code : Renage, Beaucroissant, ...)
But all are in "Isère" department.
Is it much clear ?
Carlos Ruiz January 21, 2021 at 11:17 AMEdited
You wrote:
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)
From what I read that's a characteristic in France that the first two digits define the city, but is not the same in other countries, for example in USA there are zip codes that cross different states.
On the other hand, when entering addresses is not expected that a user enter 75000, the expectation is that the user enters the detailed zip code of the address (f.e. 75116 or 75948).
However, as the definition in France is in that way, you could have 75 as the postal code for Paris and get the city from the first two letters of the zip code, but that's specific for France, reinforcing my idea that this must be implemented as an interface that figures out the city based on the country.
Regards,
Carlos Ruiz
Nicolas Micoud January 21, 2021 at 8:23 AM
Hi,
Not sure to understand the design with the C_Postal table.
If a city has only one postal code, there will be one record in C_City (with Postal filled) and 0 record in C_Postal
If a city has > 1 postal code, there will be one record in C_City and x records in C_Postal. What about the C_City.Postal field ? Should it be filled?
nb: ATM, if a city has several postal codes, records in C_City are duplicated (same city name and different postal code).
Thanks,
Nicolas
Carlos Ruiz January 19, 2021 at 3:16 PM
I'm thinking we can add the table C_Postal as a detail of city, indexed by the Postal Code, otherwise searching within a CSV or json can be too time consuming.
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