openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #03253
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-720138-rha into lp:openobject-addons
Rifakat Haradwala (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-720138-rha into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
#720138 [PS] Phone call from applicant form view
https://bugs.launchpad.net/bugs/720138
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-720138-rha/+merge/50589
hr_recruitment: Phone call from applicant form view
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-720138-rha/+merge/50589
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-720138-rha.
=== modified file 'hr_recruitment/wizard/hr_recruitment_phonecall.py'
--- hr_recruitment/wizard/hr_recruitment_phonecall.py 2011-01-14 00:11:01 +0000
+++ hr_recruitment/wizard/hr_recruitment_phonecall.py 2011-02-21 12:39:59 +0000
@@ -51,10 +51,15 @@
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,
=== modified file 'hr_recruitment/wizard/hr_recruitment_phonecall_view.xml'
--- hr_recruitment/wizard/hr_recruitment_phonecall_view.xml 2011-01-14 00:11:01 +0000
+++ hr_recruitment/wizard/hr_recruitment_phonecall_view.xml 2011-02-21 12:39:59 +0000
@@ -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">
Follow ups