From 60ee12e6e1b436a20c53523ebcbb9e093a2a6284 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 20 Dec 2011 17:25:06 +0100 Subject: [FIX] plugin: correct generated url for documents bzr revid: chs@openerp.com-20111220162506-001gf9whw9jhbl82 --- addons/plugin/plugin_handler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'addons/plugin/plugin_handler.py') diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index fd5ca7da6c6..8a9f2073c2d 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): -- cgit v1.2.3 From 96774c2e0fdef3361e00c1e78a4723e28cd71ee9 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 21 Dec 2011 14:33:23 +0530 Subject: [FIX]Plugin:change res_id into list bzr revid: sgo@tinyerp.com-20111221090323-y3hp3jj1u3i599uo --- addons/plugin/plugin_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/plugin/plugin_handler.py') diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 8a9f2073c2d..1fccae814b2 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -54,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) -- cgit v1.2.3