[ADD] crm opportunity missing funcnality test cases
bzr revid: jam@tinyerp.com-20110825095401-hmb73m9a8osm9r6w
This commit is contained in:
@@ -128,6 +128,7 @@ Creates a dashboard for CRM that includes:
|
||||
'test/test_crm_stage_changes.yml',
|
||||
'test/test_crm_recurrent_meeting_case2.yml',
|
||||
'test/test_crm_lead_case2.yml',
|
||||
'test/test_crm_opportunity_case2.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
- |
|
||||
I start by creating a new Opportunity. And I select partner for opportunity.
|
||||
I can see that after selecting partner his contact and email is automatically filled.
|
||||
-
|
||||
!record {model: crm.lead, id: crm_opportunity_demotestopportunity}:
|
||||
email_from: info@balmerinc.be
|
||||
name: 'Demo Test Opportunity'
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
probability: 1.0
|
||||
categ_id: crm.categ_oppor2
|
||||
section_id: crm.section_sales_department
|
||||
type: opportunity
|
||||
-
|
||||
I check that the opportunity is in 'New' state.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm_opportunity_demotestopportunity, string: Opportunity in Draft}:
|
||||
- state == "draft"
|
||||
-
|
||||
I open opportunity by click on "Open" button,
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_open(cr, uid, [ref("crm_opportunity_demotestopportunity")])
|
||||
-
|
||||
I change partner of the opportunity.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.onchange_partner_id(cr, uid, [ref("crm_opportunity_demotestopportunity")], ref("base.res_partner_agrolait"))
|
||||
|
||||
-
|
||||
I change Contact Detail of the opportunity.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.onchange_partner_address_id(cr, uid,[ref("crm_opportunity_demotestopportunity")], ref("base.res_partner_address_8invoice"))
|
||||
|
||||
-
|
||||
I change Opportunity to Won State.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_mark_won(cr, uid, [ref("crm_opportunity_demotestopportunity")])
|
||||
-
|
||||
I check that the opportunity is in 'Done' state.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm_opportunity_demotestopportunity, string: Opportunity is Won}:
|
||||
- state == "done"
|
||||
Reference in New Issue
Block a user