[IMP]: hr, hr_holidays: Minor improvements
bzr revid: rpa@tinyerp.com-20110310130454-495pmz0tnkp6w0tr
This commit is contained in:
parent
8375b1c772
commit
d6f5541202
|
@ -204,15 +204,8 @@ class hr_employee(osv.osv):
|
|||
level -= 1
|
||||
return True
|
||||
|
||||
# def _check_department_id(self, cr, uid, ids, context=None):
|
||||
# for emp in self.browse(cr, uid, ids, context=context):
|
||||
# if emp.department_id.manager_id and emp.id == emp.department_id.manager_id.id:
|
||||
# return False
|
||||
# return True
|
||||
|
||||
_constraints = [
|
||||
(_check_recursion, 'Error ! You cannot create recursive Hierarchy of Employees.', ['parent_id']),
|
||||
# (_check_department_id, 'Error ! You cannot select a department for which the employee is the manager.', ['department_id']),
|
||||
]
|
||||
|
||||
hr_employee()
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<form string="Leave Request">
|
||||
<group col="8" colspan="4">
|
||||
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}" />
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" groups="base.group_hr_manager, base.group_extended" string="Leave Type"/>
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" groups="base.group_hr_manager,base.group_extended" string="Leave Type"/>
|
||||
<group attrs="{'invisible':[('holiday_type','=','employee')]}">
|
||||
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/>
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue