From 516d7fbb4330f9d937eaf458c82411b6e855b8bc Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Mon, 3 Jun 2013 18:09:20 +0530 Subject: [PATCH] [IMP]hr_recruit : Improve create method and Improve lfilter help as per suggest bzr revid: dbr@tinyerp.com-20130603123920-6spa009pzvrhzxos --- addons/hr_holidays/hr_holidays_view.xml | 2 +- addons/hr_recruitment/hr_recruitment.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index 43c659847fc..1d6d2227e84 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -14,7 +14,7 @@ - + diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 364a4a851df..8fc104bf34f 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -577,9 +577,8 @@ class crm_meeting(osv.Model): _inherit = 'crm.meeting' def create(self, cr, uid, vals, context=None): - meeting_id = super(crm_meeting, self).create(cr, uid, vals, context=context) - obj_meeting = self.browse(cr, uid, meeting_id, context=context) - self.pool.get('hr.applicant').log_meeting(cr, uid, context.get('active_ids',[]), obj_meeting.name, obj_meeting.date, obj_meeting.duration, context=context) - return meeting_id + if 'active_ids' in context and 'active_model' in context and context['active_model'] == 'hr.applicant': + self.pool.get('hr.applicant').log_meeting(cr, uid, context['active_ids'], vals['name'], vals['date'], vals['duration'], context=context) + return super(crm_meeting, self).create(cr, uid, vals, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: