[REM]: crm: 1)Removed test_crm_opportunity.yml,
2)Removed test_crm_lead_case2.yml, 3)Removed test_crm_opportunity_case2.yml bzr revid: ron@tinyerp.com-20111014072000-yl3q15mdimss6fri
This commit is contained in:
parent
a589f59ee9
commit
2e897842ff
|
@ -126,13 +126,10 @@ Creates a dashboard for CRM that includes:
|
|||
'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',
|
||||
'test/test_crm_recurrent_meeting.yml',
|
||||
'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',
|
||||
'test/test_crm_phonecall_case2.yml',
|
||||
'test/test_crm_partner2opportunity.yml',
|
||||
'test/test_crm_segmentation.yml',
|
||||
|
|
|
@ -1,151 +0,0 @@
|
|||
-
|
||||
In order to do complete test the CRM in OpenERP,
|
||||
I will create new full configured record and carry test on it.
|
||||
- |
|
||||
I Start by creating "Test Sales Team" with No Unlink.
|
||||
I create a crm.case.section record.
|
||||
-
|
||||
!record {model: crm.case.section, id: crm_case_section_demosalesteam}:
|
||||
code: DEMO
|
||||
complete_name: Test Sales Team
|
||||
name: Test Sales Team
|
||||
allow_unlink: False
|
||||
member_ids:
|
||||
- base.user_admin
|
||||
stage_ids:
|
||||
- crm.stage_lead1
|
||||
- crm.stage_lead2
|
||||
- crm.stage_lead3
|
||||
- crm.stage_lead4
|
||||
- crm.stage_lead5
|
||||
- crm.stage_lead6
|
||||
working_hours: 0.0
|
||||
resource_calendar_id: resource.timesheet_group1
|
||||
parent_id: crm.section_sales_department
|
||||
-
|
||||
I assign segmentation.
|
||||
-
|
||||
!record {model: res.users, id: base.user_root}:
|
||||
context_section_id: crm_case_section_demosalesteam
|
||||
- |
|
||||
I create a new lead "Test Customer" and I provide an address to this
|
||||
demo customer and email "info@democustomer.com" and Also "Test Sales Team".
|
||||
-
|
||||
!record {model: crm.lead, id: crm_lead_democustomer}:
|
||||
email_from: info@democustomer.com
|
||||
name: Test Customer
|
||||
partner_name: NotSoTinySARL
|
||||
phone: (+32).81.81.37.00
|
||||
mobile: (+32).81.81.37.00
|
||||
section_id: crm_case_section_demosalesteam
|
||||
referred: False
|
||||
type: lead
|
||||
-
|
||||
I check that the lead is in 'draft' state.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm_lead_democustomer, string: Lead in Draft}:
|
||||
- state == "draft"
|
||||
-
|
||||
I create categories.
|
||||
-
|
||||
!record {model: crm.case.categ, id: crm_case_categ0}:
|
||||
name: crm_case_section_demosalesteam
|
||||
section_id: crm_case_section_demosalesteam
|
||||
-
|
||||
I assigning contact detail to the Lead "Test Customer" without address.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.onchange_partner_address_id(cr, uid, ref("crm_lead_democustomer"), None, email=False)
|
||||
|
||||
-
|
||||
I assigning contact detail to the Lead "Test Customer" with address.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.onchange_partner_address_id(cr, uid, ref("crm_lead_democustomer"), ref("base.res_partner_address_notsotinysarl0"), email=False)
|
||||
|
||||
-
|
||||
I selecting email "Opt-out" option for the "Test Customer" Lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.on_change_optout(cr, uid, ref("crm_lead_democustomer"), True)
|
||||
|
||||
-
|
||||
I change the Opt-out to Opt-in to show email receive preference.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.on_change_optin(cr, uid, ref("crm_lead_democustomer"), True)
|
||||
-
|
||||
I open lead by click on "Open" button.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_open(cr, uid, [ref("crm_lead_democustomer")])
|
||||
-
|
||||
I check that lead "Test Customer" is now in 'open' state.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm_lead_democustomer, string: Lead in open state}:
|
||||
- state == "open"
|
||||
-
|
||||
I reset the lead "Test Customer".
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_reset(cr, uid, [ref("crm_lead_democustomer")])
|
||||
-
|
||||
I again opening lead by click on "Open" button.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_open(cr, uid, [ref("crm_lead_democustomer")])
|
||||
-
|
||||
I setting stage "New" for the lead "Test Customer".
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.stage_next(cr, uid, [ref("crm_lead_democustomer")], context={'stage_type': 'lead'})
|
||||
-
|
||||
I try to Unlink the Lead "Test Customer" demo Lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
try:
|
||||
self.unlink(cr, uid, [ref("crm_lead_democustomer")])
|
||||
except:
|
||||
pass
|
||||
-
|
||||
I setting Lead "Test Customer" to Pending State.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_pending(cr, uid, [ref("crm_lead_democustomer")])
|
||||
-
|
||||
I check that lead "Test Customer" is now in 'Pending' state.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm_lead_democustomer, string: Lead in Pending state}:
|
||||
- state == "pending"
|
||||
-
|
||||
I Escalate the Lead "Test Customer" Parent "Sales Team".
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_escalate(cr, uid, [ref("crm_lead_democustomer")])
|
||||
-
|
||||
I add Internal Note Saying Escalated Reason.
|
||||
-
|
||||
!record {model: crm.add.note, id: crm_add_note_0}:
|
||||
body: Sales Lead Has Been Escalated Due to Some Technical reason to the parent 'Sales
|
||||
Team'
|
||||
state: unchanged
|
||||
-
|
||||
I click a note button to attach the record.
|
||||
-
|
||||
!python {model: crm.add.note}: |
|
||||
context['active_model'] = "crm.lead"
|
||||
context['active_ids'] = [ref("crm_lead_democustomer")]
|
||||
self.action_add(cr, uid, [ref("crm_add_note_0")], context=context)
|
||||
|
||||
-
|
||||
I Copying this lead "Test Customer" to New Lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.copy(cr, uid, ref("crm_lead_democustomer"))
|
||||
-
|
||||
I checking the Lead Copied or Not.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
sid = self.search(cr, uid, [('name', '=', 'Test Customer'),('state', '=', 'draft')])
|
||||
if not sid:
|
||||
raise AssertionError("Lead is not copied Successfully")
|
|
@ -1,113 +0,0 @@
|
|||
- |
|
||||
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_abcfuelcounits0}:
|
||||
email_from: info@balmerinc.be
|
||||
name: 'ABC FUEL CO 829264 - 10002 units'
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
probability: 1.0
|
||||
stage_id: crm.stage_lead1
|
||||
categ_id: crm.categ_oppor2
|
||||
section_id: crm.section_sales_department
|
||||
- |
|
||||
I check that the opportunity is in 'New' state.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm_opportunity_abcfuelcounits0}:
|
||||
- state == "draft"
|
||||
|
||||
- |
|
||||
I check that phonecall record is created for that opportunity.
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
phone_obj = self.pool.get('crm.phonecall')
|
||||
- |
|
||||
I schedule Meeting on this current opportunity by clicking on "schedule
|
||||
Meeting".
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.action_makeMeeting(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
|
||||
|
||||
- |
|
||||
I can see that Meeting's calendar view is shown.
|
||||
then I click on the date on which I want to schedule meeting.
|
||||
I fill proper data for that meeting and save it.
|
||||
-
|
||||
!record {model: crm.meeting, id: crm_meeting_abcfuelcounits0}:
|
||||
date: !eval time.strftime('%Y-%m-%d 00:00:00')
|
||||
date_deadline: !eval time.strftime('%Y-%m-%d 08:00:00')
|
||||
duration: 8.0
|
||||
email_from: info@balmerinc.be
|
||||
name: 'ABC FUEL CO 829264 - 10002 units'
|
||||
opportunity_id: 'crm_opportunity_abcfuelcounits0'
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
section_id: crm.section_sales_department
|
||||
state: open
|
||||
- |
|
||||
In order to schedule a phonecall to the partner
|
||||
I click on "schedule call" button and select planned date for the call.
|
||||
-
|
||||
!record {model: crm.opportunity2phonecall, id: crm_opportunity2phonecall_abcfuelcounits0}:
|
||||
date: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d 11:15:00')"
|
||||
name: 'ABC FUEL CO 829264 - 10002 units'
|
||||
section_id: crm.section_sales_department
|
||||
user_id: base.user_demo
|
||||
categ_id: crm.categ_phone1
|
||||
- |
|
||||
schedule phonecall by opportunity2phoncall wizard.
|
||||
-
|
||||
!python {model: crm.opportunity2phonecall}: |
|
||||
self.action_apply(cr, uid, [ref('crm_opportunity2phonecall_abcfuelcounits0')], {'active_ids': [ref("crm_opportunity_abcfuelcounits0")]})
|
||||
- |
|
||||
I check that phonecall record is created for that opportunity.
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
phone_obj = self.pool.get('crm.phonecall')
|
||||
ids = phone_obj.search(cr, uid, [('name', '=', 'ABC FUEL CO 829264 - 10002 units')])
|
||||
assert len(ids)
|
||||
- |
|
||||
I can see phonecall record after click on "Schedule call" wizard.
|
||||
-
|
||||
!record {model: crm.phonecall, id: crm_phonecall_abcfuelcounits0}:
|
||||
date: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d 11:15:00')"
|
||||
duration: 3.0
|
||||
name: 'ABC FUEL CO 829264 - 10002 units'
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
section_id: crm.section_sales_department
|
||||
- |
|
||||
I Merge the opportunities.
|
||||
-
|
||||
for that create two opportunities first opportunity 'Test FUEL CO'.
|
||||
-
|
||||
!record {model: crm.lead, id: crm_opportunity_1}:
|
||||
email_from: info@balmerinc.be
|
||||
name: 'Test FUEL CO 829264 - 10002 units'
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
probability: 1.0
|
||||
stage_id: crm.stage_lead1
|
||||
categ_id: crm.categ_oppor2
|
||||
section_id: crm.section_sales_department
|
||||
-
|
||||
I create the opportunity 'FUEL CO'.
|
||||
-
|
||||
!record {model: crm.lead, id: crm_opportunity_2}:
|
||||
email_from: info@balmerinc.be
|
||||
name: 'FUEL CO 829264 - 10002 units'
|
||||
partner_address_id: base.res_partner_address_1
|
||||
partner_id: base.res_partner_9
|
||||
probability: 1.0
|
||||
stage_id: crm.stage_lead1
|
||||
categ_id: crm.categ_oppor2
|
||||
section_id: crm.section_sales_department
|
||||
- |
|
||||
I Merge two Opportunities.
|
||||
-
|
||||
!python {model: crm.merge.opportunity}: |
|
||||
op_list = [ref('crm_opportunity_1'),ref('crm_opportunity_2')]
|
||||
op_ids=self.pool.get('crm.lead').browse(cr,uid,op_list)
|
||||
lead_ids = [ref('crm_case_qrecorp0')]
|
||||
self.merge(cr, uid, op_ids, {'lead_ids': lead_ids})
|
|
@ -1,45 +0,0 @@
|
|||
- |
|
||||
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"
|
Loading…
Reference in New Issue