summaryrefslogtreecommitdiff
path: root/addons/plugin
diff options
context:
space:
mode:
authortfr@openerp.com <>2011-12-26 10:07:45 +0100
committertfr@openerp.com <>2011-12-26 10:07:45 +0100
commitb59fea4e68264ea480184e6c78035883380e3827 (patch)
tree3d8940b53e7acfe1389165b144dacf7f743b8e70 /addons/plugin
parent11d93b49445c960e5ecdc05180b4dae33d2be1ec (diff)
parent052223704b234c7370c34d3091fa9bf4f47b2165 (diff)
[MERGE] trunk
bzr revid: tfr@openerp.com-20111226090745-o0hk7gjllsriulrs
Diffstat (limited to 'addons/plugin')
-rw-r--r--addons/plugin/i18n/plugin.pot22
-rw-r--r--addons/plugin/plugin_handler.py7
2 files changed, 26 insertions, 3 deletions
diff --git a/addons/plugin/i18n/plugin.pot b/addons/plugin/i18n/plugin.pot
new file mode 100644
index 00000000000..ed95b4c18e8
--- /dev/null
+++ b/addons/plugin/i18n/plugin.pot
@@ -0,0 +1,22 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * plugin
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1beta\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-12-22 18:46+0000\n"
+"PO-Revision-Date: 2011-12-22 18:46+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: plugin
+#: model:ir.model,name:plugin.model_plugin_handler
+msgid "plugin.handler"
+msgstr ""
+
diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py
index 3c322b67bf4..0473fed55c6 100644
--- a/addons/plugin/plugin_handler.py
+++ b/addons/plugin/plugin_handler.py
@@ -12,13 +12,14 @@ class plugin_handler(osv.osv_memory):
def _make_url(self, cr, uid, res_id, model, context=None):
"""
- @param id: on which document the message is pushed
+ @param res_id: on which document the message is pushed
@param model: name of the document linked with the mail
@return url
"""
base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url', default='http://localhost:8069', context=context)
if base_url:
- base_url += '/?id=%s&model=%s'%(res_id,model)
+ user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
+ base_url += '/web/webclient/login?db=%s&login=%s&key=%s#id=%s&model=%s' % (cr.dbname, user.login, user.password, res_id, model)
return base_url
def is_installed(self, cr, uid):
@@ -53,7 +54,7 @@ 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]
+ name = self.pool.get(model).name_get(cr, uid, [res_id])[0][1]
return (model,res_id, url,name)