[IMP] share: go through RPCProxy instead of raw rpc.session.execute

bzr revid: xmo@openerp.com-20110121200348-9hardo2hog798ck7
This commit is contained in:
Xavier Morel 2011-01-21 21:03:48 +01:00
parent 916b46ec41
commit 90fdc7244d
1 changed files with 3 additions and 4 deletions

View File

@ -24,7 +24,6 @@ class ShareWizardController(openerp.controllers.SecuredController):
domain.extend(ast.literal_eval(search_domain))
action_id = action_id[0]
share_model = 'share.wizard'
scheme, netloc, _, _, _ = urlparse.urlsplit(cherrypy.request.base)
share_root_url = urlparse.urlunsplit((
@ -38,11 +37,11 @@ class ShareWizardController(openerp.controllers.SecuredController):
active_id=share_wiz_id[0],
_terp_view_name='Share Wizard',
share_root_url=share_root_url)
sharing_view_id = rpc.RPCProxy(share_model).create({
Share = rpc.RPCProxy('share.wizard')
sharing_view_id = Share.create({
'domain': str(domain),
'action_id':action_id
}, context)
return actions.execute(
rpc.session.execute('object', 'execute', share_model, 'go_step_1',
[sharing_view_id], context),
Share.go_step_1([sharing_view_id], context),
ids=[sharing_view_id], context=context)