- In order to test Payment Advice I create a new Payment Advice - I create a new Payment Advice with NEFT Transaction Enable - !record {model: hr.payroll.advice, id: payment_advice_1}: name: 'NEFT Advice' bank_id: base.res_bank_1 line_ids: - employee_id: hr.employee_fp name: '90125452552' ifsc_code: 'abn45215145' bysal: 25000.00 - employee_id: hr.employee_al name: '00014521111232' ifsc_code: 'sbi45452145' bysal: 20000.00 - I check that the Payment Advice is in "Draft" - !assert {model: hr.payroll.advice, id: payment_advice_1}: - state == 'draft' - Now I confirm Payment Advice - !python {model: hr.payroll.advice}: | self.confirm_sheet(cr, uid, [ref('payment_advice_1')]) - I check that the Payment Advice state is "Confirmed" - !python {model: hr.payroll.advice}: | advice = self.browse(cr, uid, ref("payment_advice_1")) assert (advice.state == 'confirm') - In order to test the PDF report defined on a Payment Advice, we will print a Print Advice Report when NEFT is checked - !python {model: hr.payroll.advice}: | import netsvc, tools, os (data, format) = netsvc.LocalService('report.payroll.advice').create(cr, uid, [ref('l10n_in_hr_payroll.payment_advice_1')], {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'l10n_in_hr_payroll_summary report'+format), 'wb+').write(data)