[IMP] hr_payroll: Minor improvement in payslip.yml

bzr revid: mra@mra-laptop-20110607083611-50p6d0a1uaxmcd3q
This commit is contained in:
Mustufa Rangwala 2011-06-07 14:06:11 +05:30
parent 0dc9fd9baf
commit 1a1ee753b8
1 changed files with 15 additions and 22 deletions

View File

@ -1,21 +1,16 @@
-
I test the 'Payslip' in order to check the hr_payroll module in OpenERP
I test "Payslip" in order to check the hr_payroll module in OpenERP
-
I create a new employee “Richard”
I create a new employee "Richard"
-
!record {model: hr.employee, id: hr_employee_richard0}:
address_home_id: base.res_partner_address_2
address_id: base.res_partner_address_9
birthday: '1984-05-01'
children: 0.0
country_id: base.in
country_id: base.be
department_id: hr.dep_it
gender: male
marital: single
name: Richard
vehicle_distance: 0.0
-
I create a salary structure for 'Software Developer'
I create a salary structure for "Software Developer"
-
!record {model: hr.payroll.structure, id: hr_payroll_structure_softwaredeveloper}:
name: Salary Structure for Software Developer
@ -30,7 +25,7 @@
- hr_salary_rule_meal_voucher
- hr_salary_rule_sales_commission
-
I create a contract for 'Richard'
I create a contract for "Richard"
-
!record {model: hr.contract, id: hr_contract_richard}:
date_end: !eval "'%s-%s-%s' %(datetime.now().year+1,datetime.now().month,datetime.now().day)"
@ -42,7 +37,7 @@
struct_id: hr_payroll_structure_softwaredeveloper
working_hours: resource.timesheet_group1
-
I create a Payslip
I create a Employee Payslip
-
!record {model: hr.payslip, id: hr_payslip_0}:
employee_id: hr_payroll.hr_employee_richard0
@ -56,10 +51,8 @@
date_from = time.strftime('%Y-%m-01')
worked_days_obj = self.pool.get('hr.payslip.worked_days')
date_to = str(datetime.now() + relativedelta.relativedelta(months=+1, day=1, days=-1))[:10]
emp_id = self.pool.get('hr.employee').search(cr, uid, [('id', '=', ref("hr_employee_richard0"))])
res = self.onchange_employee_id(cr, uid, [], date_from, date_to, ref("hr_employee_richard0"), False, None)
vals = {
'employee_id': emp_id[0],
'struct_id': res['value']['struct_id'],
'contract_id': res['value']['contract_id'],
'name': res['value']['name'],
@ -81,7 +74,7 @@
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
assert(payslip_brw.state == 'draft'), _('State not changed!')
-
I click on 'Compute Sheet' button
I click on 'Compute Sheet' button on payslip
-
!python {model: hr.payslip}: |
self.compute_sheet(cr, uid, [ref("hr_payslip_0")], {"lang": "en_US", "tz": False,
@ -89,7 +82,7 @@
"section_id": False, "active_id": ref("hr_payroll.menu_department_tree"),
})
-
Then I click on the 'Confirm' button
Then I click on the 'Confirm' button on payslip
-
!workflow {model: hr.payslip, action: hr_verify_sheet, ref: hr_payslip_0}
-