[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:
parent
418a1beffd
commit
52447bde82
|
@ -447,7 +447,6 @@ class survey_question_wiz(osv.osv_memory):
|
||||||
|
|
||||||
@param self: The object pointer
|
@param self: The object pointer
|
||||||
@param cr: the current row, from the database cursor,
|
@param cr: the current row, from the database cursor,
|
||||||
@param uid: the current user’s ID for security checks,
|
|
||||||
@param res_ids: List of survey answer IDs,
|
@param res_ids: List of survey answer IDs,
|
||||||
@param report_name: name of the report,
|
@param report_name: name of the report,
|
||||||
@param file_name: To give file 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 !!!'))
|
return (False, Exception('Report name and Resources ids are required !!!'))
|
||||||
try:
|
try:
|
||||||
service = netsvc.LocalService(report_name);
|
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'
|
ret_file_name = addons.get_module_resource('survey', 'report') + file_name + '.pdf'
|
||||||
fp = open(ret_file_name, 'wb+');
|
fp = open(ret_file_name, 'wb+');
|
||||||
fp.write(result);
|
fp.write(result);
|
||||||
|
|
Loading…
Reference in New Issue