diff options
| author | Vo Minh Thu <vmt@openerp.com> | 2013-06-04 15:14:28 +0200 |
|---|---|---|
| committer | Vo Minh Thu <vmt@openerp.com> | 2013-06-04 15:14:28 +0200 |
| commit | 3f8551e68c2a4dbe5436531df7d752fb60d0223a (patch) | |
| tree | a569f9a8d0be38537815d97229acee44788dbb78 /addons/plugin | |
| parent | 430be2d880de8dbb015d2e099f8ff7a2b02c44e5 (diff) | |
| parent | 95c9d77c9f6330c4f87da460124cc59d4bd852b2 (diff) | |
[MERGE] merged trunk.
bzr revid: vmt@openerp.com-20130604131428-nh9ikodh8lit5p7b
Diffstat (limited to 'addons/plugin')
| -rw-r--r-- | addons/plugin/i18n/ar.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/cs.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/de.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/es.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/es_CR.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/fi.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/fr.po | 6 | ||||
| -rw-r--r-- | addons/plugin/i18n/hr.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/hu.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/it.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/ja.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/lt.po | 23 | ||||
| -rw-r--r-- | addons/plugin/i18n/mk.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/mn.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/nb.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/nl.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/pt.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/pt_BR.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/ro.po | 6 | ||||
| -rw-r--r-- | addons/plugin/i18n/ru.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/sl.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/sv.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/tr.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/zh_CN.po | 4 | ||||
| -rw-r--r-- | addons/plugin/i18n/zh_TW.po | 4 | ||||
| -rw-r--r-- | addons/plugin/plugin_handler.py | 51 |
26 files changed, 99 insertions, 75 deletions
diff --git a/addons/plugin/i18n/ar.po b/addons/plugin/i18n/ar.po index abfdc3ce54f..7d067c1cec5 100644 --- a/addons/plugin/i18n/ar.po +++ b/addons/plugin/i18n/ar.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/cs.po b/addons/plugin/i18n/cs.po index 79828545d07..9281af77f55 100644 --- a/addons/plugin/i18n/cs.po +++ b/addons/plugin/i18n/cs.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/de.po b/addons/plugin/i18n/de.po index e378a4c4d64..f28299317d4 100644 --- a/addons/plugin/i18n/de.po +++ b/addons/plugin/i18n/de.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/es.po b/addons/plugin/i18n/es.po index f94eb4f4f5d..201865f3183 100644 --- a/addons/plugin/i18n/es.po +++ b/addons/plugin/i18n/es.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/es_CR.po b/addons/plugin/i18n/es_CR.po index fad73208752..18135961e06 100644 --- a/addons/plugin/i18n/es_CR.po +++ b/addons/plugin/i18n/es_CR.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/fi.po b/addons/plugin/i18n/fi.po index 18a4779ac39..28aad2a527b 100644 --- a/addons/plugin/i18n/fi.po +++ b/addons/plugin/i18n/fi.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/fr.po b/addons/plugin/i18n/fr.po index 0f7db46888c..da543f4ac66 100644 --- a/addons/plugin/i18n/fr.po +++ b/addons/plugin/i18n/fr.po @@ -15,10 +15,10 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler msgid "plugin.handler" -msgstr "Gestionnaire d'extensions" +msgstr "plugin.handler" diff --git a/addons/plugin/i18n/hr.po b/addons/plugin/i18n/hr.po index 35859569c48..c1604725008 100644 --- a/addons/plugin/i18n/hr.po +++ b/addons/plugin/i18n/hr.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/hu.po b/addons/plugin/i18n/hu.po index 03d15eec897..22e51632023 100644 --- a/addons/plugin/i18n/hu.po +++ b/addons/plugin/i18n/hu.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: 2013-02-10 04:49+0000\n" -"X-Generator: Launchpad (build 16482)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/it.po b/addons/plugin/i18n/it.po index 2146b659c2b..ec37aa064d8 100644 --- a/addons/plugin/i18n/it.po +++ b/addons/plugin/i18n/it.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/ja.po b/addons/plugin/i18n/ja.po index 7d4bf29fbf1..886bce3fb1d 100644 --- a/addons/plugin/i18n/ja.po +++ b/addons/plugin/i18n/ja.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/lt.po b/addons/plugin/i18n/lt.po new file mode 100644 index 00000000000..dc120cadcf2 --- /dev/null +++ b/addons/plugin/i18n/lt.po @@ -0,0 +1,23 @@ +# Lithuanian translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2012-12-21 17:05+0000\n" +"PO-Revision-Date: 2013-04-24 18:14+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Lithuanian <lt@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: 2013-04-25 05:20+0000\n" +"X-Generator: Launchpad (build 16580)\n" + +#. module: plugin +#: model:ir.model,name:plugin.model_plugin_handler +msgid "plugin.handler" +msgstr "plugin.handler" diff --git a/addons/plugin/i18n/mk.po b/addons/plugin/i18n/mk.po index 50e6a9b357f..6540892efd7 100644 --- a/addons/plugin/i18n/mk.po +++ b/addons/plugin/i18n/mk.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: 2013-03-02 04:57+0000\n" -"X-Generator: Launchpad (build 16514)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/mn.po b/addons/plugin/i18n/mn.po index d53d987fb1a..963b05e3715 100644 --- a/addons/plugin/i18n/mn.po +++ b/addons/plugin/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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/nb.po b/addons/plugin/i18n/nb.po index d88622bbd65..baec33ea16d 100644 --- a/addons/plugin/i18n/nb.po +++ b/addons/plugin/i18n/nb.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/nl.po b/addons/plugin/i18n/nl.po index 53dd6952b75..1979ad49ae7 100644 --- a/addons/plugin/i18n/nl.po +++ b/addons/plugin/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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/pt.po b/addons/plugin/i18n/pt.po index 87bd3314e3c..0f77670bc2f 100644 --- a/addons/plugin/i18n/pt.po +++ b/addons/plugin/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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/pt_BR.po b/addons/plugin/i18n/pt_BR.po index fb83608c02c..9e7dc729697 100644 --- a/addons/plugin/i18n/pt_BR.po +++ b/addons/plugin/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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/ro.po b/addons/plugin/i18n/ro.po index b689fa930a2..45f22192845 100644 --- a/addons/plugin/i18n/ro.po +++ b/addons/plugin/i18n/ro.po @@ -14,10 +14,10 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler msgid "plugin.handler" -msgstr "responsabil.plugin" +msgstr "plugin.handler (manipulare.extensie)" diff --git a/addons/plugin/i18n/ru.po b/addons/plugin/i18n/ru.po index b42adf3ef31..8d0640f28d3 100644 --- a/addons/plugin/i18n/ru.po +++ b/addons/plugin/i18n/ru.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/sl.po b/addons/plugin/i18n/sl.po index 21836736d51..e6069b9b240 100644 --- a/addons/plugin/i18n/sl.po +++ b/addons/plugin/i18n/sl.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: 2013-01-31 04:39+0000\n" -"X-Generator: Launchpad (build 16455)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/sv.po b/addons/plugin/i18n/sv.po index cc80d4e3206..083040607f6 100644 --- a/addons/plugin/i18n/sv.po +++ b/addons/plugin/i18n/sv.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/tr.po b/addons/plugin/i18n/tr.po index b5fbd10adbc..af19eea3086 100644 --- a/addons/plugin/i18n/tr.po +++ b/addons/plugin/i18n/tr.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/zh_CN.po b/addons/plugin/i18n/zh_CN.po index 1f974ec7ed8..7a3d2999bca 100644 --- a/addons/plugin/i18n/zh_CN.po +++ b/addons/plugin/i18n/zh_CN.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/i18n/zh_TW.po b/addons/plugin/i18n/zh_TW.po index 3f897e34920..a5d111a8b8e 100644 --- a/addons/plugin/i18n/zh_TW.po +++ b/addons/plugin/i18n/zh_TW.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: 2012-12-22 06:06+0000\n" -"X-Generator: Launchpad (build 16378)\n" +"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" +"X-Generator: Launchpad (build 16532)\n" #. module: plugin #: model:ir.model,name:plugin.model_plugin_handler diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 0664af1c92e..fc6c874fab5 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -4,7 +4,8 @@ Created on 18 oct. 2011 @author: openerp ''' -from openerp.osv import fields, osv +from openerp.osv import osv +from openerp.tools.translate import _ class plugin_handler(osv.osv_memory): _name = 'plugin.handler' @@ -29,7 +30,7 @@ class plugin_handler(osv.osv_memory): partner_ids = partner_obj.search(cr, uid, [('email', 'like', address_email)]) res_id = partner_ids and partner_ids[0] or 0 url = self._make_url(cr, uid, res_id, 'res.partner') - return ('res.partner', res_id , url) + return ('res.partner', res_id, url) def document_get(self, cr, uid, email): """ @@ -48,7 +49,7 @@ class plugin_handler(osv.osv_memory): message_id = msg.get('message_id') msg_id = False if message_id: - msg_ids = mail_message_obj.search(cr, uid, [('message_id','=', message_id)]) + msg_ids = mail_message_obj.search(cr, uid, [('message_id', '=', message_id)]) msg_id = len(msg_ids) and msg_ids[0] or False if not msg_id and parent_id: msg_id = parent_id @@ -57,8 +58,8 @@ class plugin_handler(osv.osv_memory): res_id = msg.res_id model = msg.model url = self._make_url(cr, uid, res_id, model) - name = self.pool.get(model).name_get(cr, uid, [res_id])[0][1] - return (model,res_id, url,name) + name = self.pool[model].name_get(cr, uid, [res_id])[0][1] + return (model, res_id, url, name) def document_type(self, cr, uid, context=None): """ @@ -81,7 +82,7 @@ class plugin_handler(osv.osv_memory): @return : the result of name_search a list of tuple [(id, 'name')] """ - return self.pool.get(model).name_search(cr, uid, name) + return self.pool[model].name_search(cr, uid, name) def push_message(self, cr, uid, model, email, res_id=0): """ @@ -91,29 +92,28 @@ class plugin_handler(osv.osv_memory): @return Dictionary which contain model , url and resource id. """ mail_message = self.pool.get('mail.message') - model_obj = self.pool.get(model) + model_obj = self.pool[model] msg = self.pool.get('mail.thread').message_parse(cr, uid, email) message_id = msg.get('message-id') - mail_ids = mail_message.search(cr, uid, [('message_id','=',message_id),('res_id','=',res_id),('model','=',model)]) - - if message_id and mail_ids : + mail_ids = mail_message.search(cr, uid, [('message_id', '=', message_id), ('res_id', '=', res_id), ('model', '=', model)]) + if message_id and mail_ids: mail_record = mail_message.browse(cr, uid, mail_ids)[0] res_id = mail_record.res_id - notify = "Email already pushed" + notify = _("Email already pushed") elif res_id == 0: if model == 'res.partner': - notify = 'User the Partner button to create a new partner' + notify = _('Use the Partner button to create a new partner') else: res_id = model_obj.message_process(cr, uid, model, email) - notify = "Mail successfully pushed, a new %s has been created " % model + notify = _("Mail successfully pushed, a new %s has been created.") % model else: model_obj.message_post(cr, uid, [res_id], - body= msg.get('body'), - subject= msg.get('subject'), - type= 'email', - parent_id= msg.get('parent_id'), - attachments= msg.get('attachments')) - notify = "Mail successfully pushed" + body=msg.get('body'), + subject=msg.get('subject'), + type='comment' if model == 'res.partner' else 'email', + parent_id=msg.get('parent_id'), + attachments=msg.get('attachments')) + notify = _("Mail successfully pushed") url = self._make_url(cr, uid, res_id, model) return (model, res_id, url, notify) @@ -154,16 +154,17 @@ class plugin_handler(osv.osv_memory): message_id = msg.get('message-id') push_mail = self.push_message(cr, uid, model, headers, res_id) res_id = push_mail[1] - model = push_mail[0] + model = push_mail[0] + notify = push_mail[3] for name in attachments.keys(): attachment_ids = ir_attachment_obj.search(cr, uid, [('res_model', '=', model), ('res_id', '=', res_id), ('datas_fname', '=', name)]) if attachment_ids: - attach_ids.append( attachment_ids[0]) + attach_ids.append(attachment_ids[0]) else: - vals = {"res_model": model, "res_id": res_id, "name": name, "datas" :attachments[name], "datas_fname" : name} + vals = {"res_model": model, "res_id": res_id, "name": name, "datas": attachments[name], "datas_fname": name} attach_ids.append(ir_attachment_obj.create(cr, uid, vals)) - mail_ids = mail_message.search(cr, uid, [('message_id','=',message_id),('res_id','=',res_id),('model','=',model)]) + mail_ids = mail_message.search(cr, uid, [('message_id', '=', message_id), ('res_id', '=', res_id), ('model', '=', model)]) if mail_ids: - ids = mail_message.write(cr, uid, mail_ids[0], { 'attachment_ids': [(6, 0, attach_ids)],'body':body,'body_html':body_html}) + mail_message.write(cr, uid, mail_ids[0], {'attachment_ids': [(6, 0, attach_ids)], 'body': body, 'body_html': body_html}) url = self._make_url(cr, uid, res_id, model) - return (model, res_id, url) + return (model, res_id, url, notify) |
