[IMP]: clean lead cancel yml
bzr revid: aja@tinyerp.com-20130625121413-83rzmqxg1p1724uq
This commit is contained in:
@@ -110,7 +110,7 @@ Dashboard for CRM will include:
|
||||
'test/lead2opportunity2win.yml',
|
||||
'test/lead2opportunity_assign_salesmen.yml',
|
||||
'test/crm_lead_merge.yml',
|
||||
# 'test/crm_lead_cancel.yml', # TODO : Need To Clean
|
||||
'test/crm_lead_cancel.yml',
|
||||
'test/segmentation.yml',
|
||||
'test/phonecalls.yml',
|
||||
'test/crm_lead_onchange.yml',
|
||||
|
||||
@@ -1,40 +1,14 @@
|
||||
-
|
||||
I set a new sale team (with Marketing at parent) and I cancel unqualified lead .
|
||||
I set a new sale team (with Marketing at parent) .
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
section_id = self.pool.get('crm.case.section').create(cr, uid, {'name': "Phone Marketing", 'parent_id': ref("crm.crm_case_section_2")})
|
||||
self.write(cr, uid, [ref("crm_case_1")], {'section_id': section_id})
|
||||
self.case_cancel(cr, uid, [ref("crm_case_1")])
|
||||
-
|
||||
I check cancelled lead.
|
||||
I check unqualified lead .
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref('crm_case_1'))
|
||||
assert lead.stage_id.id == ref('crm.stage_lead7'), "Stage should be 'Dead' and is %s." % (lead.stage_id.name)
|
||||
assert lead.state == 'cancel', "Opportunity is not in 'cancel' state."
|
||||
assert lead.probability == 0.0, 'Opportunity is probably wrong and should be 0.0.'
|
||||
-
|
||||
I reset cancelled lead into unqualified lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_reset(cr, uid, [ref("crm_case_1")])
|
||||
-
|
||||
I check unqualified lead after reset.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm.crm_case_1, string: Lead is in draft state}:
|
||||
- state == "draft"
|
||||
-
|
||||
I re-open the lead
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_open(cr, uid, [ref("crm_case_1")])
|
||||
-
|
||||
I check stage and state of the re-opened lead
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref('crm.crm_case_1'))
|
||||
assert lead.stage_id.id == ref('crm.stage_lead2'), "Opportunity stage should be 'Qualification'."
|
||||
assert lead.state == 'open', "Opportunity should be in 'open' state."
|
||||
!assert {model: crm.lead, id: crm.crm_case_1, string: Lead is in new stage}:
|
||||
- stage_id.sequence == 1
|
||||
-
|
||||
I escalate the lead to parent team.
|
||||
-
|
||||
@@ -45,3 +19,9 @@
|
||||
-
|
||||
!assert {model: crm.lead, id: crm.crm_case_1, string: Escalate lead to parent team}:
|
||||
- section_id.name == "Marketing"
|
||||
-
|
||||
I find default stage.
|
||||
-
|
||||
!python {model: crm.case.section}: |
|
||||
case_section = self.browse(cr, uid, ref('section_sales_department'))
|
||||
stage_id = self.stage_find(cr, uid, [lead], lead.section_id.id or False,[('probability','=',100.0)])
|
||||
|
||||
Reference in New Issue
Block a user