[MERGE] l10n_in_hr_payroll: Add yaml for payment advice (Made some improvements on requsted merge proposal)
bzr revid: mra@tinyerp.com-20120727054728-37x98vwmnc6mm9x0
This commit is contained in:
@@ -54,6 +54,10 @@ Indian Payroll Salary Rules.
|
||||
'report/payment_advice_report_view.xml',
|
||||
|
||||
],
|
||||
'test': [
|
||||
'test/payment_advice.yml',
|
||||
],
|
||||
|
||||
'demo_xml': ['l10n_in_hr_payroll_demo.xml'],
|
||||
'installable': True
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
-
|
||||
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)
|
||||
Reference in New Issue
Block a user