diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index e3bd172d4e1..6d05d3edd3d 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -122,7 +122,6 @@ Creates a dashboard for CRM that includes: 'test/process/lead_open.yml', 'test/process/lead2opportunity.yml', 'test/process/cancel_lead.yml', - 'test/process/merge2opportunity.yml', 'test/process/meeting.yml', 'test/process/lead2_mass_convert_opportunity.yml', 'test/ui/lead_form.yml', diff --git a/addons/crm/test/process/lead2opportunity.yml b/addons/crm/test/process/lead2opportunity.yml index 5a9668adfd3..75026ccfb3e 100644 --- a/addons/crm/test/process/lead2opportunity.yml +++ b/addons/crm/test/process/lead2opportunity.yml @@ -40,3 +40,21 @@ - !assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Probability is equal to 100}: - probability == 100.0 +- + I have two opportunity ,so i will merge this two Opportunities. +- + !python {model: crm.merge.opportunity}: | + op_ids=self.pool.get('crm.lead').browse(cr, uid, [ref('crm_case_bankwealthy2'), ref('crm_case_unifliege')]) + self.merge(cr, uid, op_ids) + +- + I will test which two opportunity merged . +- + !python {model: crm.lead}: | + lead = self.browse(cr, uid, ref('crm_case_bankwealthy2')) + merge = 'Merged opportunities' in lead.message_ids[0].subject + assert merge,'Fail to create Merge opportunity' + assert lead.type == 'opportunity', 'Merged opportunity type not change!' + assert lead.partner_id.id == ref("base.res_partner_accent"), 'Partner missmatch!' + assert lead.stage_id.id == ref("stage_lead2"), 'Stage of probability is incorrect!' + \ No newline at end of file diff --git a/addons/crm/test/process/merge2opportunity.yml b/addons/crm/test/process/merge2opportunity.yml deleted file mode 100644 index 2161e191a81..00000000000 --- a/addons/crm/test/process/merge2opportunity.yml +++ /dev/null @@ -1,17 +0,0 @@ -- - I Merge two Opportunities. -- - !python {model: crm.merge.opportunity}: | - op_ids=self.pool.get('crm.lead').browse(cr, uid, [ref('crm_case_bankwealthy2'), ref('crm_case_unifliege')]) - self.merge(cr, uid, op_ids) - -- - I will test merged two opportunity. -- - !python {model: crm.lead}: | - lead = self.browse(cr, uid, ref('crm_case_bankwealthy2')) - merge = 'Merged opportunities' in lead.message_ids[0].subject - assert merge,'Fail to create Merge opportunity' - assert lead.type == 'opportunity', 'Merged opportunity type not change!' - assert lead.partner_id.id == ref("base.res_partner_accent"), 'Partner missmatch!' - assert lead.stage_id.id == ref("stage_lead2"), 'Stage of probability is incorrect!'