From 24626799a848a90e0c719b837af9b39eef118c7f Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 9 Feb 2011 16:43:26 +0100 Subject: [PATCH] [IMP] pad: use get_session instead of session bzr revid: xmo@openerp.com-20110209154326-tvqohq851i0j6b0y --- addons/pad/__openerp__.py | 2 +- addons/pad/web/controllers.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/pad/__openerp__.py b/addons/pad/__openerp__.py index 6d0f24c53a1..c7f379050bf 100644 --- a/addons/pad/__openerp__.py +++ b/addons/pad/__openerp__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- { 'name': 'Enhanced support for (Ether)Pad attachments', - 'version': '1.0.1', + 'version': '1.0.2', 'category': 'Generic Modules/Others', 'description': """ Adds enhanced support for (Ether)Pad attachments in the web client, lets the diff --git a/addons/pad/web/controllers.py b/addons/pad/web/controllers.py index 9c439f1e656..3eae97c880d 100644 --- a/addons/pad/web/controllers.py +++ b/addons/pad/web/controllers.py @@ -12,7 +12,7 @@ class Piratepad(openerp.controllers.SecuredController): def get_root(self): return rpc.RPCProxy('res.company').read( - [rpc.session.company_id], ['pad_index'])[0]['pad_index'] + [rpc.get_session().company_id], ['pad_index'])[0]['pad_index'] def make_url(self, pad_name): return urlparse.urljoin( @@ -22,7 +22,7 @@ class Piratepad(openerp.controllers.SecuredController): @expose('json', methods=('POST',)) def link(self, pad_name): params, data = TinyDict.split(cherrypy.session['params']) - ctx = dict(rpc.session.context, + ctx = dict(rpc.get_session().context, default_res_model=params.model, default_res_id=params.id, active_id=False, active_ids=[])