← Back to team overview

openerp-dev-web team mailing list archive

[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/50573
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-720138-rha/+merge/50573
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-720138-rha.
=== modified file 'crm/crm_phonecall_view.xml'
--- crm/crm_phonecall_view.xml	2011-01-17 22:22:19 +0000
+++ crm/crm_phonecall_view.xml	2011-02-21 10:56:36 +0000
@@ -87,7 +87,7 @@
                         icon="terp-partner"
                         name="%(action_crm_phonecall2partner)d"
                         type="action"
-                        attrs="{'invisible':[('partner_id','!=',False)]}" 
+                        attrs="{'invisible':[('partner_id','!=',False)]}"
                         groups="base.group_partner_manager"/>
                     <newline/>
                     <field name="partner_address_id"

=== 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 10:56:36 +0000
@@ -53,8 +53,16 @@
         case_obj = self.pool.get('hr.applicant')
         if context is None:
             context = {}
+        content = []
+        cont = False
         case = case_obj.browse(cr, uid, context.get('active_id', False), context=context)
-        return case.description or ''
+        if case.message_ids:
+            for msg in case.message_ids:
+                if msg.email_from and msg.email_to:
+                    content.append(msg)
+        if content:
+            cont = content[0].description
+        return cont
 
     _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 10:56:36 +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