[Fix]: hr_recruitment: Phone call from applicant form view

lp bug: https://launchpad.net/bugs/720138 fixed

bzr revid: rha@tinyerp.com-20110221123246-0wa208jwmu1ant1c
This commit is contained in:
Rifakat Haradwala (Open ERP) 2011-02-21 18:02:46 +05:30
parent 91c1768528
commit 8d7cb75b14
2 changed files with 7 additions and 2 deletions

View File

@ -51,10 +51,15 @@ class job2phonecall(osv.osv_memory):
def _get_note(self, cr, uid, context=None):
case_obj = self.pool.get('hr.applicant')
msg_obj = self.pool.get('mailgate.message')
if context is None:
context = {}
content = False
case = case_obj.browse(cr, uid, context.get('active_id', False), context=context)
return case.description or ''
msgs = msg_obj.search(cr, uid, [('model', '=', 'hr.applicant'), ('res_id', '=', case.id), ('email_from', '!=', ''), ('email_to', '!=', '')], limit=1)
if msgs:
content = msg_obj.browse(cr, uid, msgs[0], context=context).description
return case.description or content or False
_defaults = {
'user_id': _date_user,

View File

@ -16,7 +16,7 @@
<newline />
<field name='note' colspan="4"/>
<newline />
<field name='category_id'/>
<field name='category_id' domain="[('object_id.model', '=', 'crm.phonecall')]"/>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">