From e801fd546a4b8fb3c602dae89175dd06f8b0dab9 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Fri, 14 Dec 2012 14:43:00 +0530 Subject: [PATCH 1/4] [IMP] Improved HR module Employee tags bzr revid: ggh@tinyerp.com-20121214091300-4cz6wbaub022damr --- addons/hr/hr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 21c2e0fc6da..7062f053b5e 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -46,9 +46,9 @@ class hr_employee_category(osv.osv): _name = "hr.employee.category" _description = "Employee Category" _columns = { - 'name': fields.char("Category", size=64, required=True), + 'name': fields.char("Employee Tag", size=64, required=True), 'complete_name': fields.function(_name_get_fnc, type="char", string='Name'), - 'parent_id': fields.many2one('hr.employee.category', 'Parent Category', select=True), + 'parent_id': fields.many2one('hr.employee.category', 'Parent Employee Tag', select=True), 'child_ids': fields.one2many('hr.employee.category', 'parent_id', 'Child Categories'), 'employee_ids': fields.many2many('hr.employee', 'employee_category_rel', 'category_id', 'emp_id', 'Employees'), } From 3d3e08913d5d9a85aae58b135ff4da83a2e27b29 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Fri, 14 Dec 2012 16:07:01 +0530 Subject: [PATCH 2/4] [IMP] Improve hr_holidays tooltip bzr revid: ggh@tinyerp.com-20121214103701-h9i7s9si1lwzqtdc --- addons/hr_holidays/hr_holidays.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 23e23dd33b5..fdd4f1babe5 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -79,7 +79,7 @@ class hr_holidays_status(osv.osv): 'categ_id': fields.many2one('crm.meeting.type', 'Meeting Type', help='Once a leave is validated, OpenERP will create a corresponding meeting of this type in the calendar.'), 'color_name': fields.selection([('red', 'Red'),('blue','Blue'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Department.'), - 'limit': fields.boolean('Allow to Override Limit', help='If you select this check box, the system allows the employees to take more leaves than the available ones for this type and take them into account for the "Remaining Legal Leaves" defined on the employee form.'), + 'limit': fields.boolean('Allow to Override Limit', help='If you select this check box, the system allows the employees to take more leaves than the available ones for this type and will not take them into account for the "Remaining Legal Leaves" defined on the employee form.'), 'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."), 'max_leaves': fields.function(_user_left_days, string='Maximum Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'), 'leaves_taken': fields.function(_user_left_days, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'), From c6ff1f2fb57b8ba0d0eaca734a03de9b800743ee Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Fri, 14 Dec 2012 18:02:47 +0530 Subject: [PATCH 3/4] [IMP] Improved sql_constraint in hr Job Positions bzr revid: ggh@tinyerp.com-20121214123247-mr9xz5f6pnos84pd --- addons/hr/hr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 7062f053b5e..b8702a50b8c 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -121,7 +121,7 @@ class hr_job(osv.osv): } _sql_constraints = [ - ('name_company_uniq', 'unique(name, company_id)', 'The name of the job position must be unique per company!'), + ('name_company_uniq', 'unique(name, company_id, department_id)', 'The name of the job position must be unique per company!'), ] From 6e8c9b9d686f954a9d0d12793013a8dbddb7455c Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Fri, 14 Dec 2012 18:56:56 +0530 Subject: [PATCH 4/4] [IMP]Improved Constraint Error message in job positions bzr revid: ggh@tinyerp.com-20121214132656-opjfm3ruu0vloaqx --- addons/hr/hr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index b8702a50b8c..8185c906582 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -121,7 +121,7 @@ class hr_job(osv.osv): } _sql_constraints = [ - ('name_company_uniq', 'unique(name, company_id, department_id)', 'The name of the job position must be unique per company!'), + ('name_company_uniq', 'unique(name, company_id, department_id)', 'The name of the job position must be unique per department in company!'), ]