Skip to content

[20.0][MIG]: base_location - #2478

Open
Alexgars73 wants to merge 99 commits into
OCA:20.0from
Studio73:20.0-mig-base_location
Open

Alexgars73 wants to merge 99 commits into
OCA:20.0from
Studio73:20.0-mig-base_location

Conversation

@Alexgars73

@Alexgars73 Alexgars73 commented Sep 30, 2026 •

Copy link
Copy Markdown

Standard migration to v20.

Assisted-by: OpenAI Codex

nbessi and others added 30 commits September 30, 2026 09:30
…some views. Added two columns in respective tree views.
…ooks

* Added Icon.
* Improve module description and extracted to README.rst.
* Pass country instead of country_id for advance comparisons.
* Allow to transform city name.
* Some code style.
* Do not remove all entries of a country, but only not found.
* Include hooks for transforming some things.
* Include spanish translation.
Brussels Belgium city
…y, state and country in order to allow search using '%' from the m2o widget
* Headers shortened
* Move cities management to settings
* [IMP] base_location: Add lat & long to `better.zip`
* Add latitude and longitude columns to `better.zip`

* [IMP] base_location_geonames_import: Add lat/long
* Add support for latitude & longitude to genomes importer
Incredibly not included in Odoo core.
Currently translated at 66.7% (24 of 36 strings)

Translation: partner-contact-11.0/partner-contact-11.0-base_location
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-11-0/partner-contact-11-0-base_location/es/
Currently translated at 100,0% (36 of 36 strings)

Translation: partner-contact-11.0/partner-contact-11.0-base_location
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-11-0/partner-contact-11-0-base_location/de/
This module has now been refactored to be more consistent with what base_address_city offers to the location management.
Added dependency to contacts so that I could change the menu location for cities / zip management.

Now, every res.city record has a relation One2many to res.city.zip (old res.better.zip). This way, every zip has a realted city too.
Zips can be searched through city code, zip or city name (same as before).

Modified tests and deleted not needed tests.

Added sql contraints so that zips and cities are unique within it's country / state / city.
Steps:

 - Open company form
 - Set 'city completion' field

Get 'The state of the partner My Company differs from that in location X'

Disabling _check_zip while writing 'zip' fields from company, as incompatible with the sequence of write operations.

Automatic test is added too.
Currently translated at 57.6% (19 of 33 strings)

Translation: partner-contact-12.0/partner-contact-12.0-base_location
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-base_location/es/
* Don't need cities for migrating

  Previous script required to have cities populated for working, but that's not
  usual thing, as people in v11 may choose to not import them, and for older databases
  they even weren't that option.

  With this improve script, now we populate city table for ZIP entries without city,
  so the rest of the queries are properly executed in any case.

* Cover case of res_better_zip w/o country_id

* Avoid error on null zip numbers
* Standard procedure
* Change v13 specifics
* Adapt tests + correct some practices
oca-ci and others added 15 commits September 30, 2026 09:30
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: partner-contact-18.0/partner-contact-18.0-base_location
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-18-0/partner-contact-18-0-base_location/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: partner-contact-19.0/partner-contact-19.0-base_location
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-19-0/partner-contact-19-0-base_location/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: partner-contact-19.0/partner-contact-19.0-base_location
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-19-0/partner-contact-19-0-base_location/
Currently translated at 100.0% (33 of 33 strings)

Translation: partner-contact-19.0/partner-contact-19.0-base_location
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-19-0/partner-contact-19-0-base_location/it/

@Reyes4711-S73 Reyes4711-S73 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adrip-s73 adrip-s73 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !!

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot migration base_location

@OCA-git-bot OCA-git-bot added this to the 20.0 milestone Oct 5, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 5, 2026
66 tasks
Comment thread base_location/models/res_partner.py Outdated
for record in self.filtered("zip_id"):
for record in self:
if not record.zip_id:
continue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there all these meaningless changes? This one seems to undo a well known Odoo pattern, and others are a matter of opinion. It's mainly noise at this point. And if your coding agent did that arbitrarily, can you disclose? See https://github.com/OCA/.github/blob/master/AI_POLICY.md

Assisted-by: OpenAI Codex
@Alexgars73
Alexgars73 force-pushed the 20.0-mig-base_location branch from cede918 to ff6a0fd Compare October 6, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.