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=[])