2010-07-29 09:33:52 +00:00
-
In order to test the hr_holiday module in OpenERP, I will Allocate leaves for Employee and manage leaves and leaves requests.
2011-09-22 12:28:35 +00:00
-
I assign the dates in the holiday request.
-
2011-11-16 18:59:32 +00:00
!record {model: hr.holidays, id: hr_holiday1}:
2011-11-14 11:49:06 +00:00
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')
2011-12-22 13:35:59 +00:00
employee_id : hr.employee_fp
2011-11-14 11:49:06 +00:00
type : remove
2011-09-22 12:28:35 +00:00
-
2011-11-14 11:49:06 +00:00
I find a small mistake on my leave request to I click on "Refuse" button to correct a mistake.
2011-09-22 12:28:35 +00:00
-
2011-11-14 11:49:06 +00:00
!workflow {model: hr.holidays, action: refuse, ref: hr_holidays_employee1_cl}
2011-09-22 12:28:35 +00:00
-
I again set to draft and then confirm.
-
!python {model: hr.holidays}: |
2013-08-05 11:30:23 +00:00
self.holidays_reset(cr, uid, [ref('hr_holidays_employee1_cl')])
2014-07-06 14:44:26 +00:00
self.signal_workflow(cr, uid, [ref('hr_holidays_employee1_cl')], 'confirm')
2010-07-29 09:33:52 +00:00
-
2011-11-14 11:49:06 +00:00
I validate the holiday request by clicking on "To Approve" button.
2010-07-29 09:33:52 +00:00
-
2011-11-14 11:49:06 +00:00
!workflow {model: hr.holidays, action: validate, ref: hr_holidays_employee1_cl}
2010-07-29 09:33:52 +00:00
-
2011-11-14 11:49:06 +00:00
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.