odoo/addons/hr_payroll/test/hr_payroll_report.yml

13 lines
535 B
YAML

-
In order to test the PDF reports defined on HR Payroll, we will print Employees' Salary Structure
-
Print HR Payslip
-
!python {model: hr.payslip}: |
import os
import openerp.report
from openerp import tools
data, format = openerp.report.render_report(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], 'payslip.pdf', {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data)