[IMP] crm: Put assert checking on lead2opportunity2win.yml for mass_convert opportunity
bzr revid: ron@tinyerp.com-20111102114454-x3vb5xd8m9youchm
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
-
|
||||
!assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in open state}:
|
||||
- state == "open"
|
||||
|
||||
-
|
||||
I convert lead into opportunity for exiting customer.
|
||||
-
|
||||
@@ -39,7 +38,6 @@
|
||||
!python {model: crm.phonecall}: |
|
||||
ids = self.search(cr, uid, [('opportunity_id', '=', ref('crm_case_qrecorp0'))])
|
||||
assert len(ids), 'phonecall is not scheduled'
|
||||
|
||||
-
|
||||
Now I schedule Meeting with Customer.
|
||||
-
|
||||
@@ -66,12 +64,27 @@
|
||||
assert lead.state == 'done', 'Opportunity is not in done state!'
|
||||
assert lead.stage_id.name == 'Won', ' Stage of Opportunity is not win!'
|
||||
assert lead.probability == 100.0, 'probability revenue should not be 100.0!'
|
||||
|
||||
-
|
||||
I convert mass lead into opportunity customer.
|
||||
-
|
||||
!python {model: crm.lead2opportunity.partner.mass}: |
|
||||
context.update({'active_model': 'crm.lead', 'active_ids': [ref('crm_case_itdeveloper0')]})
|
||||
context.update({'active_model': 'crm.lead', 'active_ids': [ref("crm_case_employee0"), ref("crm_case_electonicgoodsdealer0")], 'active_id': ref("crm_case_qrecorp0")})
|
||||
id = self.create(cr, uid, {'user_ids': [ref('base.user_root')], 'section_id': ref('crm.section_sales_department')}, context=context)
|
||||
self.mass_convert(cr, uid, [id], context=context)
|
||||
|
||||
self.mass_convert(cr, uid, [id], context=context)
|
||||
-
|
||||
Now i check First lead converted on opportunity.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
opp = self.browse(cr, uid, ref('crm_case_employee0'))
|
||||
assert opp.name == "Need Info about Onsite Intervention", "Opportunity name not correct"
|
||||
assert opp.type == 'opportunity', 'Lead is not converted to opportunity!'
|
||||
assert opp.partner_id.name == "Agrolait", 'Partner missmatch!'
|
||||
assert opp.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!'
|
||||
-
|
||||
Then check for Second lead converted on opportunity.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
opp = self.browse(cr, uid, ref('crm_case_electonicgoodsdealer0'))
|
||||
assert opp.name == "Interest in Your New Product", "Opportunity name not correct"
|
||||
assert opp.type == 'opportunity', 'Lead is not converted to opportunity!'
|
||||
assert opp.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!'
|
||||
Reference in New Issue
Block a user