From 5e1f1eecf346be9c1f7c04f25ba3144db7fc741d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kh=C3=B4i=20=28Ki=C3=AAn=20Kim=29?= Date: Mon, 14 Oct 2024 12:36:17 +0700 Subject: [PATCH] [MIG] base_location: Migration to 18.0 --- base_location/README.rst | 6 +++++ base_location/__manifest__.py | 2 +- base_location/models/res_partner.py | 26 ++++++++++----------- base_location/readme/CONTRIBUTORS.md | 1 + base_location/readme/CREDITS.md | 4 ++++ base_location/static/description/index.html | 6 +++++ base_location/views/res_city_view.xml | 8 +++---- base_location/views/res_city_zip_view.xml | 6 ++--- base_location/views/res_country_view.xml | 1 - 9 files changed, 38 insertions(+), 22 deletions(-) diff --git a/base_location/README.rst b/base_location/README.rst index d11060b1e660..d24fb008d66a 100644 --- a/base_location/README.rst +++ b/base_location/README.rst @@ -96,12 +96,18 @@ Contributors - Francesco Apruzzese - Dave Lasley - Aitor Bouzas +- Khoi (Kien Kim) Other credits ------------- - Icon park: Icon http://icon-park.com/icon/location-map-pin-orange3/ +The migration of this module from 17.0 to 18.0 was financially supported +by: + +- Camptocamp. + Maintainers ----------- diff --git a/base_location/__manifest__.py b/base_location/__manifest__.py index 786cd612a72d..853b11fa36e2 100644 --- a/base_location/__manifest__.py +++ b/base_location/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Location management (aka Better ZIP)", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "development_status": "Mature", "depends": ["base_address_extended", "contacts"], "author": ( diff --git a/base_location/models/res_partner.py b/base_location/models/res_partner.py index 0722eccabc6e..18fd671fe113 100644 --- a/base_location/models/res_partner.py +++ b/base_location/models/res_partner.py @@ -4,7 +4,7 @@ from lxml import etree -from odoo import _, api, fields, models +from odoo import api, fields, models from odoo.exceptions import ValidationError @@ -106,35 +106,35 @@ def _check_zip(self): error_dict = {"partner": rec.name, "location": rec.zip_id.name} if rec.zip_id.city_id.country_id != rec.country_id: raise ValidationError( - _( + self.env._( "The country of the partner %(partner)s differs from that in " - "location %(location)s" + "location %(location)s", + **error_dict, ) - % error_dict ) if rec.zip_id.city_id.state_id != rec.state_id: raise ValidationError( - _( + self.env._( "The state of the partner %(partner)s differs from that in " - "location %(location)s" + "location %(location)s", + **error_dict, ) - % error_dict ) if rec.zip_id.city_id != rec.city_id: raise ValidationError( - _( + self.env._( "The city of the partner %(partner)s differs from that in " - "location %(location)s" + "location %(location)s", + **error_dict, ) - % error_dict ) if rec.zip_id.name != rec.zip: raise ValidationError( - _( + self.env._( "The zip of the partner %(partner)s differs from that in " - "location %(location)s" + "location %(location)s", + **error_dict, ) - % error_dict ) def _zip_id_domain(self): diff --git a/base_location/readme/CONTRIBUTORS.md b/base_location/readme/CONTRIBUTORS.md index 5fc41c13ce86..222b63731f98 100644 --- a/base_location/readme/CONTRIBUTORS.md +++ b/base_location/readme/CONTRIBUTORS.md @@ -7,3 +7,4 @@ - Francesco Apruzzese \<\> - Dave Lasley \<\> - Aitor Bouzas \<\> +- Khoi (Kien Kim) \<\> diff --git a/base_location/readme/CREDITS.md b/base_location/readme/CREDITS.md index 887e247919bf..b159bddf2621 100644 --- a/base_location/readme/CREDITS.md +++ b/base_location/readme/CREDITS.md @@ -1 +1,5 @@ - Icon park: Icon http://icon-park.com/icon/location-map-pin-orange3/ + +The migration of this module from 17.0 to 18.0 was financially supported by: + +- Camptocamp. diff --git a/base_location/static/description/index.html b/base_location/static/description/index.html index 461b8acdc271..362bdd9f966d 100644 --- a/base_location/static/description/index.html +++ b/base_location/static/description/index.html @@ -444,6 +444,7 @@

Contributors

  • Francesco Apruzzese <f.apruzzese@apuliasoftware.it>
  • Dave Lasley <dave@laslabs.com>
  • Aitor Bouzas <aitor.bouzas@adaptivecity.com>
  • +
  • Khoi (Kien Kim) <khoikk@trobz.com>
  • @@ -451,6 +452,11 @@

    Other credits

    +

    The migration of this module from 17.0 to 18.0 was financially supported +by:

    +
      +
    • Camptocamp.
    • +

    Maintainers

    diff --git a/base_location/views/res_city_view.xml b/base_location/views/res_city_view.xml index 4e43e2c71338..b11423e1e93f 100644 --- a/base_location/views/res_city_view.xml +++ b/base_location/views/res_city_view.xml @@ -4,9 +4,9 @@ res.city - + - + 1 @@ -38,11 +38,11 @@ Cities ir.actions.act_window res.city - tree,form + list,form diff --git a/base_location/views/res_city_zip_view.xml b/base_location/views/res_city_zip_view.xml index 80f4d7063846..8198955a47b9 100644 --- a/base_location/views/res_city_zip_view.xml +++ b/base_location/views/res_city_zip_view.xml @@ -16,14 +16,14 @@ res.city.zip.tree res.city.zip - + - + @@ -40,7 +40,7 @@ Locations res.city.zip - tree,form + list,form diff --git a/base_location/views/res_country_view.xml b/base_location/views/res_country_view.xml index f56f3b37e4ab..fd3616e88be3 100644 --- a/base_location/views/res_country_view.xml +++ b/base_location/views/res_country_view.xml @@ -22,7 +22,6 @@ context="{'default_country_id': id, 'search_default_country_id': id}" string="Zips" > -