2 In order to test Payment Advice I create a new Payment Advice
4 I create a new Payment Advice with NEFT Transaction Enable
6 !record {model: hr.payroll.advice, id: payment_advice_1}:
8 bank_id: base.res_bank_1
10 - employee_id: hr.employee_fp
12 ifsc_code: 'abn45215145'
14 - employee_id: hr.employee_al
15 name: '00014521111232'
16 ifsc_code: 'sbi45452145'
19 I check that the Payment Advice is in "Draft"
21 !assert {model: hr.payroll.advice, id: payment_advice_1}:
24 Now I confirm Payment Advice
26 !python {model: hr.payroll.advice}: |
27 self.confirm_sheet(cr, uid, [ref('payment_advice_1')])
29 I check that the Payment Advice state is "Confirmed"
31 !python {model: hr.payroll.advice}: |
32 advice = self.browse(cr, uid, ref("payment_advice_1"))
33 assert (advice.state == 'confirm')
35 In order to test the PDF report defined on a Payment Advice, we will print a Print Advice Report when NEFT is checked
37 !python {model: hr.payroll.advice}: |
40 from openerp import tools
41 data, format = openerp.report.render_report(cr, uid, [ref('l10n_in_hr_payroll.payment_advice_1')], 'payroll.advice', {}, {})
42 if tools.config['test_report_directory']:
43 file(os.path.join(tools.config['test_report_directory'], 'l10n_in_hr_payroll_summary report'+format), 'wb+').write(data)