[IMP] pad: use get_session instead of session

bzr revid: xmo@openerp.com-20110209154326-tvqohq851i0j6b0y
This commit is contained in:
Xavier Morel 2011-02-09 16:43:26 +01:00
parent d02beb5f69
commit 24626799a8
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

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