[IMP] survey : yml report test added

bzr revid: rme@tinyerp.com-20100916125850-pad2rt5je7ocvhxn
This commit is contained in:
RME (OpenERP) 2010-09-16 18:28:50 +05:30
parent ba148dba0a
commit 3d2f1f17e5
2 changed files with 9 additions and 0 deletions

View File

@ -47,6 +47,7 @@
'demo_xml': ['survey_demo.xml'],
'test': [
'test/survey00.yml',
'test/survey_report.yml',
],
'installable': True,
'active': False,

View File

@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on a survey, we will print a survey
-
!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)