[IMP]: hr related changes
bzr revid: ksa@tinyerp.co.in-20110216084531-xr94jx9116ns3qyh
This commit is contained in:
+6
-6
@@ -204,15 +204,15 @@ 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
|
||||
# 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']),
|
||||
# (_check_department_id, 'Error ! You cannot select a department for which the employee is the manager.', ['department_id']),
|
||||
]
|
||||
|
||||
hr_employee()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</record>
|
||||
|
||||
<record id="base.group_hr_user" model="res.groups">
|
||||
<field name="name">Human Resources / User</field>
|
||||
<field name="name">Human Resources / Officer</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<field name="state" colspan="2"/>
|
||||
<group colspan="2" col="6">
|
||||
<button string="Refuse" name="refuse" states="confirm,validate,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user,base.group_hr_manager"/>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
|
||||
<button string="Submit to Manager" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/>
|
||||
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/>
|
||||
<button string="Set to Draft" name="set_to_draft" states="refuse" type="object" icon="gtk-convert" groups="base.group_hr_user"/>
|
||||
@@ -414,7 +414,7 @@
|
||||
</record>
|
||||
|
||||
<menuitem sequence="3" id="hr.menu_open_view_attendance_reason_config" parent="hr.menu_hr_configuration" name="Holidays"/>
|
||||
|
||||
|
||||
<menuitem name="Leave Type"
|
||||
action="open_view_holiday_status"
|
||||
id="menu_open_view_holiday_status"
|
||||
|
||||
Reference in New Issue
Block a user