summaryrefslogtreecommitdiff
path: root/addons/import_base
diff options
context:
space:
mode:
authorRajesh Prajapati (OpenERP) <rpr@tinyerp.com>2012-10-05 17:35:03 +0530
committerRajesh Prajapati (OpenERP) <rpr@tinyerp.com>2012-10-05 17:35:03 +0530
commitcdff4611b0a588546afb9b706bbd2d0fbda7bf2f (patch)
tree0a0a99b33e52547987ab69b2a29f3ec23c188142 /addons/import_base
parent7202b8f7efbc76e2a40b1a4a8d7a95ed0d2ce573 (diff)
parentba97319054728490e4d8a601382dd6fd2ab4f970 (diff)
[MERGE] merge with main addons
bzr revid: rpr@tinyerp.com-20121005120503-07e0zo8ucv8k0q3s
Diffstat (limited to 'addons/import_base')
-rw-r--r--addons/import_base/__init__.py25
-rw-r--r--addons/import_base/__openerp__.py40
-rw-r--r--addons/import_base/i18n/ar.po100
-rw-r--r--addons/import_base/i18n/de.po105
-rw-r--r--addons/import_base/i18n/es_CR.po105
-rw-r--r--addons/import_base/i18n/fi.po104
-rw-r--r--addons/import_base/i18n/fr.po105
-rw-r--r--addons/import_base/i18n/import_base.pot100
-rw-r--r--addons/import_base/i18n/ja.po104
-rw-r--r--addons/import_base/i18n/nb.po105
-rw-r--r--addons/import_base/i18n/nl.po106
-rw-r--r--addons/import_base/i18n/pl.po105
-rw-r--r--addons/import_base/i18n/pt.po105
-rw-r--r--addons/import_base/i18n/pt_BR.po105
-rw-r--r--addons/import_base/i18n/ro.po104
-rw-r--r--addons/import_base/i18n/sv.po105
-rw-r--r--addons/import_base/i18n/tr.po106
-rw-r--r--addons/import_base/i18n/zh_CN.po104
-rw-r--r--addons/import_base/import_base_view.xml6
-rw-r--r--addons/import_base/import_framework.py501
-rw-r--r--addons/import_base/mapper.py171
21 files changed, 0 insertions, 2411 deletions
diff --git a/addons/import_base/__init__.py b/addons/import_base/__init__.py
deleted file mode 100644
index 52366e5128a..00000000000
--- a/addons/import_base/__init__.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Openerp sa (<http://openerp.com>).
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-import import_framework
-import mapper
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_base/__openerp__.py b/addons/import_base/__openerp__.py
deleted file mode 100644
index 72c4759f735..00000000000
--- a/addons/import_base/__openerp__.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-{
- 'name': 'Framework for Complex Import',
- 'version': '0.9',
- 'category': 'Hidden/Dependency',
- 'description': """
-This module provide a class import_framework to help importing complex data from other software.
-================================================================================================
- """,
- 'author': 'OpenERP SA',
- 'website': 'http://www.openerp.com',
- 'depends': ['base','mail'],
- 'data': ['import_base_view.xml'],
- 'demo': [],
- 'test': [], #TODO provide test
- 'installable': True,
- 'auto_install': False,
-}
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_base/i18n/ar.po b/addons/import_base/i18n/ar.po
deleted file mode 100644
index fd1e7b117f7..00000000000
--- a/addons/import_base/i18n/ar.po
+++ /dev/null
@@ -1,100 +0,0 @@
-# Arabic translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-04-06 07:49+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Arabic <ar@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr ""
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "إستيراد"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr ""
diff --git a/addons/import_base/i18n/de.po b/addons/import_base/i18n/de.po
deleted file mode 100644
index dc9beeb2104..00000000000
--- a/addons/import_base/i18n/de.po
+++ /dev/null
@@ -1,105 +0,0 @@
-# German translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-02-09 15:22+0000\n"
-"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
-"Language-Team: German <de@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "Der Import schlug fehl - unerwarteter Fehler"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "begann um %s und eendete um %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "Der Import Ihrer Daten endete um %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"schlug aber fehl, keine Daten wurden importiert um Inkonsistenzen zu "
-"vermeiden.\n"
-"Fehler : \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"Der Import der Daten\n"
-" Instanz Name : %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s wurde erfolgreich importiert von: %s %s, %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "Der Datenimport schlug fehl %s infolge eines unvorhergesehen Fehlers"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Import abgeschlossen, Benachrichtigung per Mail versandt"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s ist kein gültiger Modellname"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "Import"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "ohne Warnung"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "mit Warnung : %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " importierte Felder : "
diff --git a/addons/import_base/i18n/es_CR.po b/addons/import_base/i18n/es_CR.po
deleted file mode 100644
index 5c8fd805801..00000000000
--- a/addons/import_base/i18n/es_CR.po
+++ /dev/null
@@ -1,105 +0,0 @@
-# Spanish (Costa Rica) translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-02-17 15:38+0000\n"
-"Last-Translator: Freddy Gonzalez <freddy.gonzalez.contreras@gmail.com>\n"
-"Language-Team: Spanish (Costa Rica) <es_CR@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "Importación ha fallado debido a un error inesperado"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "iniciado en %s y finalizado en %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "La importación de los datos a finalizado en %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"pero no pudo, en consecuencia, no hay datos fueron importados a mantener la "
-"coherencia de base de datos\n"
-" error: \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"La importación de los datos\n"
-" nombre de la instancia: %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s asido exitosamente importados desde %s %s, %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "Importación de datos falló en% s debido a un error inesperado"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Importar a finalizado, notificación de correo electrónico enviado"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s no es un nombre de modelo válido"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "Importar"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "sin previo aviso"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "con aviso : %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " Archivos importados : "
diff --git a/addons/import_base/i18n/fi.po b/addons/import_base/i18n/fi.po
deleted file mode 100644
index e71bd392766..00000000000
--- a/addons/import_base/i18n/fi.po
+++ /dev/null
@@ -1,104 +0,0 @@
-# Finnish translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-03-26 06:59+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Finnish <fi@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "Tuonti epäonnistui tuntemattoman virheen takia"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "aloitettu %s ja valmistui %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "Tietojen tuonti valmistui %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"mutta epäonnistui, tietojen yhtenäisyyden säilyttämiseksi tietoja ei tuotu \n"
-" virhe: \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"Tietojen tuonti \n"
-" Instanssin nimi: %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s on onnistuneesti tuotu %s %s, %s :stä \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "Tietojen tuonti epäonnistui %s:ssä tuntemattoman virheen takia"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Tuonti valmis, muistutussähköposti on lähetety"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s ei ole sallittu mallin nimi"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "Tuo"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "ei varoituksia"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "varoituksella : %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " Tuodut kentät : "
diff --git a/addons/import_base/i18n/fr.po b/addons/import_base/i18n/fr.po
deleted file mode 100644
index ddead31a789..00000000000
--- a/addons/import_base/i18n/fr.po
+++ /dev/null
@@ -1,105 +0,0 @@
-# French translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-03-05 21:56+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: French <fr@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "Échec de l'importation en raison d'une erreur inattendue"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "commencé à %s et terminé à %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "Import de vos données terminé à %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"mais n'a pas réussi, en conséquence aucune donnée n'a été importée pour "
-"maintenir la cohérence de base de données \n"
-" erreur : \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"Import des données\n"
-" nom de l'instance : %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s a été correctement importé de %s %s, %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "Échec de l'importation à %s en raison d'une erreur inattendue"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Importation terminée, un courriel de notification a été envoyé"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s n'est pas un nom de modèle valide"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "sans avertissement"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "avec avertissement : %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " champs importés : "
diff --git a/addons/import_base/i18n/import_base.pot b/addons/import_base/i18n/import_base.pot
deleted file mode 100644
index cc227de8993..00000000000
--- a/addons/import_base/i18n/import_base.pot
+++ /dev/null
@@ -1,100 +0,0 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-# * import_base
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: OpenERP Server 6.1rc1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-02-08 00:36+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-""
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid "but failed, in consequence no data were imported to keep database consistency \n"
-" error : \n"
-""
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid "The import of data \n"
-" instance name : %s \n"
-""
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-""
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr ""
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr ""
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr ""
-
diff --git a/addons/import_base/i18n/ja.po b/addons/import_base/i18n/ja.po
deleted file mode 100644
index 6c1d5aef0c7..00000000000
--- a/addons/import_base/i18n/ja.po
+++ /dev/null
@@ -1,104 +0,0 @@
-# Japanese translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-05-24 18:29+0000\n"
-"Last-Translator: Akira Hiyama <Unknown>\n"
-"Language-Team: Japanese <ja@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "予期しないエラーでインポートが失敗しました。"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "%s で起動し %s で終了 \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "データのインポートは %s で終了しました。"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"失敗しました。結果としてデータベースの整合性維持のためデータはインポートされませんでした。 \n"
-" エラー: \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"データのインポート\n"
-" インスタンス名:%s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s は正常にインポートされました。元:%s %s、%s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "データインポートは %s で予期しないエラーのため失敗しました。"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "インポートが完了しました。通知メールが送信されました。"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s は有効なモデル名ではありません。"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "インポート"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "警告なしで"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "警告付きで:%s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " 項目がインポートされました: "
diff --git a/addons/import_base/i18n/nb.po b/addons/import_base/i18n/nb.po
deleted file mode 100644
index 62b30d04da6..00000000000
--- a/addons/import_base/i18n/nb.po
+++ /dev/null
@@ -1,105 +0,0 @@
-# Norwegian Bokmal translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-09-08 19:39+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Norwegian Bokmal <nb@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-09-09 04:52+0000\n"
-"X-Generator: Launchpad (build 15914)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "Import mislyktes på grunn av en uventet feil."
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "Startet på% s og ferdig på% s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "Import av dine data ferdig på% s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"Men mislyktes, i følge ingen data ble importert for å holde databasen "
-"konsistens\n"
-"  feil: \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"Import av data\n"
-" Eksempel navn:% s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "% s har blitt importert fra% s% s,% s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "Dataimport mislyktes ved% s på grunn av en uventet feil."
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Import ferdig, e-postmelding sendt."
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "% s er ikke en gyldig modellnavn."
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "Import"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "Uten advarsel."
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "Med advarsel :%s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " Felt importert: "
diff --git a/addons/import_base/i18n/nl.po b/addons/import_base/i18n/nl.po
deleted file mode 100644
index d4f898f4f10..00000000000
--- a/addons/import_base/i18n/nl.po
+++ /dev/null
@@ -1,106 +0,0 @@
-# Dutch translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-02-21 18:42+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Dutch <nl@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "Import is mislukt door een onverwachte fout"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "gestart op %s en geëindigd op %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "Import van uw gegevens geëindigd op %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"maar mislukt, waardoor geen gegevens zijn geïmporteerd, zodat de database "
-"consistent blijft \n"
-" fout: \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"De import van gegevens \n"
-"\n"
-" instantie naam: %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s is succesvol geïmporteerd van %s %s, %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "Gegevens import mislukt op %s door een onverwachte fout"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Import beëindigd. Notificatie e-mail is verzonden"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s is geen geldige model naam"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "Importeren"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "met geen waarsschuwing"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "met waarschuwing: %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " velden geïmporteerd: "
diff --git a/addons/import_base/i18n/pl.po b/addons/import_base/i18n/pl.po
deleted file mode 100644
index 41a324caa79..00000000000
--- a/addons/import_base/i18n/pl.po
+++ /dev/null
@@ -1,105 +0,0 @@
-# Polish translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-02-25 20:41+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Polish <pl@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "Import nieudany z nieznanego powodu"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "rozpoczęty %s i zakończony %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "Import danych zakończony o %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"ale nieudany, w konsekwencji żadne dane nie zostały zaimportowane, aby "
-"utrzymać spójność bazy danych \n"
-" błąd : \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"Import danych \n"
-" nazwa instancji : %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s zostało poprawnie zaimportowanych z %s %s, %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "Import danych nie powiódł się o %s z nieznanego powodu"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Import zakończony, mail informacyjny wysłany"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s nie jest dozwoloną nazwą modelu"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "Importuj"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "bez ostrzeżeń"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "z ostrzeżeniami : %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " zaimportowane pola : "
diff --git a/addons/import_base/i18n/pt.po b/addons/import_base/i18n/pt.po
deleted file mode 100644
index af93410892a..00000000000
--- a/addons/import_base/i18n/pt.po
+++ /dev/null
@@ -1,105 +0,0 @@
-# Portuguese translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-04-09 13:46+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Portuguese <pt@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "A importação falhou devido a um erro inesperado"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "começado em %s e finalizado em %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "Importação de dados terminou em %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"mas não conseguiu, em consequência da não existência de dados, foram "
-"importados para manter a consistência do banco de dados \n"
-" erro: \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"Importação de dados \n"
-" nome da instância: %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s foi importado com sucesso para %s %s,%s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "Importação de dados falhada em %s devido a um erro inesperado"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Importação concluída, notificação enviada para o email"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s não é um nome de modelo válido"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "Importar"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "Sem avisos"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "com aviso: %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " campos importados: "
diff --git a/addons/import_base/i18n/pt_BR.po b/addons/import_base/i18n/pt_BR.po
deleted file mode 100644
index 476a54ec7bb..00000000000
--- a/addons/import_base/i18n/pt_BR.po
+++ /dev/null
@@ -1,105 +0,0 @@
-# Brazilian Portuguese translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-08-01 01:59+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "A importação falhou devido a um erro inesperado"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "Início em %s e término em %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "A Importação de seus dados terminou em %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"mas falhou, por isso nenhum dado foi importado para manter a consistência do "
-"banco de dados \n"
-" erro: \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"A importação de dados \n"
-" nome da instância: %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s foi importada com sucesso de %s %s, %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "A importação falhou em %s devido a um erro inesperado"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Importação Concluída, o email de notificação foi enviado"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s não é um nome de modelo válido"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "Importar"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "sem nenhum erro"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "com avisos: %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " campos importados: "
diff --git a/addons/import_base/i18n/ro.po b/addons/import_base/i18n/ro.po
deleted file mode 100644
index 3f873c90a09..00000000000
--- a/addons/import_base/i18n/ro.po
+++ /dev/null
@@ -1,104 +0,0 @@
-# Romanian translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-05-26 19:17+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Romanian <ro@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "Importul a esuat datorita unei greseli neasteptate"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "inceput la %s si finalizat la %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "Importul datelor d-voastra s-a finalizat la %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"dar a esuat, in consecinta nu au fost importate datele pentru a mentine "
-"consistenta bazei de date \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"Importul datelor \n"
-" nume instanta : %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s a fost importat cu succes de la %s %s, %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "Importul de date a esuat la %s datorita unei erori neasteptate"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Importul s-a finalizat, a fost trimis e-mail-ul de instiintare"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s nu este nu nume valid de model"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "Importati"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "fara avertizare"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "cu avertizare : %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " campuri importate : "
diff --git a/addons/import_base/i18n/sv.po b/addons/import_base/i18n/sv.po
deleted file mode 100644
index 885b055355a..00000000000
--- a/addons/import_base/i18n/sv.po
+++ /dev/null
@@ -1,105 +0,0 @@
-# Swedish translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-06-04 10:28+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Swedish <sv@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "Import misslyckades på grund av oväntat fel"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "Startade på %s och avslutade på %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "Importen av dina data avslutades på %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"men misslyckades, till följd att inga data importerades för att hålla "
-"databasen konsistent\n"
-"  fel: \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"Importen av data \n"
-" instans namn: %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s har importerats från %s %s, %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "Data import misslyckades vid %s på grund av ett oväntat fel"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Import genomförd, e-post notifiering har skickats"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s är inte ett tillåtet modellnamn"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "Import"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "utan varning"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "med varning: %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " importerade fält: "
diff --git a/addons/import_base/i18n/tr.po b/addons/import_base/i18n/tr.po
deleted file mode 100644
index f8d023f06fb..00000000000
--- a/addons/import_base/i18n/tr.po
+++ /dev/null
@@ -1,106 +0,0 @@
-# Turkish translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-02-09 22:46+0000\n"
-"Last-Translator: Ahmet Altınışık <Unknown>\n"
-"Language-Team: Turkish <tr@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "Beklenmeyen hata nedeniyle içeri aktarım yapılamadı"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "Başlama zamanı %s bitiş zamanı %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "Veri aktarımı bitiş zamanı %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr ""
-"ama başarısız oldu, sonuç olarak veri tutarlılığını korumak için hiçbir veri "
-"içeri aktarılmadı \n"
-" hata: \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"Veri Aktarımı \n"
-" Kurulum adı: %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr "%s başarılı şekide içeri aktarıldı, kaynak %s %s, %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr ""
-"beklenmeyen bir hata sebebiyle Veri aktarımı başarısız oldu, yer %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "Aktarım tamamlandı, bildirim e-postası gönderildi"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s geçerli bir model adı değil"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "İçe aktar"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "Uyarı olmadan"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "Uyarılar ile birlikte: %s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " alan aktarıldı : "
diff --git a/addons/import_base/i18n/zh_CN.po b/addons/import_base/i18n/zh_CN.po
deleted file mode 100644
index 2545919e0e9..00000000000
--- a/addons/import_base/i18n/zh_CN.po
+++ /dev/null
@@ -1,104 +0,0 @@
-# Chinese (Simplified) translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-02-08 00:36+0000\n"
-"PO-Revision-Date: 2012-02-13 05:01+0000\n"
-"Last-Translator: Jeff Wang <wjfonhand@hotmail.com>\n"
-"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:42+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:434
-#, python-format
-msgid "Import failed due to an unexpected error"
-msgstr "导入失败,发生了未知的错误。"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:461
-#, python-format
-msgid "started at %s and finished at %s \n"
-msgstr "从 %s 开始, 到 %s 结束 \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:448
-#, python-format
-msgid "Import of your data finished at %s"
-msgstr "您的数据导入在 %s 完成"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:463
-#, python-format
-msgid ""
-"but failed, in consequence no data were imported to keep database "
-"consistency \n"
-" error : \n"
-msgstr "但失败了,为了保证数据库的完整性,本次导入的数据被忽略。 \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:477
-#, python-format
-msgid ""
-"The import of data \n"
-" instance name : %s \n"
-msgstr ""
-"数据导入\n"
-" 实例名称:%s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:470
-#, python-format
-msgid "%s has been successfully imported from %s %s, %s \n"
-msgstr ""
-"Copy text \t\n"
-"成功导入了%s,来自 %s %s, %s \n"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:447
-#, python-format
-msgid "Data Import failed at %s due to an unexpected error"
-msgstr "导入数据失败在 %s,失败原因未知"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:436
-#, python-format
-msgid "Import finished, notification email sended"
-msgstr "导入完成,已发送通知邮件。"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:190
-#, python-format
-msgid "%s is not a valid model name"
-msgstr "%s 不是一个正确的模型名称"
-
-#. module: import_base
-#: model:ir.ui.menu,name:import_base.menu_import_crm
-msgid "Import"
-msgstr "导入"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:467
-#, python-format
-msgid "with no warning"
-msgstr "没有警告"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:469
-#, python-format
-msgid "with warning : %s"
-msgstr "有警告:%s"
-
-#. module: import_base
-#: code:addons/import_base/import_framework.py:191
-#, python-format
-msgid " fields imported : "
-msgstr " 已导入的字段: "
diff --git a/addons/import_base/import_base_view.xml b/addons/import_base/import_base_view.xml
deleted file mode 100644
index bcfbfa80c4b..00000000000
--- a/addons/import_base/import_base_view.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<openerp>
- <data>
- <menuitem name="Import &amp; Synchronize" id="base.menu_import_crm" parent="base.menu_base_partner" sequence="6"/>
- </data>
-</openerp>
diff --git a/addons/import_base/import_framework.py b/addons/import_base/import_framework.py
deleted file mode 100644
index 559f42c8974..00000000000
--- a/addons/import_base/import_framework.py
+++ /dev/null
@@ -1,501 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-import pprint
-import mapper
-import pooler
-import tools
-from tools.translate import _
-
-from threading import Thread
-import datetime
-import logging
-import StringIO
-import traceback
-pp = pprint.PrettyPrinter(indent=4)
-_logger = logging.getLogger(__name__)
-
-
-
-class import_framework(Thread):
- """
- This class should be extends,
- get_data and get_mapping have to extends
- get_state_map and initialize can be extended
- for advanced purpose get_default_hook can also be extended
- @see dummy import for a minimal exemple
- """
-
- """
- for import_object, this domain will avoid to find an already existing object
- """
- DO_NOT_FIND_DOMAIN = [('id', '=', 0)]
-
- #TODO don't use context to pass credential parameters
- def __init__(self, obj, cr, uid, instance_name, module_name, email_to_notify=False, context=None):
- Thread.__init__(self)
- self.external_id_field = 'id'
- self.obj = obj
- self.cr = cr
- self.uid = uid
- self.instance_name = instance_name
- self.module_name = module_name
- self.context = context or {}
- self.email = email_to_notify
- self.table_list = []
- self.initialize()
-
- """
- Abstract Method to be implemented in
- the real instance
- """
- def initialize(self):
- """
- init before import
- usually for the login
- """
- pass
-
- def init_run(self):
- """
- call after intialize run in the thread, not in the main process
- TO use for long initialization operation
- """
- pass
-
- def get_data(self, table):
- """
- @return: a list of dictionaries
- each dictionnaries contains the list of pair external_field_name : value
- """
- return [{}]
-
- def get_link(self, from_table, ids, to_table):
- """
- @return: a dictionaries that contains the association between the id (from_table)
- and the list (to table) of id linked
- """
- return {}
-
- def get_external_id(self, data):
- """
- @return the external id
- the default implementation return self.external_id_field (that has 'id') by default
- if the name of id field is different, you can overwrite this method or change the value
- of self.external_id_field
- """
- return data[self.external_id_field]
-
- def get_mapping(self):
- """
- @return: { TABLE_NAME : {
- 'model' : 'openerp.model.name',
- #if true import the table if not just resolve dependencies, use for meta package, by default => True
- #Not required
- 'import' : True or False,
- #Not required
- 'dependencies' : [TABLE_1, TABLE_2],
- #Not required
- 'hook' : self.function_name, #get the val dict of the object, return the same val dict or False
- 'map' : { @see mapper
- 'openerp_field_name' : 'external_field_name', or val('external_field_name')
- 'openerp_field_id/id' : ref(TABLE_1, 'external_id_field'), #make the mapping between the external id and the xml on the right
- 'openerp_field2_id/id_parent' : ref(TABLE_1,'external_id_field') #indicate a self dependencies on openerp_field2_id
- 'state' : map_val('state_equivalent_field', mapping), # use get_state_map to make the mapping between the value of the field and the value of the state
- 'text_field' : concat('field_1', 'field_2', .., delimiter=':'), #concat the value of the list of field in one
- 'description_field' : ppconcat('field_1', 'field_2', .., delimiter='\n\t'), #same as above but with a prettier formatting
- 'field' : call(callable, arg1, arg2, ..), #call the function with all the value, the function should send the value : self.callable
- 'field' : callable
- 'field' : call(method, val('external_field') interface of method is self, val where val is the value of the field
- 'field' : const(value) #always set this field to value
- + any custom mapper that you will define
- }
- },
-
- }
- """
- return {}
-
- def default_hook(self, val):
- """
- this hook will be apply on each table that don't have hook
- here we define the identity hook
- """
- return val
-
- def _import_table(self, table):
- data = self.get_data(table)
- map = self.get_mapping()[table]['map']
- hook = self.get_mapping()[table].get('hook', self.default_hook)
- model = self.get_mapping()[table]['model']
-
- final_data = []
- for val in data:
- res = hook(val)
- if res:
- final_data.append(res)
- return self._save_data(model, dict(map), final_data, table)
-
- def _save_data(self, model, mapping, datas, table):
- """
- @param model: the model of the object to import
- @param table : the external table where the data come from
- @param mapping : definition of the mapping
- @see: get_mapping
- @param datas : list of dictionnaries
- datas = [data_1, data_2, ..]
- data_i is a map external field_name => value
- and each data_i have a external id => in data_id['id']
- """
- _logger.info(' Importing %s into %s' % (table, model))
- if not datas:
- return (0, 'No data found')
- mapping['id'] = 'id_new'
- res = []
-
-
- self_dependencies = []
- for k in mapping.keys():
- if '_parent' in k:
- self_dependencies.append((k[:-7], mapping.pop(k)))
-
- for data in datas:
- for k, field_name in self_dependencies:
- data[k] = data.get(field_name) and self._generate_xml_id(data.get(field_name), table)
-
- data['id_new'] = self._generate_xml_id(self.get_external_id(data), table)
- fields, values = self._fields_mapp(data, mapping, table)
- res.append(values)
-
- model_obj = self.obj.pool.get(model)
- if not model_obj:
- raise ValueError(_("%s is not a valid model name.") % model)
- _logger.debug(_(" fields imported : ") + str(fields))
- (p, r, warning, s) = model_obj.import_data(self.cr, self.uid, fields, res, mode='update', current_module=self.module_name, noupdate=True, context=self.context)
- for (field, field_name) in self_dependencies:
- self._import_self_dependencies(model_obj, field, datas)
- return (len(res), warning)
-
- def _import_self_dependencies(self, obj, parent_field, datas):
- """
- @param parent_field: the name of the field that generate a self_dependencies, we call the object referenced in this
- field the parent of the object
- @param datas: a list of dictionnaries
- Dictionnaries need to contains
- id_new : the xml_id of the object
- field_new : the xml_id of the parent
- """
- fields = ['id', parent_field]
- for data in datas:
- if data.get(parent_field):
- values = [data['id_new'], data[parent_field]]
- obj.import_data(self.cr, self.uid, fields, [values], mode='update', current_module=self.module_name, noupdate=True, context=self.context)
-
- def _preprocess_mapping(self, mapping):
- """
- Preprocess the mapping :
- after the preprocces, everything is
- callable in the val of the dictionary
-
- use to allow syntaxical sugar like 'field': 'external_field'
- instead of 'field' : value('external_field')
- """
- map = dict(mapping)
- for key, value in map.items():
- if isinstance(value, basestring):
- map[key] = mapper.value(value)
- #set parent for instance of dbmapper
- elif isinstance(value, mapper.dbmapper):
- value.set_parent(self)
- return map
-
-
- def _fields_mapp(self,dict_sugar, openerp_dict, table):
- """
- call all the mapper and transform data
- to be compatible with import_data
- """
- fields=[]
- data_lst = []
- mapping = self._preprocess_mapping(openerp_dict)
- for key,val in mapping.items():
- if key not in fields and dict_sugar:
- fields.append(key)
- value = val(dict(dict_sugar))
- data_lst.append(value)
- return fields, data_lst
-
- def _generate_xml_id(self, name, table):
- """
- @param name: name of the object, has to be unique in for a given table
- @param table : table where the record we want generate come from
- @return: a unique xml id for record, the xml_id will be the same given the same table and same name
- To be used to avoid duplication of data that don't have ids
- """
- sugar_instance = self.instance_name
- name = name.replace('.', '_').replace(',', '_')
- return sugar_instance + "_" + table + "_" + name
-
-
- """
- Public interface of the framework
- those function can be use in the callable function defined in the mapping
- """
- def xml_id_exist(self, table, external_id):
- """
- Check if the external id exist in the openerp database
- in order to check if the id exist the table where it come from
- should be provide
- @return the xml_id generated if the external_id exist in the database or false
- """
- if not external_id:
- return False
-
- xml_id = self._generate_xml_id(external_id, table)
- id = self.obj.pool.get('ir.model.data').search(self.cr, self.uid, [('name', '=', xml_id), ('module', '=', self.module_name)])
- return id and xml_id or False
-
- def name_exist(self, table, name, model):
- """
- Check if the object with the name exist in the openerp database
- in order to check if the id exist the table where it come from
- should be provide and the model of the object
- """
- fields = ['name']
- data = [name]
- return self.import_object(fields, data, model, table, name, [('name', '=', name)])
-
- def get_mapped_id(self, table, external_id, context=None):
- """
- @return return the databse id linked with the external_id
- """
- if not external_id:
- return False
-
- xml_id = self._generate_xml_id(external_id, table)
- return self.obj.pool.get('ir.model.data').get_object_reference(self.cr, self.uid, self.module_name, xml_id)[1]
-
- def import_object_mapping(self, mapping, data, model, table, name, domain_search=False):
- """
- same as import_objects but instead of two list fields and data,
- this method take a dictionnaries : external_field : value
- and the mapping similar to the one define in 'map' key
- @see import_object, get_mapping
- """
- fields, datas = self._fields_mapp(data, mapping, table)
- return self.import_object(fields, datas, model, table, name, domain_search)
-
- def import_object(self, fields, data, model, table, name, domain_search=False):
- """
- This method will import an object in the openerp, usefull for field that is only a char in sugar and is an object in openerp
- use import_data that will take care to create/update or do nothing with the data
- this method return the xml_id
-
- To be use, when you want to create an object or link if already exist
- use DO_NOT_LINK_DOMAIN to create always a new object
- @param fields: list of fields needed to create the object without id
- @param data: the list of the data, in the same order as the field
- ex : fields = ['firstname', 'lastname'] ; data = ['John', 'Mc donalds']
- @param model: the openerp's model of the create/update object
- @param table: the table where data come from in sugarcrm, no need to fit the real name of openerp name, just need to be unique
- @param unique_name: the name of the object that we want to create/update get the id
- @param domain_search : the domain that should find the unique existing record
-
- @return: the xml_id of the ressources
- """
- domain_search = not domain_search and [('name', 'ilike', name)] or domain_search
- obj = self.obj.pool.get(model)
- if not obj: #if the model doesn't exist
- return False
-
- xml_id = self._generate_xml_id(name, table)
- xml_ref = self.mapped_id_if_exist(model, domain_search, table, name)
- fields.append('id')
- data.append(xml_id)
- obj.import_data(self.cr, self.uid, fields, [data], mode='update', current_module=self.module_name, noupdate=True, context=self.context)
- return xml_ref or xml_id
-
-
- def mapped_id_if_exist(self, model, domain, table, name):
- """
- To be use when we want link with and existing object, if the object don't exist
- just ignore.
- @param domain : search domain to find existing record, should return a unique record
- @param xml_id: xml_id give to the mapping
- @param name: external_id or name of the object to create if there is no id
- @param table: the name of the table of the object to map
- @return : the xml_id if the record exist in the db, False otherwise
- """
- obj = self.obj.pool.get(model)
- ids = obj.search(self.cr, self.uid, domain, context=self.context)
- if ids:
- xml_id = self._generate_xml_id(name, table)
- ir_model_data_obj = obj.pool.get('ir.model.data')
- id = ir_model_data_obj._update(self.cr, self.uid, model,
- self.module_name, {}, mode='update', xml_id=xml_id,
- noupdate=True, res_id=ids[0], context=self.context)
- return xml_id
- return False
-
-
- def set_table_list(self, table_list):
- """
- Set the list of table to import, this method should be call before run
- @param table_list: the list of external table to import
- ['Leads', 'Opportunity']
- """
- self.table_list = table_list
-
- def run(self):
- """
- Import all data into openerp,
- this is the Entry point to launch the process of import
-
-
- """
- self.data_started = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
- self.cr = pooler.get_db(self.cr.dbname).cursor()
- error = False
- result = []
- try:
- self.init_run()
- imported = set() #to invoid importing 2 times the sames modules
- for table in self.table_list:
- to_import = self.get_mapping()[table].get('import', True)
- if not table in imported:
- res = self._resolve_dependencies(self.get_mapping()[table].get('dependencies', []), imported)
- result.extend(res)
- if to_import:
- (position, warning) = self._import_table(table)
- result.append((table, position, warning))
- imported.add(table)
- self.cr.commit()
-
- except Exception, err:
- sh = StringIO.StringIO()
- traceback.print_exc(file=sh)
- error = sh.getvalue()
- print error
-
-
- self.date_ended = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
- self._send_notification_email(result, error)
-
- self.cr.close()
-
- def _resolve_dependencies(self, dep, imported):
- """
- import dependencies recursively
- and avoid to import twice the same table
- """
- result = []
- for dependency in dep:
- if not dependency in imported:
- to_import = self.get_mapping()[dependency].get('import', True)
- res = self._resolve_dependencies(self.get_mapping()[dependency].get('dependencies', []), imported)
- result.extend(res)
- if to_import:
- r = self._import_table(dependency)
- (position, warning) = r
- result.append((dependency, position, warning))
- imported.add(dependency)
- return result
-
- def _send_notification_email(self, result, error):
- if not self.email:
- return False
- email_obj = self.obj.pool.get('mail.mail')
- email_id = email_obj.create(self.cr, self.uid, {
- 'email_from' : 'import@module.openerp',
- 'email_to' : self.email,
- 'body_html' : self.get_email_body(result, error),
- 'subject' : self.get_email_subject(result, error),
- 'auto_delete' : True})
- email_obj.send(self.cr, self.uid, [email_id])
- if error:
- _logger.error(_("Import failed due to an unexpected error"))
- else:
- _logger.info(_("Import finished, notification email sended"))
-
- def get_email_subject(self, result, error=False):
- """
- This method define the subject of the email send by openerp at the end of import
- @param result: a list of tuple
- (table_name, number_of_record_created/updated, warning) for each table
- @return the subject of the mail
-
- """
- if error:
- return _("Data Import failed at %s due to an unexpected error") % self.date_ended
- return _("Import of your data finished at %s") % self.date_ended
-
- def get_email_body(self, result, error=False):
- """
- This method define the body of the email send by openerp at the end of import. The body is separated in two part
- the header (@see get_body_header), and the generate body with the list of table and number of record imported.
- If you want to keep this it's better to overwrite get_body_header
- @param result: a list of tuple
- (table_name, number_of_record_created/updated, warning) for each table
- @return the subject of the mail
-
- """
-
- body = _("started at %s and finished at %s \n") % (self.data_started, self.date_ended)
- if error:
- body += _("but failed, in consequence no data were imported to keep database consistency \n error : \n") + error
-
- for (table, nb, warning) in result:
- if not warning:
- warning = _("with no warning")
- else:
- warning = _("with warning : %s") % warning
- body += _("%s has been successfully imported from %s %s, %s \n") % (nb, self.instance_name, table, warning)
- return self.get_body_header(result) + "\n\n" + body
-
- def get_body_header(self, result):
- """
- @return the first sentences written in the mail's body
- """
- return _("The import of data \n instance name : %s \n") % self.instance_name
-
-
- #TODO documentation test
- def run_test(self):
- back_get_data = self.get_data
- back_get_link = self.get_link
- back_init = self.initialize
- self.get_data = self.get_data_test
- self.get_link = self.get_link_test
- self.initialize = self.intialize_test
- self.run()
- self.get_data = back_get_data
- self.get_link = back_get_link
- self.initialize = back_init
-
- def get_data_test(self, table):
- return [{}]
-
- def get_link_test(self, from_table, ids, to_table):
- return {}
-
- def intialize_test(self):
- pass
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_base/mapper.py b/addons/import_base/mapper.py
deleted file mode 100644
index d68447ad3dd..00000000000
--- a/addons/import_base/mapper.py
+++ /dev/null
@@ -1,171 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-import tools
-
-class mapper(object):
- """
- super class for all mapper class
- They are call before import data
- to transform the mapping into real value that we
- will import
-
- the call function receive a dictionary with external data
- 'external_field' : value
- """
- def __call__(self, external_values):
- raise NotImplementedError()
-
-class dbmapper(mapper):
- """
- Super class for mapper that need to access to
- data base or any function of the import_framework
-
- self.parent contains a reference to the instance of
- the import framework
- """
- def set_parent(self, parent):
- self.parent = parent
-
-
-class concat(mapper):
- """
- Use : contact('field_name1', 'field_name2', delimiter='_')
- concat value of fields using the delimiter, delimiter is optional
- and by default is a space
- """
- def __init__(self, *arg, **delimiter):
- self.arg = arg
- self.delimiter = delimiter and delimiter.get('delimiter', ' ') or ' '
-
- def __call__(self, external_values):
- return self.delimiter.join(map(lambda x : tools.ustr(external_values.get(x,'')), self.arg))
-
-class ppconcat(mapper):
- """
- Use : contact('field_name1', 'field_name2', delimiter='_')
- concat external field name and value of fields using the delimiter,
- delimiter is optional and by default is a two line feeds
-
- """
- def __init__(self, *arg, **delimiter):
- self.arg = arg
- self.delimiter = delimiter and delimiter.get('delimiter', ' ') or '\n\n'
-
- def __call__(self, external_values):
- return self.delimiter.join(map(lambda x : x + ": " + tools.ustr(external_values.get(x,'')), self.arg))
-
-class const(mapper):
- """
- Use : const(arg)
- return always arg
- """
- def __init__(self, val):
- self.val = val
-
- def __call__(self, external_values):
- return self.val
-
-class value(mapper):
- """
- Use : value(external_field_name)
- Return the value of the external field name
- this is equivalent to the a single string
-
- usefull for call if you want your call get the value
- and don't care about the name of the field
- call(self.method, value('field1'))
- """
- def __init__(self, val, default='', fallback=False):
- self.val = val
- self.default = default
- self.fallback = fallback
-
- def __call__(self, external_values):
- val = external_values.get(self.val, self.default)
- if self.fallback and (not val or val == self.default):
- val = external_values.get(self.fallback, self.default)
- return val
-
-
-class map_val(mapper):
- """
- Use : map_val(external_field, val_mapping)
- where val_mapping is a dictionary
- with external_val : openerp_val
-
- usefull for selection field like state
- to map value
- """
- def __init__(self, val, map, default='draft'):
- self.val = value(val)
- self.map = map
- self.default = default
-
- def __call__(self, external_values):
- return self.map.get(self.val(external_values), self.default)
-
-class ref(dbmapper):
- """
- Use : ref(table_name, external_id)
- return the xml_id of the ressource
-
- to associate an already imported object with the current object
- """
- def __init__(self, table, field_name):
- self.table = table
- self.field_name = field_name
-
- def __call__(self, external_values):
- return self.parent.xml_id_exist(self.table, external_values.get(self.field_name))
-
-class refbyname(dbmapper):
- """
- Use : refbyname(table_name, external_name, res.model)
- same as ref but use the name of the ressource to find it
- """
- def __init__(self, table, field_name, model):
- self.table = table
- self.field_name = field_name
- self.model = model
-
- def __call__(self, external_values):
- v = external_values.get(self.field_name, '')
- return self.parent.name_exist(self.table, v , self.model)
-
-class call(mapper):
- """
- Use : call(function, arg1, arg2)
- to call the function with external val follow by the arg specified
- """
- def __init__(self, fun, *arg):
- self.fun = fun
- self.arg = arg
-
- def __call__(self, external_values):
- args = []
- for arg in self.arg:
- if isinstance(arg, mapper):
- args.append(arg(external_values))
- else:
- args.append(arg)
- return self.fun(external_values, *args)
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: