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

1) cheked convert two lead to opportunity.
2) Checked record according to lead

bzr revid: ron@tinyerp.com-20111013131202-aku0tvzavpyz4efp
This commit is contained in:
ron@tinyerp.com
2011-10-13 18:42:02 +05:30
parent 65304c97f7
commit c8b4c07d9b
2 changed files with 33 additions and 0 deletions
+1
View File
@@ -123,6 +123,7 @@ Creates a dashboard for CRM that includes:
'test/process/lead2opportunity.yml',
'test/process/cancel_lead.yml',
'test/process/meeting.yml',
'test/process/lead2_mass_convert_opportunity.yml',
'test/ui/lead_form.yml',
'test/test_crm_opportunity.yml',
'test/process/phonecall2opportunity.yml',
@@ -0,0 +1,32 @@
-
Using mass wizard, convert two lead to opportunity.
-
!record {model: crm.lead2opportunity.partner.mass, id: crm_lead2opportunity_partner_mass0}:
user_ids:
- base.user_root
section_id: crm.section_sales_department
-
Leads coverts to mass opportunity.
-
!python {model: crm.lead2opportunity.partner.mass}: |
self.mass_convert(cr, uid, [ref("crm_lead2opportunity_partner_mass0")],{'active_ids': [ref("crm_case_employee0"), ref("crm_case_electonicgoodsdealer0")], 'active_id': ref("crm_case_qrecorp0")})
-
First lead converted on opportunity.i test it.
-
!python {model: crm.lead}: |
lead = self.browse(cr, uid, ref('crm_case_employee0'))
assert lead.type == 'opportunity', 'Lead is not converted to opportunity!'
assert lead.planned_revenue == 0.0, 'Planned revenue should be 0!'
assert lead.probability == 0.0, 'probability revenue should be 0!'
assert lead.partner_id.name == "Agrolait", 'Partner missmatch!'
assert lead.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!'
-
Second lead converted on opportunity.i test it.
-
!python {model: crm.lead}: |
lead = self.browse(cr, uid, ref('crm_case_electonicgoodsdealer0'))
assert lead.type == 'opportunity', 'Lead is not converted to opportunity!'
assert lead.planned_revenue == 0.0, 'Planned revenue should be 0!'
assert lead.probability == 0.0, 'probability revenue should be 0!'
assert lead.partner_id.name == "Le Club SARL", 'Partner missmatch!'
assert lead.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!'