[IMP]: Test case
authorajay javiya (OpenERP) <aja@tinyerp.com>
Thu, 22 Aug 2013 13:04:25 +0000 (18:34 +0530)
committerajay javiya (OpenERP) <aja@tinyerp.com>
Thu, 22 Aug 2013 13:04:25 +0000 (18:34 +0530)
bzr revid: aja@tinyerp.com-20130822130425-gztp84k79rpzy7aa

addons/crm/test/lead2opportunity2win.yml

index f4289c5..b93578f 100644 (file)
 -
   Now I begin communication and schedule a phone call with the customer.
 -
-  !python {model: crm.phonecall}: |
+  !python {model: crm.phonecall2phonecall}: |
     import time
-    context.update({'active_model': 'crm.lead', 'active_ids': [ref('crm_case_3')]})
+    context.update({'active_model': 'crm.lead', 'active_ids': [ref('crm_case_3')],'active_id': ref('crm_case_3')})
     call_id = self.create(cr, uid, {'date': time.strftime('%Y-%m-%d %H:%M:%S'),
                 'name': "Bonjour M. Jean, Comment allez-vous? J'ai bien reçu votre demande, pourrions-nous en parler quelques minutes?"}, context=context)
     self.action_schedule(cr, uid, [call_id], context=context)
 -
-  I check that phonecall is scheduled for that opportunity.
--
-  !python {model: crm.phonecall}: |
-    ids = self.search(cr, uid, [('opportunity_id', '=', ref('crm_case_3'))])
-    assert len(ids), 'Phonecall is not scheduled'
--
   Now I schedule meeting with customer.
 -
   !python {model: crm.lead}: |