Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][MIG] base_location: Migration to 14.0 #1003

Merged
merged 40 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
89ac818
[MV] rename better_zip to base_location
nbessi Jun 25, 2013
1c764a8
base_location: [IMP] Spanish translation and translation template.
Jun 25, 2013
10d0c49
[FIX] mutable default in function signature
nbessi Jul 9, 2013
d514dd8
[FIX] base_location: Changed partner view to avoid extrange behaviour…
Jul 31, 2013
4bf8c6b
[FIX] Add context propagation to base_location
Feb 11, 2014
077e61a
[Add] Add italian translation, change field class to edit-only for be…
Sep 22, 2014
ebb0d5d
base_location: Don't position zip_id after street2, to avoid layout i…
Dec 29, 2014
cf2c2e9
Danish translation
hhgabelgaard Jan 16, 2015
46427a4
[IMP] base_location: Updated to v8 syntax and uses. Added filters in …
Jan 18, 2015
8cd4925
[IMP] base_location_geonames_import: Several improvements and added h…
pedrobaeza Feb 25, 2015
73adbd0
Add demo data
Mar 16, 2015
12e14a0
IMP Create new computed stored field 'display_name' that use zip, cit…
jjscarafia Mar 21, 2015
b56c8c3
Translated to Danish
hhgabelgaard May 22, 2015
2562d80
[MIG] base_location: Migration to 9.0
yvaucher Oct 14, 2015
626eedd
[MIG] base_location: Migrated to 10.0
OpenCode Oct 19, 2016
c251817
[FIX][10.0] base_location : "better_zip_ids" field set colspan="2" i…
kitcharoenp Jan 5, 2017
676590f
[10.0][IMP] base_location(geonames): Add Lat/Long (#405)
lasley Apr 24, 2017
a8b45de
OCA Transbot updated translations from Transifex
oca-transbot Sep 18, 2016
e72a32b
[MIG] base_location
etobella Oct 18, 2017
6a531aa
OCA Transbot updated translations from Transifex
oca-transbot Nov 25, 2017
2539b2f
[IMP] base_location: Include onchange for state
pedrobaeza Apr 20, 2018
58c93fb
[IMP] base_location: name_search improvement (#585)
WohthaN May 16, 2018
57b5fd8
Translated using Weblate (Spanish)
etobella Jul 13, 2018
2e9c125
Translated using Weblate (German)
rschnapka Aug 22, 2018
67baf91
[MIG] base_location: Migration to 12.0
aitorbouzas Oct 8, 2018
8b29cac
[IMP] base_location: Add migration scripts
pedrobaeza Oct 16, 2018
e3cec66
FIX base_location blocking editing company address.
eLBati Mar 13, 2019
99aa1f1
Translated using Weblate (Spanish)
josepmy Aug 4, 2019
6b0bcc0
[FIX+MIG] base_location: 3 things:
pedrobaeza Aug 27, 2019
1da1248
[MIG] base_location: Migration to 13.0
pedrobaeza Sep 30, 2019
e07efcd
pre-commit, black, isort
OCA-git-bot Oct 12, 2019
96b98f2
[FIX] base_location: Don't apply domain when cities are not enforced
pedrobaeza Oct 15, 2019
32462b2
Translated using Weblate (Portuguese (Brazil))
mileo Nov 25, 2019
67d932d
Update translation files
oca-transbot Nov 26, 2019
873d79e
Translated using Weblate (Dutch)
Oocademy Mar 10, 2020
4436251
[FIX+IMP] base_location: Re-import process
pedrobaeza Apr 2, 2020
a1e37ec
Translated using Weblate (Portuguese (Brazil))
Jul 1, 2020
97ef1fb
[IMP] : black, isort, prettier
pedrobaeza Oct 18, 2020
1fc0d8b
[MIG] base_location: Migration to 14.0
pedrobaeza Oct 24, 2020
4a71fae
[IMP] base_location: Switch to computed writable fields
pedrobaeza Nov 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions base_location/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
====================================
Location management (aka Better ZIP)
====================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
: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/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-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/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module introduces a zip model that allows you to manage locations in a better way.

The zips will allow the users to complete automatically all address-related fields by just filling the zip.
Copy link
Contributor

@NL66278 NL66278 Nov 28, 2020

Choose a reason for hiding this comment

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

Actually not all address related fields. You will not be able to fill in house_number and door_number from the zip. In most countries also not the street. Maybe replace 'all' with 'many'?

Copy link
Member Author

Choose a reason for hiding this comment

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

AFAIK, that fields are added through extension modules, so it's OK to say that with current dependency set.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is only a minor point anyway. Very glad with the module as is. But street is also not filled automatically, and this is definitely also address related.

Copy link
Member Author

@pedrobaeza pedrobaeza Nov 28, 2020

Choose a reason for hiding this comment

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

Yeah, I get your point about the street, although it's impossible to fill a not known data derived from the ZIP. If I read the text, I understand that the "address-related" text refers exactly to this: the address fields that are linked with the ZIP, not the non related ones, and street (and the others) is not related, as a ZIP code contains a lot of streets.


Also allows different search filters.

**Table of contents**

.. contents::
:local:

Configuration
=============

#. Go to *Contacts / Configuration / Localization / Cities*.
#. Create a new City.

#. Go to *Contacts / Configuration / Localization / Zips*.
#. Create a new Zip and relate it to the city (you can also create the Zip from the City).

or, with module 'Contacts Directory' installed:
#. Go to *Contacts / Configuration / Localization / Countries*.
#. Locate the desired country.
#. Press on the button 'Cities' / 'Zips'.

Usage
=====

#. Access a partner record
#. Fill the field *Location completion*
#. Information about country, state, city and zip will be filled automatically

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:%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.

Credits
=======

Authors
~~~~~~~

* Camptocamp
* ACYSOS S.L.
* Alejandro Santana
* Tecnativa
* AdaptiveCity

Contributors
~~~~~~~~~~~~

* Nicolas Bessi (Camptocamp)
* Ignacio Ibeas (Acysos S.L.)
* Pedro M. Baeza <[email protected]>
* Alejandro Santana <[email protected]>
* Sandy Carter <[email protected]>
* Yannick Vaucher <[email protected]>
* Francesco Apruzzese <[email protected]>
* Dave Lasley <[email protected]>
* Aitor Bouzas <[email protected]>

Other credits
~~~~~~~~~~~~~

* Icon park: `Icon http://icon-park.com/icon/location-map-pin-orange3/`

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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/14.0/base_location>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions base_location/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
31 changes: 31 additions & 0 deletions base_location/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2016 Nicolas Bessi, Camptocamp SA
# Copyright 2018-2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Location management (aka Better ZIP)",
"version": "14.0.1.0.0",
"depends": ["base_address_city", "contacts"],
"author": (
"Camptocamp,"
"ACYSOS S.L.,"
"Alejandro Santana,"
"Tecnativa,"
"AdaptiveCity,"
"Odoo Community Association (OCA)"
),
"license": "AGPL-3",
"summary": """Enhanced zip/npa management system""",
"website": "https://github.com/OCA/partner-contact",
"data": [
"security/ir.model.access.csv",
"views/res_city_zip_view.xml",
"views/res_city_view.xml",
"views/res_country_view.xml",
"views/res_company_view.xml",
"views/res_partner_view.xml",
],
"demo": ["demo/res_city_zip.xml"],
"installable": True,
"auto_install": False,
}
11 changes: 11 additions & 0 deletions base_location/demo/res_city_zip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="demo_brussels_city" model="res.city">
<field name="name">Brussels</field>
<field name="country_id" ref="base.be" />
</record>
<record id="demo_brussels_zip" model="res.city.zip">
<field name="name">1000</field>
<field name="city_id" ref="demo_brussels_city" />
</record>
</odoo>
211 changes: 211 additions & 0 deletions base_location/i18n/am.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_location
#
# Translators:
# OCA Transbot <[email protected]>, 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 <[email protected]>, 2017\n"
"Language-Team: Amharic (https://www.transifex.com/oca/teams/23907/am/)\n"
"Language: am\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 ""

#. 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 ""

#. 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 ""
Loading