[IMP] survey : YML test for report added

bzr revid: ach@tinyerp.com-20100917042722-f6vpep1bq4brfr9o
This commit is contained in:
Anup (OpenERP)
2010-09-17 09:57:22 +05:30
parent 7cd3b2bef0
commit 0f70b04e5b
+18 -2
View File
@@ -1,8 +1,24 @@
-
In order to test the PDF reports defined on a survey, we will print a survey
In order to test the PDF reports defined on a Survey, we will print Survey Analysis Report
-
!python {model: survey}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.survey.analysis').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'survey-report.'+format), 'wb+').write(data)
file(os.path.join(tools.config['test_report_directory'], 'survey-survey_analysis_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Survey, we will print Survey Browse Response Report
-
!python {model: survey}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.survey.browse.response').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'survey-survey_browse_response_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Survey, we will print Survey Form Report
-
!python {model: survey}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.survey.form').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'survey-survey_form_report.'+format), 'wb+').write(data)