From 51fda3b52f52e60163f385fed82570cc6673fdbf Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 14 Mar 2011 11:43:27 +0100 Subject: [PATCH] [MERGE] cherry picking of revision 4422-4423 of lp:~openerp-dev/openobject-addons/trunk-dev2-hr-improvements bzr revid: qdp-launchpad@openerp.com-20110314104327-3n3xfjibl4x0yy2y --- addons/hr/hr.py | 12 ++-- addons/hr/security/hr_security.xml | 2 +- addons/hr_holidays/hr_holidays_data.xml | 1 + addons/hr_holidays/hr_holidays_view.xml | 12 ++-- addons/hr_recruitment/__openerp__.py | 1 + addons/hr_recruitment/hr_recruitment.py | 23 ++++++- addons/hr_recruitment/hr_recruitment_view.xml | 3 +- addons/hr_recruitment/wizard/__init__.py | 1 + .../wizard/hr_recruitment_employee_hired.py | 61 +++++++++++++++++++ .../wizard/hr_recruitment_employee_hired.xml | 33 ++++++++++ 10 files changed, 131 insertions(+), 18 deletions(-) create mode 100644 addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py create mode 100644 addons/hr_recruitment/wizard/hr_recruitment_employee_hired.xml diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 917e5f77b7a..4a5529c11a4 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -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() diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml index 61aa5a93b12..aba7d4b45e1 100644 --- a/addons/hr/security/hr_security.xml +++ b/addons/hr/security/hr_security.xml @@ -7,7 +7,7 @@ - Human Resources / User + Human Resources / Officer diff --git a/addons/hr_holidays/hr_holidays_data.xml b/addons/hr_holidays/hr_holidays_data.xml index 96fb29deae2..4e3a79f18f1 100644 --- a/addons/hr_holidays/hr_holidays_data.xml +++ b/addons/hr_holidays/hr_holidays_data.xml @@ -5,6 +5,7 @@ Casual Leave + True black diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index a6adb1926d2..481d8cf87e9 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -93,11 +93,11 @@ -