35 lines
1.4 KiB
YAML
35 lines
1.4 KiB
YAML
-
|
|
In order to test the hr_holiday module in OpenERP, I will Allocate leaves for Employee and manage leaves and leaves requests.
|
|
-
|
|
I assign the dates in the holiday request.
|
|
-
|
|
!record {model: hr.holidays, id: hr_holiday1}:
|
|
name: Sick Leave
|
|
holiday_status_id: holiday_status_cl
|
|
date_from: !eval time.strftime('%Y-%m-10 10:00:00')
|
|
date_to: !eval time.strftime('%Y-%m-11 19:00:00')
|
|
employee_id: hr.employee_fp
|
|
type: remove
|
|
-
|
|
I confirmed the holiday request by clicking on "Confirm" button.
|
|
-
|
|
!workflow {model: hr.holidays, action: confirm, ref: hr_holidays_employee1_cl}
|
|
-
|
|
I find a small mistake on my leave request to I click on "Refuse" button to correct a mistake.
|
|
-
|
|
!workflow {model: hr.holidays, action: refuse, ref: hr_holidays_employee1_cl}
|
|
-
|
|
I again set to draft and then confirm.
|
|
-
|
|
!python {model: hr.holidays}: |
|
|
import netsvc
|
|
wf_service = netsvc.LocalService("workflow")
|
|
self.set_to_draft(cr, uid, [ref('hr_holidays_employee1_cl')])
|
|
wf_service.trg_validate(uid, 'hr.holidays', ref('hr_holidays_employee1_cl'), 'confirm', cr)
|
|
-
|
|
I validate the holiday request by clicking on "To Approve" button.
|
|
-
|
|
!workflow {model: hr.holidays, action: validate, ref: hr_holidays_employee1_cl}
|
|
-
|
|
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.
|