diff options
Diffstat (limited to 'addons/project_mailgate')
| -rw-r--r-- | addons/project_mailgate/__openerp__.py | 21 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/ca.po | 38 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/de.po | 22 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/es.po | 22 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/fi.po | 100 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/fr.po | 6 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/gl.po | 4 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/hu.po | 7 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/it.po | 8 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/lv.po | 4 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/mn.po | 4 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/nl.po | 4 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/pl.po | 22 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/pt.po | 4 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/pt_BR.po | 22 | ||||
| -rw-r--r-- | addons/project_mailgate/i18n/zh_CN.po | 104 | ||||
| -rw-r--r-- | addons/project_mailgate/project_mailgate.py | 175 | ||||
| -rw-r--r-- | addons/project_mailgate/project_mailgate_view.xml | 11 | ||||
| -rw-r--r-- | addons/project_mailgate/security/ir.model.access.csv | 4 |
19 files changed, 349 insertions, 233 deletions
diff --git a/addons/project_mailgate/__openerp__.py b/addons/project_mailgate/__openerp__.py index 9140a04f36e..76ff6dbbc47 100644 --- a/addons/project_mailgate/__openerp__.py +++ b/addons/project_mailgate/__openerp__.py @@ -21,19 +21,28 @@ { - "name": "Project MailGateWay", + "name": "Project Tasks - Mail Integration", "version": "1.1", "author": "OpenERP SA", "website": "http://www.openerp.com", "category": "Project Management", + 'complexity': "easy", "images": ["images/project_mailgate_task.jpeg"], - "depends": ["project", "mail_gateway"], + "depends": ["project", "mail"], "description": """ -This module is an interface that synchronises mails with OpenERP Project Task. -============================================================================== +This module can automatically create Project Tasks based on incoming emails +=========================================================================== + +Allows creating tasks based on new emails arriving at a given mailbox, +similarly to what the CRM application has for Leads/Opportunities. +There are two common alternatives to configure the mailbox integration: + + * Install the ``fetchmail`` module and configure a new mailbox, then select + ``Project Tasks`` as the target for incoming emails. + * Set it up manually on your mail server based on the 'mail gateway' script + provided in the ``mail`` module - and connect it to the `project.task` model. + -It allows creating tasks as soon as a new mail arrives in our configured mail server. -Moreover, it keeps track of all further communications and task states. """, "init_xml": [], "update_xml": ["security/ir.model.access.csv", diff --git a/addons/project_mailgate/i18n/ca.po b/addons/project_mailgate/i18n/ca.po index cadabcba219..2d3b46c1dd2 100644 --- a/addons/project_mailgate/i18n/ca.po +++ b/addons/project_mailgate/i18n/ca.po @@ -14,18 +14,18 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 msgid "History Information" -msgstr "" +msgstr "Informació històrica" #. module: project_mailgate #: model:ir.model,name:project_mailgate.model_project_task msgid "Task" -msgstr "" +msgstr "Tasca" #. module: project_mailgate #: model:ir.module.module,description:project_mailgate.module_meta_information @@ -38,63 +38,71 @@ msgid "" "Moreover, it keeps track of all further communications and task states.\n" " " msgstr "" +"Aquest mòdul proporciona una interfície per sincronitzar correus amb les " +"tasques de projectes d'OpenERP.\n" +"\n" +"Permet crear tasques tan aviat com arriba un nou correu en el nostre " +"servidor de correu prèviament configurat.\n" +"A més realitza un seguiment de totes les comunicacions addicionals i estats " +"de la tasca.\n" +" " #. module: project_mailgate #: view:project.task:0 msgid "Attachments" -msgstr "" +msgstr "Adjunts" #. module: project_mailgate #: model:ir.module.module,shortdesc:project_mailgate.module_meta_information msgid "Project MailGateWay" -msgstr "" +msgstr "Ruta d'enllaç del projecte" #. module: project_mailgate #: constraint:project.task:0 msgid "Error ! You cannot create recursive tasks." -msgstr "" +msgstr "Error! No podeu crear tasques recursives." #. module: project_mailgate #: field:project.task,message_ids:0 msgid "Messages" -msgstr "" +msgstr "Missatges" #. module: project_mailgate #: code:addons/project_mailgate/project_mailgate.py:123 #, python-format msgid "Draft" -msgstr "" +msgstr "Esborrany" #. module: project_mailgate #: view:project.task:0 msgid "Details" -msgstr "" +msgstr "Detalls" #. module: project_mailgate #: code:addons/project_mailgate/project_mailgate.py:149 #, python-format msgid "Cancel" -msgstr "" +msgstr "Canceŀla" #. module: project_mailgate #: code:addons/project_mailgate/project_mailgate.py:143 #, python-format msgid "Done" -msgstr "" +msgstr "Realitzat" #. module: project_mailgate #: code:addons/project_mailgate/project_mailgate.py:129 #, python-format msgid "Open" -msgstr "" +msgstr "Obre" #. module: project_mailgate #: code:addons/project_mailgate/project_mailgate.py:135 #, python-format msgid "Pending" -msgstr "" +msgstr "Pendent" #. module: project_mailgate #: view:project.task:0 msgid "History" -msgstr "" +msgstr "Històric" diff --git a/addons/project_mailgate/i18n/de.po b/addons/project_mailgate/i18n/de.po index fe8300d9b3c..a7b608c68e0 100644 --- a/addons/project_mailgate/i18n/de.po +++ b/addons/project_mailgate/i18n/de.po @@ -15,8 +15,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 @@ -107,21 +107,3 @@ msgstr "Im Wartezustand" #: view:project.task:0 msgid "History" msgstr "Historie" - -#~ msgid "Invalid XML for View Architecture!" -#~ msgstr "Fehlerhafter XML Quellcode für diese Ansicht!" - -#~ msgid "" -#~ "The Object name must start with x_ and not contain any special character !" -#~ msgstr "" -#~ "Das Objekt muss mit einem x_ beginnen und darf keine Sonderzeichen " -#~ "beinhalten !" - -#~ msgid "The certificate ID of the module must be unique !" -#~ msgstr "Die Zertifikat ID des Moduls sollte eindeutig sein !" - -#~ msgid "The name of the module must be unique !" -#~ msgstr "Die Modulbezeichnung sollte eindeutig sein !" - -#~ msgid "Size of the field can never be less than 1 !" -#~ msgstr "Die Größe des Feldes sollte niemals kleiner als 1 sein !" diff --git a/addons/project_mailgate/i18n/es.po b/addons/project_mailgate/i18n/es.po index 57b135eca8a..2736d2572ac 100644 --- a/addons/project_mailgate/i18n/es.po +++ b/addons/project_mailgate/i18n/es.po @@ -15,8 +15,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 @@ -106,21 +106,3 @@ msgstr "Pendiente" #: view:project.task:0 msgid "History" msgstr "Historial" - -#~ msgid "Invalid XML for View Architecture!" -#~ msgstr "¡XML no válido para la definición de la vista!" - -#~ msgid "" -#~ "The Object name must start with x_ and not contain any special character !" -#~ msgstr "" -#~ "¡El nombre del objeto debe empezar con x_ y no contener ningún carácter " -#~ "especial!" - -#~ msgid "The name of the module must be unique !" -#~ msgstr "¡El nombre del módulo debe ser único!" - -#~ msgid "Size of the field can never be less than 1 !" -#~ msgstr "¡El tamaño del campo nunca puede ser menor que 1!" - -#~ msgid "The certificate ID of the module must be unique !" -#~ msgstr "¡El Id del certificado debe ser único!" diff --git a/addons/project_mailgate/i18n/fi.po b/addons/project_mailgate/i18n/fi.po new file mode 100644 index 00000000000..561c0b59ba2 --- /dev/null +++ b/addons/project_mailgate/i18n/fi.po @@ -0,0 +1,100 @@ +# Finnish translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-06-22 10:01+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: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" + +#. module: project_mailgate +#: view:project.task:0 +msgid "History Information" +msgstr "Historiatiedot" + +#. module: project_mailgate +#: model:ir.model,name:project_mailgate.model_project_task +msgid "Task" +msgstr "Tehtävä" + +#. module: project_mailgate +#: model:ir.module.module,description:project_mailgate.module_meta_information +msgid "" +"This module is an interface that synchronises mails with OpenERP Project " +"Task.\n" +"\n" +"It allows creating tasks as soon as a new mail arrives in our configured " +"mail server.\n" +"Moreover, it keeps track of all further communications and task states.\n" +" " +msgstr "" + +#. module: project_mailgate +#: view:project.task:0 +msgid "Attachments" +msgstr "Liitteet" + +#. module: project_mailgate +#: model:ir.module.module,shortdesc:project_mailgate.module_meta_information +msgid "Project MailGateWay" +msgstr "Projektin sähköpostivälittäjä" + +#. module: project_mailgate +#: constraint:project.task:0 +msgid "Error ! You cannot create recursive tasks." +msgstr "Virhe ! Et voi luoda rekursiivisiä tehtäviä." + +#. module: project_mailgate +#: field:project.task,message_ids:0 +msgid "Messages" +msgstr "Viestit" + +#. module: project_mailgate +#: code:addons/project_mailgate/project_mailgate.py:123 +#, python-format +msgid "Draft" +msgstr "Luonnos" + +#. module: project_mailgate +#: view:project.task:0 +msgid "Details" +msgstr "Yksityiskohdat" + +#. module: project_mailgate +#: code:addons/project_mailgate/project_mailgate.py:149 +#, python-format +msgid "Cancel" +msgstr "Peruuta" + +#. module: project_mailgate +#: code:addons/project_mailgate/project_mailgate.py:143 +#, python-format +msgid "Done" +msgstr "Valmis" + +#. module: project_mailgate +#: code:addons/project_mailgate/project_mailgate.py:129 +#, python-format +msgid "Open" +msgstr "Auki" + +#. module: project_mailgate +#: code:addons/project_mailgate/project_mailgate.py:135 +#, python-format +msgid "Pending" +msgstr "Odottava" + +#. module: project_mailgate +#: view:project.task:0 +msgid "History" +msgstr "Historia" diff --git a/addons/project_mailgate/i18n/fr.po b/addons/project_mailgate/i18n/fr.po index 14c86daa48d..a605e0eeefb 100644 --- a/addons/project_mailgate/i18n/fr.po +++ b/addons/project_mailgate/i18n/fr.po @@ -9,13 +9,13 @@ msgstr "" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" "PO-Revision-Date: 2011-01-13 23:14+0000\n" -"Last-Translator: lolivier <olivier.lenoir@free.fr>\n" +"Last-Translator: lholivier <olivier.lenoir@free.fr>\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: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/gl.po b/addons/project_mailgate/i18n/gl.po index 4bd35afef01..8bc191d773b 100644 --- a/addons/project_mailgate/i18n/gl.po +++ b/addons/project_mailgate/i18n/gl.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-05-11 04:37+0000\n" -"X-Generator: Launchpad (build 12959)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/hu.po b/addons/project_mailgate/i18n/hu.po index 625748c2058..952980a1a0a 100644 --- a/addons/project_mailgate/i18n/hu.po +++ b/addons/project_mailgate/i18n/hu.po @@ -8,13 +8,14 @@ msgstr "" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" "PO-Revision-Date: 2011-01-25 13:21+0000\n" -"Last-Translator: NOVOTRADE RENDSZERHÁZ <openerp@novotrade.hu>\n" +"Last-Translator: NOVOTRADE RENDSZERHÁZ ( novotrade.hu ) " +"<openerp@novotrade.hu>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/it.po b/addons/project_mailgate/i18n/it.po index 2ba0a646ec1..1a31e35d231 100644 --- a/addons/project_mailgate/i18n/it.po +++ b/addons/project_mailgate/i18n/it.po @@ -9,13 +9,13 @@ msgstr "" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" "PO-Revision-Date: 2011-04-22 09:54+0000\n" -"Last-Translator: simone.sandri <Unknown>\n" +"Last-Translator: simone.sandri <lexluxsox@hotmail.it>\n" "Language-Team: Italian <it@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: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 @@ -54,7 +54,7 @@ msgstr "Allegati" #. module: project_mailgate #: model:ir.module.module,shortdesc:project_mailgate.module_meta_information msgid "Project MailGateWay" -msgstr "" +msgstr "Ingresso Mail di Progetto" #. module: project_mailgate #: constraint:project.task:0 diff --git a/addons/project_mailgate/i18n/lv.po b/addons/project_mailgate/i18n/lv.po index cbed24c309a..c5ae6c07e25 100644 --- a/addons/project_mailgate/i18n/lv.po +++ b/addons/project_mailgate/i18n/lv.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/mn.po b/addons/project_mailgate/i18n/mn.po index 19024e2e7b0..fc0991b0c06 100644 --- a/addons/project_mailgate/i18n/mn.po +++ b/addons/project_mailgate/i18n/mn.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/nl.po b/addons/project_mailgate/i18n/nl.po index ebff27f3d0b..67c79d1ab41 100644 --- a/addons/project_mailgate/i18n/nl.po +++ b/addons/project_mailgate/i18n/nl.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/pl.po b/addons/project_mailgate/i18n/pl.po index 7be83590838..f5c1d8c6a04 100644 --- a/addons/project_mailgate/i18n/pl.po +++ b/addons/project_mailgate/i18n/pl.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 @@ -106,21 +106,3 @@ msgstr "Oczekujące" #: view:project.task:0 msgid "History" msgstr "Historia" - -#~ msgid "Invalid XML for View Architecture!" -#~ msgstr "Niewłaściwy XML dla architektury widoku!" - -#~ msgid "" -#~ "The Object name must start with x_ and not contain any special character !" -#~ msgstr "" -#~ "Nazwa obiektu musi zaczynać się od x_ oraz nie może zawierać znaków " -#~ "specjalnych !" - -#~ msgid "The name of the module must be unique !" -#~ msgstr "Nazwa modułu musi być unikalna !" - -#~ msgid "Size of the field can never be less than 1 !" -#~ msgstr "Rozmiar pola nie może być mniejszy od 1 !" - -#~ msgid "The certificate ID of the module must be unique !" -#~ msgstr "ID certyfikatu modułu musi być unikalne !" diff --git a/addons/project_mailgate/i18n/pt.po b/addons/project_mailgate/i18n/pt.po index 5581d7cc82f..442ec94ab0f 100644 --- a/addons/project_mailgate/i18n/pt.po +++ b/addons/project_mailgate/i18n/pt.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/pt_BR.po b/addons/project_mailgate/i18n/pt_BR.po index e27f6b7a1d9..4bb0735a0a9 100644 --- a/addons/project_mailgate/i18n/pt_BR.po +++ b/addons/project_mailgate/i18n/pt_BR.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 @@ -106,21 +106,3 @@ msgstr "Pendente" #: view:project.task:0 msgid "History" msgstr "Histórico" - -#~ msgid "Invalid XML for View Architecture!" -#~ msgstr "XML inválido para Arquitetura da View" - -#~ msgid "" -#~ "The Object name must start with x_ and not contain any special character !" -#~ msgstr "" -#~ "O nome do objeto precisa iniciar com x_ e não pode conter nenhum caracter " -#~ "especial!" - -#~ msgid "The name of the module must be unique !" -#~ msgstr "O nome do módulo precisa ser único !" - -#~ msgid "Size of the field can never be less than 1 !" -#~ msgstr "O tamanho do campo nunca pode ser menor que 1 !" - -#~ msgid "The certificate ID of the module must be unique !" -#~ msgstr "O ID de certificado do módulo precisa ser único !" diff --git a/addons/project_mailgate/i18n/zh_CN.po b/addons/project_mailgate/i18n/zh_CN.po new file mode 100644 index 00000000000..c49c4725f42 --- /dev/null +++ b/addons/project_mailgate/i18n/zh_CN.po @@ -0,0 +1,104 @@ +# Chinese (Simplified) translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-06-28 16:25+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" + +#. module: project_mailgate +#: view:project.task:0 +msgid "History Information" +msgstr "日志信息" + +#. module: project_mailgate +#: model:ir.model,name:project_mailgate.model_project_task +msgid "Task" +msgstr "任务" + +#. module: project_mailgate +#: model:ir.module.module,description:project_mailgate.module_meta_information +msgid "" +"This module is an interface that synchronises mails with OpenERP Project " +"Task.\n" +"\n" +"It allows creating tasks as soon as a new mail arrives in our configured " +"mail server.\n" +"Moreover, it keeps track of all further communications and task states.\n" +" " +msgstr "" +"此模块是邮件和任务的接口。\n" +"允许在特定邮件服务器收到邮件后马上创建任务。\n" +"还能跟踪进一步的沟通和任务阶段\n" +" " + +#. module: project_mailgate +#: view:project.task:0 +msgid "Attachments" +msgstr "附件" + +#. module: project_mailgate +#: model:ir.module.module,shortdesc:project_mailgate.module_meta_information +msgid "Project MailGateWay" +msgstr "Project MailGateWay" + +#. module: project_mailgate +#: constraint:project.task:0 +msgid "Error ! You cannot create recursive tasks." +msgstr "错误!不能创建循环引用的任务" + +#. module: project_mailgate +#: field:project.task,message_ids:0 +msgid "Messages" +msgstr "消息" + +#. module: project_mailgate +#: code:addons/project_mailgate/project_mailgate.py:123 +#, python-format +msgid "Draft" +msgstr "草稿" + +#. module: project_mailgate +#: view:project.task:0 +msgid "Details" +msgstr "详细信息" + +#. module: project_mailgate +#: code:addons/project_mailgate/project_mailgate.py:149 +#, python-format +msgid "Cancel" +msgstr "取消" + +#. module: project_mailgate +#: code:addons/project_mailgate/project_mailgate.py:143 +#, python-format +msgid "Done" +msgstr "完成" + +#. module: project_mailgate +#: code:addons/project_mailgate/project_mailgate.py:129 +#, python-format +msgid "Open" +msgstr "未结" + +#. module: project_mailgate +#: code:addons/project_mailgate/project_mailgate.py:135 +#, python-format +msgid "Pending" +msgstr "等待中" + +#. module: project_mailgate +#: view:project.task:0 +msgid "History" +msgstr "日志" diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 64bb8c2dc69..9715a32c151 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -19,134 +19,101 @@ # ############################################################################## -from osv import fields,osv +from osv import fields, osv from tools.translate import _ +import tools import binascii + class project_tasks(osv.osv): _name = "project.task" - _inherit = ['mailgate.thread','project.task'] - - _columns={ - 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)], readonly=True), - } - def message_new(self, cr, uid, msg, context=None): -# """ -# Automatically calls when new email message arrives -# -# @param self: The object pointer -# @param cr: the current row, from the database cursor, -# @param uid: the current user’s ID for security checks -# """ - mailgate_obj = self.pool.get('email.server.tools') + _inherit = ['mail.thread','project.task'] + + _columns = { + 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)], readonly=True), + } + + def message_new(self, cr, uid, msg, custom_values=None, context=None): + res_id = super(project_tasks,self).message_new(cr, uid, msg, custom_values=custom_values, context=context) subject = msg.get('subject') - body = msg.get('body') + body = msg.get('body_text') msg_from = msg.get('from') - priority = msg.get('priority') - - data = { + data = { 'name': subject, 'description': body, - 'planned_hours' : 0.0, + 'planned_hours': 0.0, } - res = mailgate_obj.get_partner(cr, uid, msg_from) - if res: - data.update(res) - res = self.create(cr, uid, data) - - attachments = msg.get('attachments', []) - for attachment in attachments or []: - data_attach = { - 'name': attachment, - 'datas':binascii.b2a_base64(str(attachments.get(attachment))), - 'datas_fname': attachment, - 'description': 'Mail attachment', - 'res_model': self._name, - 'res_id': res, - } - self.pool.get('ir.attachment').create(cr, uid, data_attach) + data.update(self.message_partner_by_email(cr, uid, msg_from)) + self.write(cr, uid, [res_id], data, context) + return res_id - return res - - def message_update(self, cr, uid, id, msg, data={}, default_act='pending'): - mailgate_obj = self.pool.get('email.server.tools') - msg_actions, body_data = mailgate_obj.msg_act_get(msg) + def message_update(self, cr, uid, ids, msg, data={}, default_act='pending'): data.update({ - 'description': body_data, + 'description': msg['body_text'], }) act = 'do_'+default_act - if 'state' in msg_actions: - if msg_actions['state'] in ['draft','close','cancel','open','pending']: - act = 'do_' + msg_actions['state'] - - for k1,k2 in [('cost','planned_hours')]: - try: - data[k2] = float(msg_actions[k1]) - except: - pass - if 'priority' in msg_actions: - if msg_actions['priority'] in ('1','2','3','4','5'): - data['priority'] = msg_actions['priority'] - - self.write(cr, uid, [id], data) - getattr(self,act)(cr, uid, [id]) + maps = { + 'cost':'planned_hours', + } + for line in msg['body_text'].split('\n'): + line = line.strip() + res = tools.misc.command_re.match(line) + if res: + match = res.group(1).lower() + field = maps.get(match) + if field: + try: + data[field] = float(res.group(2).lower()) + except (ValueError, TypeError): + pass + elif match.lower() == 'state' \ + and res.group(2).lower() in ['cancel','close','draft','open','pending']: + act = 'do_%s' % res.group(2).lower() + + self.write(cr, uid, ids, data, context=context) + getattr(self,act)(cr, uid, ids, context=context) + self.message_append_dict(cr, uid, [res_id], msg, context=context) return True - def message_followers(self, cr, uid, ids, context=None): - res = [] - if isinstance(ids, (str, int, long)): - select = [ids] - else: - select = ids - for task in self.browse(cr, uid, select, context=context): - user_email = (task.user_id and task.user_id.address_id and task.user_id.address_id.email) or False - res += [(user_email, False, False, task.priority)] - if isinstance(ids, (str, int, long)): - return len(res) and res[0] or False - return res + def message_thread_followers(self, cr, uid, ids, context=None): + followers = super(project_tasks,self).message_thread_followers(cr, uid, ids, context=context) + for task in self.browse(cr, uid, followers.keys(), context=context): + task_followers = set(followers[task.id]) + task_followers.add(task.user_id.user_email) + followers[task.id] = filter(None, task_followers) + return followers - def msg_send(self, cr, uid, id, *args, **argv): - return True - - def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context=None): - mailgate_pool = self.pool.get('mailgate.thread') - return mailgate_pool.history(cr, uid, cases, keyword, history=history,\ - subject=subject, email=email, \ - details=details, email_from=email_from,\ - message_id=message_id, attach=attach, \ - context=context) - - def do_draft(self, cr, uid, ids, *args, **kwargs): - res = super(project_tasks, self).do_draft(cr, uid, ids, *args, **kwargs) - tasks = self.browse(cr, uid, ids) - self._history(cr, uid, tasks, _('Draft')) + def do_draft(self, cr, uid, ids, context=None): + res = super(project_tasks, self).do_draft(cr, uid, ids, context) + tasks = self.browse(cr, uid, ids, context=context) + self.message_append(cr, uid, tasks, _('Draft'), context=context) return res - - def do_open(self, cr, uid, ids, *args, **kwargs): - res = super(project_tasks, self).do_open(cr, uid, ids, *args, **kwargs) - tasks = self.browse(cr, uid, ids) - self._history(cr, uid, tasks, _('Open')) + + def do_open(self, cr, uid, ids, context=None): + res = super(project_tasks, self).do_open(cr, uid, ids, context) + tasks = self.browse(cr, uid, ids, context=context) + self.message_append(cr, uid, tasks, _('Open'), context=context) return res - - def do_pending(self, cr, uid, ids, *args, **kwargs): - res = super(project_tasks, self).do_pending(cr, uid, ids, *args, **kwargs) - tasks = self.browse(cr, uid, ids) - self._history(cr, uid, tasks, _('Pending')) + + def do_pending(self, cr, uid, ids, context=None): + res = super(project_tasks, self).do_pending(cr, uid, ids, context) + tasks = self.browse(cr, uid, ids, context=context) + self.message_append(cr, uid, tasks, _('Pending'), context=context) return res - - def do_close(self, cr, uid, ids, *args, **kwargs): - res = super(project_tasks, self).do_close(cr, uid, ids, *args, **kwargs) - tasks = self.browse(cr, uid, ids) + + def do_close(self, cr, uid, ids, context=None): + res = super(project_tasks, self).do_close(cr, uid, ids, context) + tasks = self.browse(cr, uid, ids, context=context) for task in tasks: if task.state == 'done': - self._history(cr, uid, tasks, _('Done')) + self.message_append(cr, uid, tasks, _('Done'), context=context) return res - - def do_cancel(self, cr, uid, ids, *args, **kwargs): - res = super(project_tasks, self).do_cancel(cr, uid, ids, *args, **kwargs) - tasks = self.browse(cr, uid, ids) - self._history(cr, uid, tasks, _('Cancel')) + + def do_cancel(self, cr, uid, ids, context=None): + res = super(project_tasks, self).do_cancel(cr, uid, ids, context=context) + tasks = self.browse(cr, uid, ids, context=context) + self.message_append(cr, uid, tasks, _('Cancel'), context=context) return res project_tasks() diff --git a/addons/project_mailgate/project_mailgate_view.xml b/addons/project_mailgate/project_mailgate_view.xml index 8c8816ebbd5..c3cd4bf9db2 100644 --- a/addons/project_mailgate/project_mailgate_view.xml +++ b/addons/project_mailgate/project_mailgate_view.xml @@ -9,7 +9,7 @@ <field name="arch" type="xml"> <xpath expr="/form/notebook/page[@string='Extra Info']" position="before"> <page string="History"> - <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> + <field name="message_ids" colspan="4" nolabel="1" mode="tree,form" readonly="1"> <tree string="History"> <field name="display_text" string="History Information"/> </tree> @@ -19,15 +19,14 @@ <field name="date"/> <field name="email_to" widget="char" size="512"/> <field name="email_cc" widget="char" size="512"/> - <field name="name" colspan="4" widget="char" size="512"/> - <field name="history" invisible="1"/> + <field name="subject" colspan="4" widget="char" size="512"/> </group> <notebook colspan="4"> <page string="Details"> - <group attrs="{'invisible': [('history', '!=', True)]}"> - <field name="description" colspan="4" nolabel="1" height="250"/> + <group attrs="{'invisible': [('email_from', '=', False)]}"> + <field name="body_text" colspan="4" nolabel="1" height="250"/> </group> - <group attrs="{'invisible': [('history', '=', True)]}"> + <group attrs="{'invisible': [('email_from', '!=', False)]}"> <field name="display_text" colspan="4" nolabel="1" height="250"/> </group> </page> diff --git a/addons/project_mailgate/security/ir.model.access.csv b/addons/project_mailgate/security/ir.model.access.csv index 1a840d89e9a..cf9a08b958d 100644 --- a/addons/project_mailgate/security/ir.model.access.csv +++ b/addons/project_mailgate/security/ir.model.access.csv @@ -1,3 +1,3 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_mailgate_message_project_manager","project.mailgate.message.manager","mail_gateway.model_mailgate_message","project.group_project_manager",1,1,1,0 -"access_mailgate_message_project_user","project.mailgate.message.user","mail_gateway.model_mailgate_message","project.group_project_user",1,1,1,0 +"access_mail_message_project_manager","project.mail.message.manager","mail.model_mail_message","project.group_project_manager",1,1,1,0 +"access_mail_message_project_user","project.mail.message.user","mail.model_mail_message","project.group_project_user",1,1,1,0 |
