2 In order to test the hr_holiday module in OpenERP, I will Allocate leaves for Employee and manage leaves and leaves requests.
4 I assign the dates in the holiday request.
6 !record {model: hr.holidays, id: hr_holiday1}:
8 holiday_status_id: holiday_status_cl
9 date_from: !eval time.strftime('%Y-%m-10')
10 date_to: !eval time.strftime('%Y-%m-11')
11 employee_id: hr.employee_fp
14 I confirmed the holiday request by clicking on "Confirm" button.
16 !workflow {model: hr.holidays, action: confirm, ref: hr_holidays_employee1_cl}
18 I find a small mistake on my leave request to I click on "Refuse" button to correct a mistake.
20 !workflow {model: hr.holidays, action: refuse, ref: hr_holidays_employee1_cl}
22 I again set to draft and then confirm.
24 !python {model: hr.holidays}: |
26 wf_service = netsvc.LocalService("workflow")
27 self.set_to_draft(cr, uid, [ref('hr_holidays_employee1_cl')])
28 wf_service.trg_validate(uid, 'hr.holidays', ref('hr_holidays_employee1_cl'), 'confirm', cr)
30 I validate the holiday request by clicking on "To Approve" button.
32 !workflow {model: hr.holidays, action: validate, ref: hr_holidays_employee1_cl}
34 I can also see Summary of Employee's holiday by using "Employee's Holidays" Report. This report will allows to choose to print holidays with state Confirmed, Validated or both.