2010-09-15 12:19:56 +00:00
|
|
|
-
|
2010-09-17 15:47:16 +00:00
|
|
|
In order to test the PDF reports defined on HR Payroll, we will print Employees' Salary Structure
|
2010-09-15 12:19:56 +00:00
|
|
|
-
|
2010-09-17 15:47:16 +00:00
|
|
|
Print HR Payslip
|
2010-12-21 12:07:40 +00:00
|
|
|
-
|
2010-09-15 12:19:56 +00:00
|
|
|
!python {model: hr.payslip}: |
|
|
|
|
import netsvc, tools, os
|
|
|
|
(data, format) = netsvc.LocalService('report.payslip.pdf').create(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], {}, {})
|
|
|
|
if tools.config['test_report_directory']:
|
2011-06-09 12:55:16 +00:00
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data)
|