Browse Source

[MIG] base_location: Migration to 14.0

14.0
Pedro M. Baeza 4 years ago
parent
commit
1fc0d8b1fb
  1. 10
      base_location/README.rst
  2. 2
      base_location/__manifest__.py
  3. 16
      base_location/i18n/base_location.pot
  4. 54
      base_location/i18n/es.po
  5. 212
      base_location/i18n/es_ES.po
  6. 11
      base_location/models/res_company.py
  7. 6
      base_location/static/description/index.html
  8. 4
      base_location/views/res_company_view.xml

10
base_location/README.rst

@ -14,13 +14,13 @@ Location management (aka Better ZIP)
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github
:target: https://github.com/OCA/partner-contact/tree/13.0/base_location
:target: https://github.com/OCA/partner-contact/tree/14.0/base_location
:alt: OCA/partner-contact
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/partner-contact-13-0/partner-contact-13-0-base_location
:target: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-base_location
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/134/13.0
:target: https://runbot.odoo-community.org/runbot/134/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@ -63,7 +63,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/partner-contact/issues/new?body=module:%20base_location%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/partner-contact/issues/new?body=module:%20base_location%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
@ -110,6 +110,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/13.0/base_location>`_ project on GitHub.
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/14.0/base_location>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

2
base_location/__manifest__.py

@ -4,7 +4,7 @@
{
"name": "Location management (aka Better ZIP)",
"version": "13.0.1.1.0",
"version": "14.0.1.0.0",
"depends": ["base_address_city", "contacts"],
"author": (
"Camptocamp,"

16
base_location/i18n/base_location.pot

@ -4,8 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-24 18:00+0000\n"
"PO-Revision-Date: 2020-10-24 18:00+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -85,7 +87,10 @@ msgid "Created on"
msgstr ""
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city__display_name
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__display_name
#: model:ir.model.fields,field_description:base_location.field_res_company__display_name
#: model:ir.model.fields,field_description:base_location.field_res_partner__display_name
msgid "Display Name"
msgstr ""
@ -93,7 +98,8 @@ msgstr ""
#: model_terms:ir.actions.act_window,help:base_location.action_res_city_full
msgid ""
"Display and manage the list of all cities that can be assigned to\n"
" your partner records. Note that an option can be set on each country separately\n"
" your partner records. Note that an option can be set on each country\n"
" separately\n"
" to enforce any address of it to have a city in this list."
msgstr ""
@ -103,12 +109,18 @@ msgid "Enforce Cities"
msgstr ""
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city__id
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__id
#: model:ir.model.fields,field_description:base_location.field_res_company__id
#: model:ir.model.fields,field_description:base_location.field_res_partner__id
msgid "ID"
msgstr ""
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city____last_update
#: model:ir.model.fields,field_description:base_location.field_res_city_zip____last_update
#: model:ir.model.fields,field_description:base_location.field_res_company____last_update
#: model:ir.model.fields,field_description:base_location.field_res_partner____last_update
msgid "Last Modified on"
msgstr ""

54
base_location/i18n/es.po

@ -8,16 +8,16 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-13 03:42+0000\n"
"PO-Revision-Date: 2019-08-04 09:44+0000\n"
"POT-Creation-Date: 2020-10-24 18:00+0000\n"
"PO-Revision-Date: 2020-10-24 20:08+0200\n"
"Last-Translator: Josep M <jmyepes@mac.com>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.7.1\n"
"X-Generator: Poedit 2.3\n"
#. module: base_location
#: model:res.city,name:base_location.demo_brussels_city
@ -59,9 +59,8 @@ msgstr "Autocompletado a partir de la ciudad"
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_partner__city_id
#: model:ir.model.fields,field_description:base_location.field_res_users__city_id
#, fuzzy
msgid "City of Address"
msgstr "Código de ciudad"
msgstr "Ciudad de la dirección"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
@ -94,7 +93,10 @@ msgid "Created on"
msgstr "Creado en"
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city__display_name
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__display_name
#: model:ir.model.fields,field_description:base_location.field_res_company__display_name
#: model:ir.model.fields,field_description:base_location.field_res_partner__display_name
msgid "Display Name"
msgstr "Nombre mostrado"
@ -103,22 +105,33 @@ msgstr "Nombre mostrado"
msgid ""
"Display and manage the list of all cities that can be assigned to\n"
" your partner records. Note that an option can be set on each "
"country separately\n"
"country\n"
" separately\n"
" to enforce any address of it to have a city in this list."
msgstr ""
"Muestra y administra la lista de todas las ciudades que pueden ser \n"
"asignadas a sus contactos. Tenga en cuenta que en cada país se puede\n"
"establecer separadamente una opción para forzar que cualquier dirección\n"
"de ese país tenga que tener la ciudad rellenada."
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_company__country_enforce_cities
msgid "Enforce Cities"
msgstr ""
msgstr "Forzar ciudades"
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city__id
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__id
#: model:ir.model.fields,field_description:base_location.field_res_company__id
#: model:ir.model.fields,field_description:base_location.field_res_partner__id
msgid "ID"
msgstr "ID"
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city____last_update
#: model:ir.model.fields,field_description:base_location.field_res_city_zip____last_update
#: model:ir.model.fields,field_description:base_location.field_res_company____last_update
#: model:ir.model.fields,field_description:base_location.field_res_partner____last_update
msgid "Last Modified on"
msgstr "Modificado por última vez el"
@ -135,36 +148,35 @@ msgstr "Última actualización en"
#. module: base_location
#: model_terms:ir.ui.view,arch_db:base_location.view_partner_form
msgid "Location completion"
msgstr ""
msgstr "Completado de ubicación"
#. module: base_location
#: model:ir.actions.act_window,name:base_location.action_zip_tree
msgid "Locations"
msgstr ""
msgstr "Ubicaciones"
#. module: base_location
#: model_terms:ir.ui.view,arch_db:base_location.view_city_zip_filter
#, fuzzy
msgid "Search zip"
msgstr "Buscar ciudad"
msgstr "Buscar código postal"
#. module: base_location
#: code:addons/base_location/models/res_partner.py:0
#, python-format
msgid "The city of partner %s differs from that in location %s"
msgstr ""
msgstr "La ciudad del contacto %s difiere de la de la ubicación %s"
#. module: base_location
#: code:addons/base_location/models/res_partner.py:0
#, python-format
msgid "The country of the partner %s differs from that in location %s"
msgstr ""
msgstr "El país del contacto %s difiere del de la ubicación %s"
#. module: base_location
#: code:addons/base_location/models/res_partner.py:0
#, python-format
msgid "The state of the partner %s differs from that in location %s"
msgstr ""
msgstr "La provincia de contacto %s difiere de la de la ubicación %s"
#. module: base_location
#: model:ir.model.fields,help:base_location.field_res_company__zip_id
@ -178,6 +190,8 @@ msgid ""
"You already have a city with that name in the same state.The city must have "
"a unique name within it's state and it's country"
msgstr ""
"Tiene ya una ciudad con ese nombre en la misma provincia. La ciudad debe "
"tener un nombre único para la misma provincia y país."
#. module: base_location
#: model:ir.model.constraint,message:base_location.constraint_res_city_zip_name_city_uniq
@ -185,6 +199,8 @@ msgid ""
"You already have a zip with that code in the same city. The zip code must be "
"unique within it's city"
msgstr ""
"Ya tiene ese código postal en la misma ciudad. El código postal debe ser "
"único para una misma ciudad."
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__name
@ -196,12 +212,12 @@ msgstr "C.P."
#: model:ir.model.fields,field_description:base_location.field_res_partner__zip_id
#: model:ir.model.fields,field_description:base_location.field_res_users__zip_id
msgid "ZIP Location"
msgstr ""
msgstr "Ubicación"
#. module: base_location
#: model_terms:ir.ui.view,arch_db:base_location.city_zip_form
msgid "Zip"
msgstr ""
msgstr "C.P."
#. module: base_location
#: model:ir.ui.menu,name:base_location.locations_menu_zips
@ -209,12 +225,12 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:base_location.view_city_form
#: model_terms:ir.ui.view,arch_db:base_location.view_res_country_city_better_zip_form
msgid "Zips"
msgstr ""
msgstr "CPs"
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city__zip_ids
msgid "Zips in this city"
msgstr ""
msgstr "CPs en la ciudad"
#~ msgid "Country state"
#~ msgstr "Provincia"

212
base_location/i18n/es_ES.po

@ -1,212 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_location
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-22 03:38+0000\n"
"PO-Revision-Date: 2017-11-22 03:38+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Spanish (Spain) (https://www.transifex.com/oca/teams/23907/"
"es_ES/)\n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: base_location
#: model:res.city,name:base_location.demo_brussels_city
msgid "Brussels"
msgstr ""
#. module: base_location
#: model:ir.model.fields,help:base_location.field_res_company__country_enforce_cities
msgid ""
"Check this box to ensure every address created in that country has a 'City' "
"chosen in the list of the country's cities."
msgstr ""
#. module: base_location
#: model:ir.actions.act_window,name:base_location.action_res_city_full
#: model:ir.ui.menu,name:base_location.locations_menu_cities
msgid "Cities"
msgstr ""
#. module: base_location
#: model:ir.model,name:base_location.model_res_city
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__city_id
msgid "City"
msgstr ""
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_company__city_id
msgid "City ID"
msgstr ""
#. module: base_location
#: model_terms:ir.ui.view,arch_db:base_location.view_company_form_city
#: model_terms:ir.ui.view,arch_db:base_location.view_partner_form
msgid "City completion"
msgstr ""
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_partner__city_id
#: model:ir.model.fields,field_description:base_location.field_res_users__city_id
msgid "City of Address"
msgstr ""
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
msgstr ""
#. module: base_location
#: model:ir.model,name:base_location.model_res_company
msgid "Companies"
msgstr ""
#. module: base_location
#: model:ir.model,name:base_location.model_res_partner
msgid "Contact"
msgstr ""
#. module: base_location
#: model_terms:ir.ui.view,arch_db:base_location.view_country_search
msgid "Country"
msgstr ""
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__create_uid
msgid "Created by"
msgstr "Creado por"
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__create_date
msgid "Created on"
msgstr "Creado en"
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__display_name
msgid "Display Name"
msgstr "Nombre para mostrar"
#. module: base_location
#: model_terms:ir.actions.act_window,help:base_location.action_res_city_full
msgid ""
"Display and manage the list of all cities that can be assigned to\n"
" your partner records. Note that an option can be set on each "
"country separately\n"
" to enforce any address of it to have a city in this list."
msgstr ""
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_company__country_enforce_cities
msgid "Enforce Cities"
msgstr ""
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__id
msgid "ID"
msgstr "ID"
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city_zip____last_update
msgid "Last Modified on"
msgstr "Última modificación en"
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__write_uid
msgid "Last Updated by"
msgstr "Última actualización por"
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__write_date
msgid "Last Updated on"
msgstr "Última actualización en"
#. module: base_location
#: model_terms:ir.ui.view,arch_db:base_location.view_partner_form
msgid "Location completion"
msgstr ""
#. module: base_location
#: model:ir.actions.act_window,name:base_location.action_zip_tree
msgid "Locations"
msgstr ""
#. module: base_location
#: model_terms:ir.ui.view,arch_db:base_location.view_city_zip_filter
msgid "Search zip"
msgstr ""
#. module: base_location
#: code:addons/base_location/models/res_partner.py:0
#, python-format
msgid "The city of partner %s differs from that in location %s"
msgstr ""
#. module: base_location
#: code:addons/base_location/models/res_partner.py:0
#, python-format
msgid "The country of the partner %s differs from that in location %s"
msgstr ""
#. module: base_location
#: code:addons/base_location/models/res_partner.py:0
#, python-format
msgid "The state of the partner %s differs from that in location %s"
msgstr ""
#. module: base_location
#: model:ir.model.fields,help:base_location.field_res_company__zip_id
msgid "Use the city name or the zip code to search the location"
msgstr ""
#. module: base_location
#: model:ir.model.constraint,message:base_location.constraint_res_city_name_state_country_uniq
msgid ""
"You already have a city with that name in the same state.The city must have "
"a unique name within it's state and it's country"
msgstr ""
#. module: base_location
#: model:ir.model.constraint,message:base_location.constraint_res_city_zip_name_city_uniq
msgid ""
"You already have a zip with that code in the same city. The zip code must be "
"unique within it's city"
msgstr ""
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city_zip__name
msgid "ZIP"
msgstr ""
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_company__zip_id
#: model:ir.model.fields,field_description:base_location.field_res_partner__zip_id
#: model:ir.model.fields,field_description:base_location.field_res_users__zip_id
msgid "ZIP Location"
msgstr ""
#. module: base_location
#: model_terms:ir.ui.view,arch_db:base_location.city_zip_form
msgid "Zip"
msgstr ""
#. module: base_location
#: model:ir.ui.menu,name:base_location.locations_menu_zips
#: model_terms:ir.ui.view,arch_db:base_location.city_zip_tree
#: model_terms:ir.ui.view,arch_db:base_location.view_city_form
#: model_terms:ir.ui.view,arch_db:base_location.view_res_country_city_better_zip_form
msgid "Zips"
msgstr ""
#. module: base_location
#: model:ir.model.fields,field_description:base_location.field_res_city__zip_ids
msgid "Zips in this city"
msgstr ""

11
base_location/models/res_company.py

@ -38,10 +38,13 @@ class ResCompany(models.Model):
related="partner_id.country_id.enforce_cities"
)
def _get_company_address_fields(self, partner):
res = super()._get_company_address_fields(partner)
res["city_id"] = partner.city_id
res["zip_id"] = partner.zip_id
def _get_company_address_field_names(self):
"""Add to the list of field to populate in _compute_address the new
ZIP field + the city that is not handled at company level in
`base_address_city`.
"""
res = super()._get_company_address_field_names()
res += ["city_id", "zip_id"]
return res
def _inverse_city_id(self):

6
base_location/static/description/index.html

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/partner-contact/tree/13.0/base_location"><img alt="OCA/partner-contact" src="https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/partner-contact-13-0/partner-contact-13-0-base_location"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/134/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/partner-contact/tree/14.0/base_location"><img alt="OCA/partner-contact" src="https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-base_location"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/134/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module introduces a zip model that allows you to manage locations in a better way.</p>
<p>The zips will allow the users to complete automatically all address-related fields by just filling the zip.</p>
<p>Also allows different search filters.</p>
@ -412,7 +412,7 @@ ul.auto-toc {
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/partner-contact/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/partner-contact/issues/new?body=module:%20base_location%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/partner-contact/issues/new?body=module:%20base_location%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@ -454,7 +454,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/partner-contact/tree/13.0/base_location">OCA/partner-contact</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/partner-contact/tree/14.0/base_location">OCA/partner-contact</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

4
base_location/views/res_company_view.xml

@ -22,8 +22,8 @@
/>
</field>
<field name="city" position="attributes">
<attribute name="invisible">
[('country_enforce_cities', '=', True)]
<attribute name="attrs">
{'invisible': [('country_enforce_cities', '=', False)]}
</attribute>
</field>
</field>

Loading…
Cancel
Save