[BUG-FIX] lp:731294 survey : Access rights for the Invited or and Survey User to Create Report Using netrpc local service

lp bug: https://launchpad.net/bugs/731294 fixed

bzr revid: jam@tinyerp.com-20110310054211-a9pxctozw27h5ujh
This commit is contained in:
Jigar Amin 2011-03-10 11:12:11 +05:30
parent 418a1beffd
commit 52447bde82
1 changed files with 1 additions and 2 deletions

View File

@ -447,7 +447,6 @@ class survey_question_wiz(osv.osv_memory):
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param res_ids: List of survey answer IDs,
@param report_name: name of the report,
@param file_name: To give file name of the report,
@ -458,7 +457,7 @@ class survey_question_wiz(osv.osv_memory):
return (False, Exception('Report name and Resources ids are required !!!'))
try:
service = netsvc.LocalService(report_name);
(result, format) = service.create(cr, uid, res_ids, {}, context)
(result, format) = service.create(cr, 1, res_ids, {}, context)
ret_file_name = addons.get_module_resource('survey', 'report') + file_name + '.pdf'
fp = open(ret_file_name, 'wb+');
fp.write(result);