[MERGE] l10n_in_hr_payroll: Add yaml

bzr revid: mra@tinyerp.com-20120814094105-xh8g9ni41oc6fh26
This commit is contained in:
Mustufa Rangwala (OpenERP) 2012-08-14 15:11:05 +05:30
commit 5c47881729
1 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,45 @@
-
In order to test Payment Advice creation from Payslip Bacth I create New Payslip Batch
-
I want to generate a payslip from Payslip Batch.
-
!record {model: hr.payslip.run, id: hr_payslip_run_forAdvice}:
name: Payslip Batch for August
-
I create record for generating the payslip for this Payslip Batch.
-
!record {model: hr.payslip.employees, id: hr_payslip_employees}:
employee_ids:
- hr_payroll.hr_employee_bonamy0
-
I generate the payslip by clicking on Generat button wizard.
-
!python {model: hr.payslip.employees}: |
self.compute_sheet(cr, uid, [ref('hr_payslip_employees')], context={'active_id': ref('hr_payslip_run_forAdvice')})
-
I check that the Payslip Batch is in "Draft"
-
!assert {model: hr.payslip.run, id: hr_payslip_run_forAdvice}:
- state == 'draft'
-
Now I close Payslip Batch
-
!python {model: hr.payslip.run}: |
self.close_payslip_run(cr, uid, [ref('hr_payslip_run_forAdvice')])
-
I check that the Payslip Batch is "Close"
-
!python {model: hr.payslip.run}: |
batch = self.browse(cr, uid, ref("hr_payslip_run_forAdvice"))
assert (batch.state == 'close')
-
I Create Advice from Payslip Batch using Create Advice button
-
!python {model: hr.payslip.run}: |
self.create_advice(cr, uid, [ref('hr_payslip_run_forAdvice')])
-
I check for Advice is created from Payslip Batch
-
!python {model: hr.payroll.advice}: |
advice_ids = self.search(cr, uid, [('batch_id','=',ref('hr_payslip_run_forAdvice'))])
assert advice_ids,"Advice is not created from Payslip Batch."