[IMP]hr_recruitment: add working address_id as company address and improve kanban view

bzr revid: jap@tinyerp.com-20130314062506-3hnk22rq8gz50sdb
This commit is contained in:
Jagdish Panchal 2013-03-14 11:55:06 +05:30
parent c87b99dd5c
commit 5fb909627a
2 changed files with 11 additions and 3 deletions

View File

@ -346,10 +346,12 @@ class hr_applicant(base_stage, osv.Model):
This override updates the document according to the email.
"""
if custom_values is None: custom_values = {}
val = msg.get('from').split('<')[0]
desc = html2plaintext(msg.get('body')) if msg.get('body') else ''
defaults = {
'name': msg.get('subject') or _("No Subject"),
'description': desc,
'partner_name':val,
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'user_id': False,
@ -429,7 +431,10 @@ class hr_applicant(base_stage, osv.Model):
emp_id = hr_employee.create(cr,uid,{'name': applicant.partner_name or contact_name,
'job_id': applicant.job_id.id,
'address_home_id': address_id,
'department_id': applicant.department_id.id
'department_id': applicant.department_id.id,
'address_id': applicant.department_id.company_id.id,
'work_email': applicant.department_id.company_id.email,
'work_phone': applicant.department_id.company_id.phone,
})
self.write(cr, uid, [applicant.id], {'emp_id': emp_id}, context=context)
self.case_close(cr, uid, [applicant.id], context)

View File

@ -254,15 +254,17 @@
<li><a name="action_makeMeeting" type="object">Schedule Interview</a></li>
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
</ul>
</div>
<div class="oe_kanban_content" tooltip="kanban-tooltip">
<div>
<t t-if="record.partner_name.raw_value"><b><field name="partner_name"/></b><br/></t>
<i><field name="name"/></i><br/>
<field name="job_id"/><br/>
<t t-if="record.partner_mobile.raw_value">Mobile: <field name="partner_mobile"/><br/></t>
<t t-if="record.title_action.raw_value"><field name="title_action"/><br/></t>
<field name="date_action"/>
<t t-if="record.title_action.raw_value"><field name="title_action"/><br/></t>
<field name="categ_ids"/><br/>
<t t-if="record.partner_mobile.raw_value">Mobile: <field name="partner_mobile"/><br/></t>
</div>
<div class="oe_kanban_right">
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
@ -284,6 +286,7 @@
<div class="oe_kanban_footer_left" style="margin-top:5px;">
<field name="categ_ids"/>
</div>
</div>
<div class="oe_clear"></div>
</div>