From 610ebaef85a8ce60009b5cada2865dc8e281342d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 11 Feb 2014 13:04:33 +0100 Subject: [PATCH] [CLEAN] hr: moved color field + an action in hr_recruitment, because they are used in this module + removed unnecessary code bzr revid: tde@openerp.com-20140211120433-f34jsy7xjga1ultt --- addons/hr/hr.py | 9 --------- addons/hr/hr_view.xml | 3 ++- addons/hr_recruitment/hr_recruitment.py | 7 ++++++- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 4e83c8e37d6..101629482eb 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -120,7 +120,6 @@ class hr_job(osv.Model): string='Status', readonly=True, required=True, track_visibility='always', help="By default 'Closed', set it to 'In Recruitment' if recruitment process is going on for this job position."), - 'color': fields.integer('Color Index'), 'write_date': fields.datetime('Update Date', readonly=True), } @@ -134,14 +133,6 @@ class hr_job(osv.Model): ('hired_employee_check', "CHECK ( no_of_hired_employee <= no_of_recruitment )", "Number of hired employee must be less than expected number of employee in recruitment."), ] - def on_change_expected_employee(self, cr, uid, ids, no_of_recruitment, no_of_employee, context=None): - if context is None: - context = {} - return {'value': {'expected_employees': no_of_recruitment + no_of_employee}} - - def action_set_no_of_recruitment(self, cr, uid, id, value, context=None): - return self.write(cr, uid, [id], {'no_of_recruitment': value}, context=context) - def set_recruit(self, cr, uid, ids, context=None): for job in self.browse(cr, uid, ids, context=context): no_of_recruitment = job.no_of_recruitment == 0 and 1 or job.no_of_recruitment diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index c8aa202301a..5b0a58ec883 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -347,7 +347,7 @@