[IMP] hr_expense : yml report test added

bzr revid: rme@rme-desktop-20100915122958-99dz5gqeqppcq6as
This commit is contained in:
RME 2010-09-15 17:59:58 +05:30
parent 342d27536f
commit 59d97f99ff
2 changed files with 11 additions and 1 deletions

View File

@ -55,7 +55,9 @@
'demo_xml': [
'hr_expense_demo.xml',
],
'test': ['test/test_hr_expense.yml'],
'test': ['test/test_hr_expense.yml',
'test/hr_expense_report.yml',
],
'installable': True,
'active': False,
'certificate': '0062479841789',

View File

@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on a HR Expense, we will print a HR Expense
-
!python {model: hr.expense.expense}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.hr.expense').create(cr, uid, [ref('hr_expense.hr_expense_expense_septemberexpenses0'),ref('hr_expense.hr_expense_expense_septemberexpenses1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_expense_report.'+format), 'wb+').write(data)