[MERGE] Merged with lp:addons
[odoo/odoo.git] / addons / crm / wizard / crm_opportunity_to_phonecall.py
index 969a9c7..e6a1b98 100644 (file)
@@ -54,6 +54,12 @@ class crm_opportunity2phonecall(osv.osv_memory):
                 res.update({'categ_id': categ_id})
             if 'partner_id' in fields:
                 res.update({'partner_id': opp.partner_id and opp.partner_id.id or False})
+            if 'note' in fields:
+                res.update({'note': opp.description})
+            if 'contact_name' in fields:
+                res.update({'contact_name': opp.partner_address_id and opp.partner_address_id.name or False})
+            if 'phone' in fields:
+                res.update({'phone': opp.phone or (opp.partner_address_id and opp.partner_address_id.phone or False)})
         return res
 
     def action_schedule(self, cr, uid, ids, context=None):