Browse Source

[FIX+IMP] base_location: Re-import process

* Performance was very poor due to several reasons:

  * City name translatable.
  * Lack on indexes when deleting obsolete records.
  * Some prefetching.
* City was not being searched also by state, having the chance of returning
  incorrect matches if same city name on different states.
* Previous code was removing all previous records of zip entries!
* Remove possible obsolete FK keys after migrating from v11.
14.0
Pedro M. Baeza 5 years ago
parent
commit
4436251852
  1. 4
      base_location/__manifest__.py
  2. 6
      base_location/i18n/am.po
  3. 6
      base_location/i18n/ar.po
  4. 6
      base_location/i18n/base_location.pot
  5. 6
      base_location/i18n/bg.po
  6. 6
      base_location/i18n/bs.po
  7. 6
      base_location/i18n/ca.po
  8. 6
      base_location/i18n/cs.po
  9. 10
      base_location/i18n/da.po
  10. 10
      base_location/i18n/de.po
  11. 6
      base_location/i18n/el_GR.po
  12. 6
      base_location/i18n/en_GB.po
  13. 10
      base_location/i18n/es.po
  14. 6
      base_location/i18n/es_AR.po
  15. 6
      base_location/i18n/es_CL.po
  16. 10
      base_location/i18n/es_CO.po
  17. 6
      base_location/i18n/es_CR.po
  18. 6
      base_location/i18n/es_DO.po
  19. 6
      base_location/i18n/es_EC.po
  20. 6
      base_location/i18n/es_ES.po
  21. 6
      base_location/i18n/es_MX.po
  22. 6
      base_location/i18n/es_PE.po
  23. 6
      base_location/i18n/es_PY.po
  24. 6
      base_location/i18n/es_VE.po
  25. 6
      base_location/i18n/et.po
  26. 6
      base_location/i18n/eu.po
  27. 6
      base_location/i18n/fa.po
  28. 6
      base_location/i18n/fi.po
  29. 10
      base_location/i18n/fr.po
  30. 6
      base_location/i18n/fr_CA.po
  31. 6
      base_location/i18n/fr_CH.po
  32. 6
      base_location/i18n/gl.po
  33. 6
      base_location/i18n/gl_ES.po
  34. 6
      base_location/i18n/he.po
  35. 6
      base_location/i18n/hr.po
  36. 10
      base_location/i18n/hr_HR.po
  37. 6
      base_location/i18n/hu.po
  38. 6
      base_location/i18n/id.po
  39. 10
      base_location/i18n/it.po
  40. 6
      base_location/i18n/ja.po
  41. 6
      base_location/i18n/ko.po
  42. 6
      base_location/i18n/lt.po
  43. 6
      base_location/i18n/lt_LT.po
  44. 6
      base_location/i18n/lv.po
  45. 6
      base_location/i18n/mk.po
  46. 6
      base_location/i18n/mn.po
  47. 6
      base_location/i18n/nb.po
  48. 6
      base_location/i18n/nb_NO.po
  49. 6
      base_location/i18n/nl.po
  50. 6
      base_location/i18n/nl_BE.po
  51. 10
      base_location/i18n/nl_NL.po
  52. 6
      base_location/i18n/pl.po
  53. 6
      base_location/i18n/pt.po
  54. 11
      base_location/i18n/pt_BR.po
  55. 10
      base_location/i18n/pt_PT.po
  56. 6
      base_location/i18n/ro.po
  57. 6
      base_location/i18n/ru.po
  58. 6
      base_location/i18n/sk.po
  59. 10
      base_location/i18n/sl.po
  60. 6
      base_location/i18n/sr.po
  61. 6
      base_location/i18n/sr@latin.po
  62. 6
      base_location/i18n/sv.po
  63. 6
      base_location/i18n/th.po
  64. 6
      base_location/i18n/tr.po
  65. 6
      base_location/i18n/tr_TR.po
  66. 6
      base_location/i18n/uk.po
  67. 6
      base_location/i18n/vi.po
  68. 6
      base_location/i18n/vi_VN.po
  69. 6
      base_location/i18n/zh_CN.po
  70. 6
      base_location/i18n/zh_TW.po
  71. 9
      base_location/models/res_city_zip.py
  72. 3
      base_location/models/res_partner.py

4
base_location/__manifest__.py

@ -1,10 +1,10 @@
# Copyright 2016 Nicolas Bessi, Camptocamp SA
# Copyright 2018-2019 Tecnativa - Pedro M. Baeza
# 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": "13.0.1.0.1",
"version": "13.0.1.1.0",
"depends": ["base_address_city", "contacts"],
"author": (
"Camptocamp,"

6
base_location/i18n/am.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/ar.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/base_location.pot

@ -48,6 +48,12 @@ msgstr ""
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"

6
base_location/i18n/bg.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/bs.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/ca.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/cs.po

@ -53,6 +53,12 @@ msgstr ""
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"

10
base_location/i18n/da.po

@ -54,6 +54,13 @@ msgstr "By"
msgid "City completion"
msgstr "Slå by/postnummer op"
#. 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 "Postnummer"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
@ -206,9 +213,6 @@ msgstr ""
msgid "Zips in this city"
msgstr ""
#~ msgid "City Code"
#~ msgstr "Postnummer"
#~ msgid "Country state"
#~ msgstr "Delstat/region"

10
base_location/i18n/de.po

@ -58,6 +58,13 @@ msgstr "Stadt"
msgid "City completion"
msgstr "Orts-Vervollständigung"
#. 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 "Ortskennung"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
@ -212,9 +219,6 @@ msgstr ""
msgid "Zips in this city"
msgstr ""
#~ msgid "City Code"
#~ msgstr "Ortskennung"
#~ msgid "Country state"
#~ msgstr "Bundesland"

6
base_location/i18n/el_GR.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/en_GB.po

@ -54,6 +54,12 @@ msgstr ""
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"

10
base_location/i18n/es.po

@ -56,6 +56,13 @@ msgstr "ID Ciudad"
msgid "City completion"
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"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
@ -209,9 +216,6 @@ msgstr ""
msgid "Zips in this city"
msgstr ""
#~ msgid "City Code"
#~ msgstr "Código de ciudad"
#~ msgid "Country state"
#~ msgstr "Provincia"

6
base_location/i18n/es_AR.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/es_CL.po

@ -54,6 +54,12 @@ msgstr ""
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"

10
base_location/i18n/es_CO.po

@ -57,6 +57,13 @@ msgstr "Ciudad"
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
#, fuzzy
msgid "City of Address"
msgstr "Código Ciudad"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
@ -208,8 +215,5 @@ msgstr ""
msgid "Zips in this city"
msgstr ""
#~ msgid "City Code"
#~ msgstr "Código Ciudad"
#~ msgid "Group By"
#~ msgstr "Agrupar por"

6
base_location/i18n/es_CR.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/es_DO.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/es_EC.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/es_ES.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/es_MX.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/es_PE.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/es_PY.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/es_VE.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/et.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/eu.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/fa.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/fi.po

@ -53,6 +53,12 @@ msgstr ""
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"

10
base_location/i18n/fr.po

@ -57,6 +57,13 @@ msgstr "Ville"
msgid "City completion"
msgstr "Complétion par ville"
#. 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 "Code de la ville"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
@ -209,9 +216,6 @@ msgstr ""
msgid "Zips in this city"
msgstr ""
#~ msgid "City Code"
#~ msgstr "Code de la ville"
#~ msgid "Country state"
#~ msgstr "Etat"

6
base_location/i18n/fr_CA.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/fr_CH.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/gl.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/gl_ES.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/he.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/hr.po

@ -54,6 +54,12 @@ msgstr ""
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"

10
base_location/i18n/hr_HR.po

@ -56,6 +56,13 @@ msgstr "Grad"
msgid "City completion"
msgstr "Popunjavanje grada"
#. 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 "Šifra grada"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
@ -208,9 +215,6 @@ msgstr ""
msgid "Zips in this city"
msgstr ""
#~ msgid "City Code"
#~ msgstr "Šifra grada"
#~ msgid "Country state"
#~ msgstr "Oblast/Županija"

6
base_location/i18n/hu.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/id.po

@ -53,6 +53,12 @@ msgstr ""
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"

10
base_location/i18n/it.po

@ -56,6 +56,13 @@ msgstr "ID città"
msgid "City completion"
msgstr "Completamento città"
#. 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 "Codice Città"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
@ -207,9 +214,6 @@ msgstr "CAP"
msgid "Zips in this city"
msgstr "CAP in questa città"
#~ msgid "City Code"
#~ msgstr "Codice Città"
#~ msgid "Country state"
#~ msgstr "Provincia Paese"

6
base_location/i18n/ja.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/ko.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/lt.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/lt_LT.po

@ -55,6 +55,12 @@ msgstr ""
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"

6
base_location/i18n/lv.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/mk.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/mn.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/nb.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/nb_NO.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/nl.po

@ -56,6 +56,12 @@ msgstr "Gemeente ID"
msgid "City completion"
msgstr "Gemeente aanvulling"
#. 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"

6
base_location/i18n/nl_BE.po

@ -54,6 +54,12 @@ msgstr ""
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"

10
base_location/i18n/nl_NL.po

@ -56,6 +56,13 @@ msgstr "Plaats"
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
#, fuzzy
msgid "City of Address"
msgstr "Plaatscode"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
@ -208,9 +215,6 @@ msgstr ""
msgid "Zips in this city"
msgstr ""
#~ msgid "City Code"
#~ msgstr "Plaatscode"
#~ msgid "Group By"
#~ msgstr "Groepeer op"

6
base_location/i18n/pl.po

@ -55,6 +55,12 @@ msgstr ""
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"

6
base_location/i18n/pt.po

@ -53,6 +53,12 @@ msgstr ""
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"

11
base_location/i18n/pt_BR.po

@ -57,6 +57,14 @@ msgstr "ID da Cidade"
msgid "City completion"
msgstr "Autocompletar de cidades"
#. 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 Code"
msgid "City of Address"
msgstr "Código da cidade"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
@ -216,9 +224,6 @@ msgstr "Ceps"
msgid "Zips in this city"
msgstr "Ceps desta cidade"
#~ msgid "City Code"
#~ msgstr "Código da cidade"
#~ msgid "Country state"
#~ msgstr "Estado"

10
base_location/i18n/pt_PT.po

@ -55,6 +55,13 @@ msgstr "Cidade"
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
#, fuzzy
msgid "City of Address"
msgstr "Código da Cidade"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
@ -207,9 +214,6 @@ msgstr ""
msgid "Zips in this city"
msgstr ""
#~ msgid "City Code"
#~ msgstr "Código da Cidade"
#~ msgid "Group By"
#~ msgstr "Agrupar por"

6
base_location/i18n/ro.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/ru.po

@ -55,6 +55,12 @@ msgstr ""
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"

6
base_location/i18n/sk.po

@ -53,6 +53,12 @@ msgstr ""
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"

10
base_location/i18n/sl.po

@ -55,6 +55,13 @@ msgstr "Kraj"
msgid "City completion"
msgstr "Izpolnjevanje kraja"
#. 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 "Koda kraja"
#. module: base_location
#: model:ir.model,name:base_location.model_res_city_zip
msgid "City/locations completion object"
@ -207,9 +214,6 @@ msgstr ""
msgid "Zips in this city"
msgstr ""
#~ msgid "City Code"
#~ msgstr "Koda kraja"
#~ msgid "Country state"
#~ msgstr "Zvezna država"

6
base_location/i18n/sr.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/sr@latin.po

@ -55,6 +55,12 @@ msgstr ""
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"

6
base_location/i18n/sv.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/th.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/tr.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/tr_TR.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/uk.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/vi.po

@ -53,6 +53,12 @@ msgstr ""
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"

6
base_location/i18n/vi_VN.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/zh_CN.po

@ -54,6 +54,12 @@ msgstr ""
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"

6
base_location/i18n/zh_TW.po

@ -54,6 +54,12 @@ msgstr ""
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"

9
base_location/models/res_city_zip.py

@ -14,7 +14,14 @@ class ResCityZip(models.Model):
_rec_name = "display_name"
name = fields.Char("ZIP", required=True)
city_id = fields.Many2one("res.city", "City", required=True)
city_id = fields.Many2one(
"res.city",
"City",
required=True,
auto_join=True,
ondelete="cascade",
index=True,
)
display_name = fields.Char(
compute="_compute_new_display_name", store=True, index=True
)

3
base_location/models/res_partner.py

@ -9,7 +9,8 @@ from odoo.exceptions import ValidationError
class ResPartner(models.Model):
_inherit = "res.partner"
zip_id = fields.Many2one("res.city.zip", "ZIP Location")
zip_id = fields.Many2one("res.city.zip", "ZIP Location", index=True)
city_id = fields.Many2one(index=True) # add index for performance
@api.onchange("city_id")
def _onchange_city_id(self):

Loading…
Cancel
Save