[FIX]Resolve conflicts.
bzr revid: bth@tinyerp.com-20130716090653-4xrtndazb02k2kof
This commit is contained in:
@@ -421,28 +421,6 @@ class hr_applicant(osv.Model):
|
||||
self.pool.get('hr.job').message_post(cr, uid, [applicant.job_id.id], body=_('Applicant <b>created</b>'), subtype="hr_recruitment.mt_job_new_applicant", context=context)
|
||||
return obj_id
|
||||
|
||||
<<<<<<< TREE
|
||||
def case_open(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
open Request of the applicant for the hr_recruitment
|
||||
"""
|
||||
res = super(hr_applicant, self).case_open(cr, uid, ids, context)
|
||||
date = self.read(cr, uid, ids, ['date_open'])[0]
|
||||
if not date['date_open']:
|
||||
self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S'),})
|
||||
return res
|
||||
|
||||
def case_close(self, cr, uid, ids, context=None):
|
||||
res = super(hr_applicant, self).case_close(cr, uid, ids, context)
|
||||
try:
|
||||
template_id = self.pool.get('ir.model.data').get_object(cr, uid, 'hr_recruitment', 'email_template_approve_applicant')
|
||||
except ValueError:
|
||||
template_id = False
|
||||
self._get_mail_template(cr, uid, ids, template_id, context)
|
||||
return res
|
||||
|
||||
def case_close_with_emp(self, cr, uid, ids, context=None):
|
||||
=======
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if isinstance(ids, (int, long)):
|
||||
ids = [ids]
|
||||
@@ -457,7 +435,6 @@ class hr_applicant(osv.Model):
|
||||
|
||||
def create_employee_from_applicant(self, cr, uid, ids, context=None):
|
||||
""" Create an hr.employee from the hr.applicants """
|
||||
>>>>>>> MERGE-SOURCE
|
||||
if context is None:
|
||||
context = {}
|
||||
hr_employee = self.pool.get('hr.employee')
|
||||
@@ -490,44 +467,6 @@ class hr_applicant(osv.Model):
|
||||
dict_act_window['view_mode'] = 'form,tree'
|
||||
return dict_act_window
|
||||
|
||||
<<<<<<< TREE
|
||||
def case_cancel(self, cr, uid, ids, context=None):
|
||||
"""Overrides cancel for crm_case for setting probability
|
||||
"""
|
||||
res = super(hr_applicant, self).case_cancel(cr, uid, ids, context)
|
||||
self.write(cr, uid, ids, {'probability': 0.0})
|
||||
try:
|
||||
template_id = self.pool.get('ir.model.data').get_object(cr, uid, 'hr_recruitment', 'email_template_refuse_applicant')
|
||||
except ValueError:
|
||||
template_id = False
|
||||
self._get_mail_template(cr, uid, ids, template_id, context)
|
||||
return res
|
||||
|
||||
def _get_mail_template(self, cr, uid, ids, template, context):
|
||||
mail_obj = self.pool.get('mail.mail')
|
||||
assert template._name == 'email.template'
|
||||
for applications in self.browse(cr, uid, ids, context=context):
|
||||
if applications.email_from:
|
||||
mail_id = self.pool.get('email.template').send_mail(cr, uid, template.id, applications.id, True, context=context)
|
||||
mail_state = mail_obj.read(cr, uid, mail_id, ['state'], context=context)
|
||||
if mail_state and mail_state['state'] == 'exception':
|
||||
raise self.pool.get('res.config.settings').get_config_warning(cr, _("Cannot send email: no outgoing email server configured.\nYou can configure it under %(menu:base_setup.menu_general_configuration)s."), context)
|
||||
|
||||
def case_pending(self, cr, uid, ids, context=None):
|
||||
"""Marks case as pending"""
|
||||
res = super(hr_applicant, self).case_pending(cr, uid, ids, context)
|
||||
self.write(cr, uid, ids, {'probability': 0.0})
|
||||
return res
|
||||
|
||||
def case_reset(self, cr, uid, ids, context=None):
|
||||
"""Resets case as draft
|
||||
"""
|
||||
res = super(hr_applicant, self).case_reset(cr, uid, ids, context)
|
||||
self.write(cr, uid, ids, {'date_open': False, 'date_closed': False})
|
||||
return res
|
||||
|
||||
=======
|
||||
>>>>>>> MERGE-SOURCE
|
||||
def set_priority(self, cr, uid, ids, priority, *args):
|
||||
"""Set applicant priority
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user