[IMP]hr_holidays: Set department readonly till approved.

bzr revid: mma@tinyerp.com-20120229131819-x8rmt9ew3a8uysmd
This commit is contained in:
Mayur Maheshwari (OpenERP)
2012-02-29 18:48:19 +05:30
parent a57180173f
commit c420db4bbf
+1 -1
View File
@@ -132,7 +132,7 @@ class hr_holidays(osv.osv):
'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone", select=True),
'parent_id': fields.many2one('hr.holidays', 'Parent'),
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, store=True),
'category_id': fields.many2one('hr.employee.category', "Category", help='Category of Employee'),
'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Category')], 'Allocation Type', help='By Employee: Allocation/Request for individual Employee, By Employee Category: Allocation/Request for group of employees in category', required=True),
'manager_id2': fields.many2one('hr.employee', 'Second Approval', readonly=True, help='This area is automaticly filled by the user who validate the leave with second level (If Leave type need second validation)'),