Relate zip/postal code to a city to a state
Re-implement city/state/zip as inter-related. Default country can easily be specified within the client, and these relations will improve data integrity.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- pheller
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
When an employee enters details for a new customer in many order-entry systems, they ask for the address, and often times, they ask for the ZIP or Postal code before asking for the City or State. This is likely because their order entry system contains a table of ZIP / Postal codes with relation to a city (or in some cases, several municipalities), which is further related to a state, which is further related to a country.
These relations remove some tedium from data entry, at the expense of up-front data population, or the users being further trained to add new rows to yet another table.
I propose that these relational objects be created within OpenObject, and res.partner.address and its form view be amended such that City, State, Zip, fields display their appropriate values, and together act as appropriate search criteria fields against their respective objects.
I.e., if a new res.partner.address object is being created, all fields will be empty. Assuming the user enters "United States" into the country, then entering "Ma" into the State field would bring up the city/state/zip search form, where a domain of country='United States' has already been applied, and the state value is limited to entries matching "Ma". A user may then further refine the search criteria in this search form, and eventually "select" a result to back-populate to the res.partner.address object form.
Assuming the country is already selected, and a user types in a zip code, for which there is a unique city/state relation, then those values are directly back-populated without display of the city/state/zip search form. If that zip code is applicable to several cities / municipalities, then the form would be displayed with the zip code as the search criteria, thus the proper results are displayed.
Though this does present the issue of users adding new rows, which must be considered.