From 7c8c006beb6fe137035edaa933b85a8903b02bca Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 14 Oct 2011 16:17:29 +0530 Subject: [PATCH] [IMP]: crm: Added internal note after wining the opportunity in lead2opportunity.yml bzr revid: ron@tinyerp.com-20111014104729-1la21n3mxpzb0qz7 --- addons/crm/test/process/lead2opportunity.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/addons/crm/test/process/lead2opportunity.yml b/addons/crm/test/process/lead2opportunity.yml index 108a0a74dbf..bb6ecef5327 100644 --- a/addons/crm/test/process/lead2opportunity.yml +++ b/addons/crm/test/process/lead2opportunity.yml @@ -35,6 +35,23 @@ - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: stage of opportunity is win}: - stage_id.name == "Won" +- + I want to add internal note to this opportunity, so i create note. +- + !record {model: crm.add.note, id: crm_add_note_won_opportunity}: + body: 'I won this Opportunity' +- + Apply this note to opportunity. +- + !python {model: crm.add.note}: | + self.action_add(cr, uid, [ref("crm_add_note_won_opportunity")], {"active_model": "crm.lead","active_ids": [ref("crm_case_qrecorp0")]}) +- + I will test Internal note added on opportunity . +- + !python {model: crm.lead}: | + lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) + message = 'I won this Opportunity' in lead.message_ids[-1].subject + assert message,'Fail to Added interal note on opportunity' - After winning the opportunity, i will test probability is 100. -