[ADD]: crm: Added new yml merge2opportunity.yml

1) Merged two opportunity.
2) Checked Merged opportunity succeed

bzr revid: ron@tinyerp.com-20111014062432-gywyd1nevu33wfwy
This commit is contained in:
ron@tinyerp.com 2011-10-14 11:54:32 +05:30
parent c8b4c07d9b
commit a589f59ee9
2 changed files with 18 additions and 0 deletions

View File

@ -122,6 +122,7 @@ 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',

View File

@ -0,0 +1,17 @@
-
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!'