David Vidal
8 years ago
committed by
Alexandre Díaz
20 changed files with 1080 additions and 164 deletions
-
20base_location_nuts/README.rst
-
3base_location_nuts/__init__.py
-
35base_location_nuts/__manifest__.py
-
213base_location_nuts/i18n/de.po
-
2base_location_nuts/i18n/es.po
-
212base_location_nuts/i18n/fi.po
-
237base_location_nuts/i18n/it.po
-
213base_location_nuts/i18n/sl.po
-
11base_location_nuts/models/__init__.py
-
8base_location_nuts/models/res_country.py
-
66base_location_nuts/models/res_partner.py
-
29base_location_nuts/models/res_partner_nuts.py
-
3base_location_nuts/tests/__init__.py
-
90base_location_nuts/tests/test_base_location_nuts.py
-
10base_location_nuts/views/res_country_view.xml
-
11base_location_nuts/views/res_partner_nuts_view.xml
-
11base_location_nuts/views/res_partner_view.xml
-
3base_location_nuts/wizard/__init__.py
-
56base_location_nuts/wizard/nuts_import.py
-
11base_location_nuts/wizard/nuts_import_view.xml
@ -1,7 +1,4 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
############################################################################## |
|
||||
# For copyright and license notices, see __openerp__.py file in root directory |
|
||||
############################################################################## |
|
||||
|
|
||||
from . import models |
from . import models |
||||
from . import wizard |
from . import wizard |
@ -0,0 +1,213 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * base_location_nuts |
||||
|
# |
||||
|
# Translators: |
||||
|
# Rudolf Schnapka <rs@techno-flex.de>, 2015 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: partner-contact (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2015-11-25 01:50+0000\n" |
||||
|
"PO-Revision-Date: 2015-11-25 11:07+0000\n" |
||||
|
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>\n" |
||||
|
"Language-Team: German (https://www.transifex.com/oca/OCA-partner-contact-8-0/language/de/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: de\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Cancel" |
||||
|
msgstr "abbrechen" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,children:0 |
||||
|
msgid "Children" |
||||
|
msgstr "Untergeordnete" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,code:0 |
||||
|
msgid "Code" |
||||
|
msgstr "Schlüssel" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
#: field:res.partner.nuts,country_id:0 |
||||
|
msgid "Country" |
||||
|
msgstr "Land" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,create_uid:0 field:res.partner.nuts,create_uid:0 |
||||
|
msgid "Created by" |
||||
|
msgstr "erstellt von" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,create_date:0 field:res.partner.nuts,create_date:0 |
||||
|
msgid "Created on" |
||||
|
msgstr "erstellt am" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:130 |
||||
|
#, python-format |
||||
|
msgid "Downloaded file is not a valid XML file" |
||||
|
msgstr "Heruntergeladene Datei scheint keine gültige XML-Datei zu sein" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:122 |
||||
|
#, python-format |
||||
|
msgid "Got an error %d when trying to download the file %s." |
||||
|
msgstr "Erhielt einen Fehler %d beim Versuch die Datei %s herunter zu laden." |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:118 |
||||
|
#, python-format |
||||
|
msgid "Got an error when trying to download the file: %s." |
||||
|
msgstr "Erhielt einen Fehler beim Versuch die Datei %s herunterzuladen." |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
msgid "Group By" |
||||
|
msgstr "Gruppieren" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,id:0 field:res.partner.nuts,id:0 |
||||
|
msgid "ID" |
||||
|
msgstr "ID" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Import" |
||||
|
msgstr "Import" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.ui.menu,name:base_location_nuts.nuts_import_menu |
||||
|
msgid "Import NUTS 2013" |
||||
|
msgstr "Importiere NUTS 2013" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,name:base_location_nuts.nuts_import_action |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Import NUTS 2013 from RAMON" |
||||
|
msgstr "Importiere NUTS 2013 von RAMON" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_nuts_import |
||||
|
msgid "Import NUTS items from European RAMON service" |
||||
|
msgstr "Importiere NUTS-Elemente vom Europäischen RAMON-Dienst" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,write_uid:0 field:res.partner.nuts,write_uid:0 |
||||
|
msgid "Last Updated by" |
||||
|
msgstr "zuletzt aktualisiert von" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,write_date:0 field:res.partner.nuts,write_date:0 |
||||
|
msgid "Last Updated on" |
||||
|
msgstr "zuletzt aktualisiert am" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
#: field:res.partner.nuts,level:0 |
||||
|
msgid "Level" |
||||
|
msgstr "Stufe" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_res_partner_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.res_partner_nuts_form |
||||
|
msgid "NUTS Item" |
||||
|
msgstr "NUTS-Element" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,name:base_location_nuts.res_partner_nuts_action |
||||
|
#: model:ir.ui.menu,name:base_location_nuts.res_partner_nuts_menu |
||||
|
#: view:res.partner.nuts:base_location_nuts.res_partner_nuts_tree |
||||
|
msgid "NUTS Items" |
||||
|
msgstr "NUTS-Elemente" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,name:0 |
||||
|
msgid "Name" |
||||
|
msgstr "Name" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_left:0 |
||||
|
msgid "Parent Left" |
||||
|
msgstr "Übergeordnet links" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_right:0 |
||||
|
msgid "Parent Right" |
||||
|
msgstr "Übergeordnet rechts" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_id:0 |
||||
|
msgid "Parent id" |
||||
|
msgstr "Übergeordnet-ID" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_res_partner |
||||
|
msgid "Partner" |
||||
|
msgstr "Partner" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/models/res_partner.py:34 |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
#: field:res.partner,region:0 |
||||
|
#, python-format |
||||
|
msgid "Region" |
||||
|
msgstr "Region" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
msgid "Salesperson" |
||||
|
msgstr "Verkäufer" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
msgid "Search NUTS" |
||||
|
msgstr "Suche in NUTS" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,state_id:0 |
||||
|
msgid "State" |
||||
|
msgstr "Bundesland" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/models/res_partner.py:35 |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
#: field:res.partner,substate:0 |
||||
|
#, python-format |
||||
|
msgid "Substate" |
||||
|
msgstr "Unterstatus" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "" |
||||
|
"This wizard will download the lastest version of\n" |
||||
|
" NUTS 2013 from Europe RAMON metadata service.\n" |
||||
|
" Updating or creating new NUTS entries if not\n" |
||||
|
" found already in the system, and DELETING MISSING\n" |
||||
|
" ENTRIES from new downloaded file." |
||||
|
msgstr "Dieser Assisten lädt die neueste Version des NUTS vom Europäischen RAMON Metadatendienst herunter. NUTS-Einträge werden aktualisiert oder angelegt, wenn sie nicht bereits im System vorhanden sind und werden GELÖSCHT, wenn sie in der neuen Datei fehlen." |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:97 |
||||
|
#, python-format |
||||
|
msgid "Value not found for mandatory field %s" |
||||
|
msgstr "Wert für Pflichtfeld %s nicht gefunden" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.todo,note:base_location_nuts.config_wizard_nuts |
||||
|
msgid "You can import NUTS from RAMON european service." |
||||
|
msgstr "Sie können NUTS vom Europäischen RAMON-Dienst importieren" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,help:base_location_nuts.res_partner_nuts_action |
||||
|
msgid "" |
||||
|
"You must click at import wizard to populate NUTS items\n" |
||||
|
" in Odoo database in:\n" |
||||
|
" Sales > Configuration > Address Book > Localization > Import NUTS 2013" |
||||
|
msgstr "Sie müssen den Import-Assistenten wählen, um NUTS-Elemente aus NUTS in Odoo zu importieren:\nVerkauf -> Konfiguration -> Adressbuch Lokalisierung -> Importiere NUTS 2013" |
@ -0,0 +1,212 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * base_location_nuts |
||||
|
# |
||||
|
# Translators: |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: partner-contact (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2016-01-19 01:46+0000\n" |
||||
|
"PO-Revision-Date: 2015-10-06 13:57+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: Finnish (https://www.transifex.com/oca/OCA-partner-contact-8-0/language/fi/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: fi\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Cancel" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,children:0 |
||||
|
msgid "Children" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,code:0 |
||||
|
msgid "Code" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
#: field:res.partner.nuts,country_id:0 |
||||
|
msgid "Country" |
||||
|
msgstr "Maa" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,create_uid:0 field:res.partner.nuts,create_uid:0 |
||||
|
msgid "Created by" |
||||
|
msgstr "Luonut" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,create_date:0 field:res.partner.nuts,create_date:0 |
||||
|
msgid "Created on" |
||||
|
msgstr "Luotu" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:130 |
||||
|
#, python-format |
||||
|
msgid "Downloaded file is not a valid XML file" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:122 |
||||
|
#, python-format |
||||
|
msgid "Got an error %d when trying to download the file %s." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:118 |
||||
|
#, python-format |
||||
|
msgid "Got an error when trying to download the file: %s." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
msgid "Group By" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,id:0 field:res.partner.nuts,id:0 |
||||
|
msgid "ID" |
||||
|
msgstr "ID" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Import" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.ui.menu,name:base_location_nuts.nuts_import_menu |
||||
|
msgid "Import NUTS 2013" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,name:base_location_nuts.nuts_import_action |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Import NUTS 2013 from RAMON" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_nuts_import |
||||
|
msgid "Import NUTS items from European RAMON service" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,write_uid:0 field:res.partner.nuts,write_uid:0 |
||||
|
msgid "Last Updated by" |
||||
|
msgstr "Viimeksi päivitetty" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,write_date:0 field:res.partner.nuts,write_date:0 |
||||
|
msgid "Last Updated on" |
||||
|
msgstr "Viimeksi päivittänyt" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
#: field:res.partner.nuts,level:0 |
||||
|
msgid "Level" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_res_partner_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.res_partner_nuts_form |
||||
|
msgid "NUTS Item" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,name:base_location_nuts.res_partner_nuts_action |
||||
|
#: model:ir.ui.menu,name:base_location_nuts.res_partner_nuts_menu |
||||
|
#: view:res.partner.nuts:base_location_nuts.res_partner_nuts_tree |
||||
|
msgid "NUTS Items" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,name:0 |
||||
|
msgid "Name" |
||||
|
msgstr "Nimi" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_left:0 |
||||
|
msgid "Parent Left" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_right:0 |
||||
|
msgid "Parent Right" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_id:0 |
||||
|
msgid "Parent id" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_res_partner |
||||
|
msgid "Partner" |
||||
|
msgstr "Kumppani" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/models/res_partner.py:34 |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
#: field:res.partner,region:0 |
||||
|
#, python-format |
||||
|
msgid "Region" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
msgid "Salesperson" |
||||
|
msgstr "Myyjä" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
msgid "Search NUTS" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,state_id:0 |
||||
|
msgid "State" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/models/res_partner.py:35 |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
#: field:res.partner,substate:0 |
||||
|
#, python-format |
||||
|
msgid "Substate" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "" |
||||
|
"This wizard will download the lastest version of\n" |
||||
|
" NUTS 2013 from Europe RAMON metadata service.\n" |
||||
|
" Updating or creating new NUTS entries if not\n" |
||||
|
" found already in the system, and DELETING MISSING\n" |
||||
|
" ENTRIES from new downloaded file." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:97 |
||||
|
#, python-format |
||||
|
msgid "Value not found for mandatory field %s" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.todo,note:base_location_nuts.config_wizard_nuts |
||||
|
msgid "You can import NUTS from RAMON european service." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,help:base_location_nuts.res_partner_nuts_action |
||||
|
msgid "" |
||||
|
"You must click at import wizard to populate NUTS items\n" |
||||
|
" in Odoo database in:\n" |
||||
|
" Sales > Configuration > Address Book > Localization > Import NUTS 2013" |
||||
|
msgstr "" |
@ -0,0 +1,237 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * base_location_nuts |
||||
|
# |
||||
|
# Translators: |
||||
|
# Paolo Valier, 2016 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: partner-contact (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2016-03-13 00:57+0000\n" |
||||
|
"PO-Revision-Date: 2016-03-13 17:23+0000\n" |
||||
|
"Last-Translator: Paolo Valier\n" |
||||
|
"Language-Team: Italian (https://www.transifex.com/oca/OCA-partner-contact-8-0/language/it/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: it\n" |
||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Cancel" |
||||
|
msgstr "Annulla" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,child_ids:0 |
||||
|
msgid "Children" |
||||
|
msgstr "Figlio" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,code:0 |
||||
|
msgid "Code" |
||||
|
msgstr "Codice" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_res_country |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
#: field:res.partner.nuts,country_id:0 |
||||
|
msgid "Country" |
||||
|
msgstr "Nazione" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,create_uid:0 field:res.partner.nuts,create_uid:0 |
||||
|
msgid "Created by" |
||||
|
msgstr "Creato da" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,create_date:0 field:res.partner.nuts,create_date:0 |
||||
|
msgid "Created on" |
||||
|
msgstr "Creato il" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:128 |
||||
|
#, python-format |
||||
|
msgid "Downloaded file is not a valid XML file" |
||||
|
msgstr "Il file scaricato non è un file XML valido" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:120 |
||||
|
#, python-format |
||||
|
msgid "Got an error %d when trying to download the file %s." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:116 |
||||
|
#, python-format |
||||
|
msgid "Got an error when trying to download the file: %s." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
msgid "Group By" |
||||
|
msgstr "Raggruppa per" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,id:0 field:res.partner.nuts,id:0 |
||||
|
msgid "ID" |
||||
|
msgstr "ID" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Import" |
||||
|
msgstr "Importa" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.ui.menu,name:base_location_nuts.nuts_import_menu |
||||
|
msgid "Import NUTS 2013" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,name:base_location_nuts.nuts_import_action |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Import NUTS 2013 from RAMON" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_nuts_import |
||||
|
msgid "Import NUTS items from European RAMON service" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,write_uid:0 field:res.partner.nuts,write_uid:0 |
||||
|
msgid "Last Updated by" |
||||
|
msgstr "Ultimo aggiornamento di" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,write_date:0 field:res.partner.nuts,write_date:0 |
||||
|
msgid "Last Updated on" |
||||
|
msgstr "Ultimo aggiornamento il" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
#: field:res.partner.nuts,level:0 |
||||
|
msgid "Level" |
||||
|
msgstr "Livello" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: help:res.country,state_level:0 |
||||
|
msgid "Level for the state NUTS category." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.country:base_location_nuts.view_country_form |
||||
|
msgid "NUTS" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_res_partner_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.res_partner_nuts_form |
||||
|
msgid "NUTS Item" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,name:base_location_nuts.res_partner_nuts_action |
||||
|
#: model:ir.ui.menu,name:base_location_nuts.res_partner_nuts_menu |
||||
|
#: view:res.partner.nuts:base_location_nuts.res_partner_nuts_tree |
||||
|
msgid "NUTS Items" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
#: field:res.partner,nuts1_id:0 |
||||
|
msgid "NUTS L1" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
#: field:res.partner,nuts2_id:0 |
||||
|
msgid "NUTS L2" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
#: field:res.partner,nuts3_id:0 |
||||
|
msgid "NUTS L3" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
#: field:res.partner,nuts4_id:0 |
||||
|
msgid "NUTS L4" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,name:0 |
||||
|
msgid "Name" |
||||
|
msgstr "Nome" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_left:0 |
||||
|
msgid "Parent Left" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_right:0 |
||||
|
msgid "Parent Right" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_id:0 |
||||
|
msgid "Parent id" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_res_partner |
||||
|
msgid "Partner" |
||||
|
msgstr "Partner" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
msgid "Salesperson" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
msgid "Search NUTS" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,state_id:0 |
||||
|
msgid "State" |
||||
|
msgstr "Provincia" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.country,state_level:0 |
||||
|
msgid "State level" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "" |
||||
|
"This wizard will download the lastest version of\n" |
||||
|
" NUTS 2013 from Europe RAMON metadata service.\n" |
||||
|
" Updating or creating new NUTS entries if not\n" |
||||
|
" found already in the system, and DELETING MISSING\n" |
||||
|
" ENTRIES from new downloaded file." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:95 |
||||
|
#, python-format |
||||
|
msgid "Value not found for mandatory field %s" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.todo,note:base_location_nuts.config_wizard_nuts |
||||
|
msgid "You can import NUTS from RAMON european service." |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,help:base_location_nuts.res_partner_nuts_action |
||||
|
msgid "" |
||||
|
"You must click at import wizard to populate NUTS items\n" |
||||
|
" in Odoo database in:\n" |
||||
|
" Sales > Configuration > Address Book > Localization > Import NUTS 2013" |
||||
|
msgstr "" |
@ -0,0 +1,213 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * base_location_nuts |
||||
|
# |
||||
|
# Translators: |
||||
|
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: partner-contact (8.0)\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2015-10-09 15:48+0000\n" |
||||
|
"PO-Revision-Date: 2015-10-07 10:36+0000\n" |
||||
|
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n" |
||||
|
"Language-Team: Slovenian (https://www.transifex.com/oca/OCA-partner-contact-8-0/language/sl/)\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Language: sl\n" |
||||
|
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Cancel" |
||||
|
msgstr "Preklic" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,children:0 |
||||
|
msgid "Children" |
||||
|
msgstr "Podrejeni" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,code:0 |
||||
|
msgid "Code" |
||||
|
msgstr "Koda" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
#: field:res.partner.nuts,country_id:0 |
||||
|
msgid "Country" |
||||
|
msgstr "Država" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,create_uid:0 field:res.partner.nuts,create_uid:0 |
||||
|
msgid "Created by" |
||||
|
msgstr "Ustvaril" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,create_date:0 field:res.partner.nuts,create_date:0 |
||||
|
msgid "Created on" |
||||
|
msgstr "Ustvarjeno" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:130 |
||||
|
#, python-format |
||||
|
msgid "Downloaded file is not a valid XML file" |
||||
|
msgstr "Prenesena datoteka ni veljavna XML datoteka" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:122 |
||||
|
#, python-format |
||||
|
msgid "Got an error %d when trying to download the file %s." |
||||
|
msgstr "Napaka %d pri poskusu prenosa datoteke %s." |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:118 |
||||
|
#, python-format |
||||
|
msgid "Got an error when trying to download the file: %s." |
||||
|
msgstr "Napaka pri poskusu prenosa datoteke: %s." |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
msgid "Group By" |
||||
|
msgstr "Združi po" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,id:0 field:res.partner.nuts,id:0 |
||||
|
msgid "ID" |
||||
|
msgstr "ID" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Import" |
||||
|
msgstr "Uvoz" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.ui.menu,name:base_location_nuts.nuts_import_menu |
||||
|
msgid "Import NUTS 2013" |
||||
|
msgstr "Uvoz NUTS 2013" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,name:base_location_nuts.nuts_import_action |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "Import NUTS 2013 from RAMON" |
||||
|
msgstr "Uvoz NUTS 2013 iz RAMON" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_nuts_import |
||||
|
msgid "Import NUTS items from European RAMON service" |
||||
|
msgstr "Uvoz NUTS postavk iz evropske RAMON storitve" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,write_uid:0 field:res.partner.nuts,write_uid:0 |
||||
|
msgid "Last Updated by" |
||||
|
msgstr "Zadnji posodobil" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:nuts.import,write_date:0 field:res.partner.nuts,write_date:0 |
||||
|
msgid "Last Updated on" |
||||
|
msgstr "Zadnjič posodobljeno" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
#: field:res.partner.nuts,level:0 |
||||
|
msgid "Level" |
||||
|
msgstr "Nivo" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_res_partner_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.res_partner_nuts_form |
||||
|
msgid "NUTS Item" |
||||
|
msgstr "NUTS postavka" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,name:base_location_nuts.res_partner_nuts_action |
||||
|
#: model:ir.ui.menu,name:base_location_nuts.res_partner_nuts_menu |
||||
|
#: view:res.partner.nuts:base_location_nuts.res_partner_nuts_tree |
||||
|
msgid "NUTS Items" |
||||
|
msgstr "NUTS postavke" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,name:0 |
||||
|
msgid "Name" |
||||
|
msgstr "Naziv" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_left:0 |
||||
|
msgid "Parent Left" |
||||
|
msgstr "Levo nadrejeni" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_right:0 |
||||
|
msgid "Parent Right" |
||||
|
msgstr "Desno nadrejeni" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,parent_id:0 |
||||
|
msgid "Parent id" |
||||
|
msgstr "ID nadrejenega" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.model,name:base_location_nuts.model_res_partner |
||||
|
msgid "Partner" |
||||
|
msgstr "Partner" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/models/res_partner.py:34 |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
#: field:res.partner,region:0 |
||||
|
#, python-format |
||||
|
msgid "Region" |
||||
|
msgstr "Regija" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
msgid "Salesperson" |
||||
|
msgstr "Prodajalec" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:res.partner.nuts:base_location_nuts.view_res_partner_nuts_filter |
||||
|
msgid "Search NUTS" |
||||
|
msgstr "Iskanje NUTS" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: field:res.partner.nuts,state_id:0 |
||||
|
msgid "State" |
||||
|
msgstr "Zvezna država" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/models/res_partner.py:35 |
||||
|
#: view:res.partner:base_location_nuts.view_res_partner_filter_nuts |
||||
|
#: field:res.partner,substate:0 |
||||
|
#, python-format |
||||
|
msgid "Substate" |
||||
|
msgstr "Pod-država" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: view:nuts.import:base_location_nuts.nuts_import_form |
||||
|
msgid "" |
||||
|
"This wizard will download the lastest version of\n" |
||||
|
" NUTS 2013 from Europe RAMON metadata service.\n" |
||||
|
" Updating or creating new NUTS entries if not\n" |
||||
|
" found already in the system, and DELETING MISSING\n" |
||||
|
" ENTRIES from new downloaded file." |
||||
|
msgstr "Ta čarovnik bo prenesel zadnjo verzijo\n NUTS 2013 iz evropske RAMON metadata storitve.\n Posodabljanje ali ustvarjanje novih NUTS vnosov, če\n niso že v sistemu in BRISANJE MANJKAJOČIH\n VNOSOV iz prenesene datoteke." |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: code:addons/base_location_nuts/wizard/nuts_import.py:97 |
||||
|
#, python-format |
||||
|
msgid "Value not found for mandatory field %s" |
||||
|
msgstr "Vrednost obveznega polja %s ni najdena" |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.todo,note:base_location_nuts.config_wizard_nuts |
||||
|
msgid "You can import NUTS from RAMON european service." |
||||
|
msgstr "Uvozite lahko NUTS iz RAMON evropske storitve." |
||||
|
|
||||
|
#. module: base_location_nuts |
||||
|
#: model:ir.actions.act_window,help:base_location_nuts.res_partner_nuts_action |
||||
|
msgid "" |
||||
|
"You must click at import wizard to populate NUTS items\n" |
||||
|
" in Odoo database in:\n" |
||||
|
" Sales > Configuration > Address Book > Localization > Import NUTS 2013" |
||||
|
msgstr "Kliknite na čarovnik za uvoz za naselitev NUTS postavk\n v Odoo podatkovno bazo v:\n Prodaja > Nastavitve > Imenik > Lokalizacija > Uvoz NUTS 2013" |
@ -1,10 +1,5 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
# © 2015 Antiun Ingeniería S.L. - Antonio Espinosa |
|
||||
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis |
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
||||
|
|
||||
from . import ( |
|
||||
res_country, |
|
||||
res_partner_nuts, |
|
||||
res_partner, |
|
||||
) |
|
||||
|
from . import res_country |
||||
|
from . import res_partner |
||||
|
from . import res_partner_nuts |
@ -1,33 +1,32 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
# © 2015 Antiun Ingeniería S.L. - Antonio Espinosa |
|
||||
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis |
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com> |
||||
|
# Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com> |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
from openerp import models, fields |
|
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
class ResPartnerNuts(models.Model): |
class ResPartnerNuts(models.Model): |
||||
_name = 'res.partner.nuts' |
_name = 'res.partner.nuts' |
||||
_order = "parent_left" |
|
||||
_parent_order = "name" |
|
||||
|
_order = 'parent_left' |
||||
|
_parent_order = 'name' |
||||
_parent_store = True |
_parent_store = True |
||||
_description = "NUTS Item" |
|
||||
|
_description = 'NUTS Item' |
||||
|
|
||||
# NUTS fields |
# NUTS fields |
||||
level = fields.Integer(required=True) |
level = fields.Integer(required=True) |
||||
code = fields.Char(required=True) |
code = fields.Char(required=True) |
||||
name = fields.Char(required=True, translate=True) |
name = fields.Char(required=True, translate=True) |
||||
country_id = fields.Many2one(comodel_name='res.country', string="Country", |
|
||||
|
country_id = fields.Many2one(comodel_name='res.country', string='Country', |
||||
required=True) |
required=True) |
||||
state_id = fields.Many2one(comodel_name='res.country.state', |
state_id = fields.Many2one(comodel_name='res.country.state', |
||||
string='State') |
string='State') |
||||
# Parent hierarchy |
# Parent hierarchy |
||||
parent_id = fields.Many2one(comodel_name='res.partner.nuts', |
parent_id = fields.Many2one(comodel_name='res.partner.nuts', |
||||
ondelete='restrict') |
ondelete='restrict') |
||||
child_ids = fields.One2many( |
|
||||
'res.partner.nuts', |
|
||||
'parent_id', |
|
||||
"Children", |
|
||||
oldname="children") |
|
||||
parent_left = fields.Integer('Parent Left', select=True) |
|
||||
parent_right = fields.Integer('Parent Right', select=True) |
|
||||
|
child_ids = fields.One2many(comodel_name='res.partner.nuts', |
||||
|
inverse_name='parent_id', string='Children', |
||||
|
oldname='children') |
||||
|
parent_left = fields.Integer('Parent Left', index=True) |
||||
|
parent_right = fields.Integer('Parent Right', index=True) |
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
|
||||
|
from . import test_base_location_nuts |
@ -0,0 +1,90 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2017 David Vidal <david.vidal@tecnativa.com> |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
from odoo.tests import common |
||||
|
from odoo.exceptions import UserError |
||||
|
|
||||
|
|
||||
|
class TestBaseLocationNuts(common.SavepointCase): |
||||
|
@classmethod |
||||
|
def setUpClass(cls): |
||||
|
super(TestBaseLocationNuts, cls).setUpClass() |
||||
|
cls.importer = cls.env['nuts.import'] |
||||
|
cls.importer.run_import() # loads nuts |
||||
|
cls.country_1 = cls.env['res.country'].search([('code', '=', 'ES')]) |
||||
|
cls.country_2 = cls.env['res.country'].search([('code', '=', 'PT')]) |
||||
|
cls.nuts1_2 = cls.env[ |
||||
|
'res.partner.nuts'].search([('code', '=', 'PT')]) |
||||
|
cls.nuts2_1 = cls.env[ |
||||
|
'res.partner.nuts'].search([('code', '=', 'ES2')]) |
||||
|
cls.nuts3_1 = cls.env[ |
||||
|
'res.partner.nuts'].search([('code', '=', 'ES24')]) |
||||
|
cls.nuts4_1 = cls.env[ |
||||
|
'res.partner.nuts'].search([('code', '=', 'ES243')]) |
||||
|
cls.nuts4_2 = cls.env[ |
||||
|
'res.partner.nuts'].search([('code', '=', 'ES300')]) |
||||
|
cls.partner = cls.env['res.partner'].create({ |
||||
|
'name': 'Test partner', |
||||
|
'country_id': cls.country_1.id, |
||||
|
}) |
||||
|
cls.state_1 = cls.env['res.country.state'].create({ |
||||
|
'name': 'Zaragoza Test', |
||||
|
'code': 'ZT', |
||||
|
'country_id': cls.country_1.id, |
||||
|
}) |
||||
|
cls.nuts4_1.state_id = cls.state_1 |
||||
|
cls.state_2 = cls.env['res.country.state'].create({ |
||||
|
'name': 'Madrid Test', |
||||
|
'code': 'MT', |
||||
|
'country_id': cls.country_1.id, |
||||
|
}) |
||||
|
cls.nuts4_2.state_id = cls.state_2 |
||||
|
cls.country_1.state_level = 4 |
||||
|
|
||||
|
def test_onchange_nuts_country(self): |
||||
|
self.partner.nuts1_id = self.nuts1_2 |
||||
|
self.partner._onchange_nuts1_id() |
||||
|
self.assertEqual(self.partner.country_id, self.nuts1_2.country_id) |
||||
|
|
||||
|
def test_onchange_nuts(self): |
||||
|
self.partner.country_id = self.country_2 |
||||
|
self.partner._onchange_country_id() |
||||
|
self.assertEqual(self.partner.nuts1_id.country_id, |
||||
|
self.partner.country_id) |
||||
|
self.partner.nuts4_id = self.nuts4_1 |
||||
|
self.partner._onchange_nuts4_id() |
||||
|
self.assertEqual(self.partner.country_id, |
||||
|
self.country_1) |
||||
|
self.assertEqual(self.partner.nuts3_id, self.nuts3_1) |
||||
|
self.partner._onchange_nuts3_id() |
||||
|
self.assertEqual(self.partner.nuts2_id, self.nuts2_1) |
||||
|
self.partner._onchange_nuts2_id() |
||||
|
self.assertEqual(self.partner.nuts1_id.country_id, self.country_1) |
||||
|
self.partner.country_id = self.country_2 |
||||
|
self.partner._onchange_country_id() |
||||
|
self.assertEqual(self.partner.country_id, self.nuts1_2.country_id) |
||||
|
self.assertFalse(self.partner.nuts2_id) |
||||
|
self.assertFalse(self.partner.nuts3_id) |
||||
|
self.assertFalse(self.partner.nuts4_id) |
||||
|
|
||||
|
def test_onchange_states(self): |
||||
|
self.partner.state_id = self.state_2 |
||||
|
self.partner.onchange_state_id_base_location_nuts() |
||||
|
self.assertEqual(self.state_2, self.partner.nuts4_id.state_id) |
||||
|
self.partner.state_id = self.state_1 |
||||
|
self.partner.onchange_state_id_base_location_nuts() |
||||
|
self.assertEqual(self.state_1, self.partner.nuts4_id.state_id) |
||||
|
self.partner._onchange_nuts4_id() |
||||
|
self.assertEqual(self.partner.nuts3_id, self.nuts3_1) |
||||
|
self.partner._onchange_nuts3_id() |
||||
|
self.assertEqual(self.partner.nuts2_id, self.nuts2_1) |
||||
|
self.partner._onchange_nuts2_id() |
||||
|
self.assertEqual(self.partner.nuts1_id.country_id, self.country_1) |
||||
|
|
||||
|
def test_download_exceptions(self): |
||||
|
""" Tests download exceptions """ |
||||
|
with self.assertRaises(UserError): |
||||
|
self.importer._download_nuts(url_base='htttt://test.com') |
||||
|
with self.assertRaises(UserError): |
||||
|
self.importer._download_nuts(url_base='http://ec.europa.eu/_404') |
@ -1,6 +1,3 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
# © 2015 Antiun Ingeniería S.L. - Antonio Espinosa |
|
||||
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis |
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
||||
|
|
||||
from . import nuts_import |
from . import nuts_import |
Write
Preview
Loading…
Cancel
Save
Reference in new issue