summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorron@tinyerp.com <>2011-10-13 18:42:02 +0530
committerron@tinyerp.com <>2011-10-13 18:42:02 +0530
commitc8b4c07d9b5bbf256249e9c51d6d5e83cf8b60cd (patch)
tree3e41184458eb60f61d0b84619908ebce4097ddee
parent65304c97f773ad20c03105b5b6678cb84e856698 (diff)
[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
-rw-r--r--addons/crm/__openerp__.py1
-rw-r--r--addons/crm/test/process/lead2_mass_convert_opportunity.yml32
2 files changed, 33 insertions, 0 deletions
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index 54cc33c1dd9..508c7dff370 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -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',
diff --git a/addons/crm/test/process/lead2_mass_convert_opportunity.yml b/addons/crm/test/process/lead2_mass_convert_opportunity.yml
new file mode 100644
index 00000000000..22c22d7a376
--- /dev/null
+++ b/addons/crm/test/process/lead2_mass_convert_opportunity.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!'