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}: |
|
2013-02-09 06:29:29 +00:00
|
|
|
import os
|
2013-02-22 13:35:11 +00:00
|
|
|
import openerp.report
|
|
|
|
from openerp import tools
|
|
|
|
data, format = openerp.report.render_report(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], 'payslip.pdf', {}, {})
|
2010-09-15 12:19:56 +00:00
|
|
|
if tools.config['test_report_directory']:
|
2013-02-22 13:35:11 +00:00
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data)
|