[IMP] crm: Put assert checking on cancel_lead.yml
bzr revid: ron@tinyerp.com-20111102065328-f2slcokzkap9pldn
This commit is contained in:
parent
9feccaa193
commit
1e1b32833e
|
@ -7,7 +7,7 @@
|
|||
I check cancelled lead.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in cancel state}:
|
||||
- state == "cancel"
|
||||
- state == "cancel"
|
||||
-
|
||||
I reset cancelled lead into unqualified lead.
|
||||
-
|
||||
|
@ -17,7 +17,7 @@
|
|||
I check unqualified lead after reset.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in draft state}:
|
||||
- state == "draft"
|
||||
- state == "draft"
|
||||
-
|
||||
I put unqualified lead into pending.
|
||||
-
|
||||
|
@ -27,18 +27,27 @@
|
|||
I check status of pending lead.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in pending state}:
|
||||
- state == "pending"
|
||||
- state == "pending"
|
||||
-
|
||||
I Escalate the Lead to Parent Team.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_escalate(cr, uid, [ref("crm_case_itisatelesalescampaign0")])
|
||||
|
||||
-
|
||||
I mark as lost the Lead.
|
||||
I check lead escalate to Parent Team.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Escalate lead to parent team}:
|
||||
- section_id.name == "Sales Department"
|
||||
-
|
||||
I mark as lost the opportunity.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_mark_lost(cr, uid, [ref("crm_case_itisatelesalescampaign0")])
|
||||
|
||||
|
||||
|
||||
-
|
||||
I check opportunity after lost.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref('crm_case_itisatelesalescampaign0'))
|
||||
assert lead.state == 'done', "lead is not done state"
|
||||
assert lead.stage_id.id == ref('crm.stage_lead6'), 'Stage is not changed!'
|
||||
assert lead.probability == 0.0, 'Probability is wrong!'
|
||||
|
|
Loading…
Reference in New Issue