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 "Demo Sales Team" with No Unlink.
- Creating a crm.case.section record
+ 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: Demo Sales Team
- name: Demo Sales Team
+ complete_name: Test Sales Team
+ name: Test Sales Team
allow_unlink: False
member_ids:
- base.user_admin
resource_calendar_id: resource.timesheet_group1
parent_id: crm.section_sales_department
-
- !record {model: res.users, id: res_users_usercrm0}:
- context_section_id: crm_case_section_demosalesteam
+ I assign segmentation.
+-
+ !record {model: res.users, id: base.user_root}:
+ context_section_id: crm_case_section_demosalesteam
- |
- Creating a new lead "Demo Customer" and I provide an address to this
- demo customer and email "info@democustomer.com" and Also "Demo Sales Team".
+ 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: Demo Customer
+ name: Test Customer
partner_name: NotSoTinySARL
phone: (+32).81.81.37.00
mobile: (+32).81.81.37.00
referred: False
type: lead
-
- I check that the lead is in 'draft' state,
+ I check that the lead is in 'draft' state.
-
!assert {model: crm.lead, id: crm_lead_democustomer, string: Lead in Draft}:
- state == "draft"
-
- I assigning contact detail to the Lead "Demo Customer".
+ 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 "Demo Customer" Lead.
+ 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)
-
- Now I change the Opt-out to Opt-in to show email receive preference.
+ 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,
+ 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 "Demo Customer" is now in 'open' state.
+ 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"
-
- Now i reset the lead "Demo Customer".
+ 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,
+ 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 "Demo Customer".
+ 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 "Demo Customer" demo Lead
+ I try to Unlink the Lead "Test Customer" demo Lead.
-
!python {model: crm.lead}: |
try:
except:
pass
-
- I setting Lead "Demo Customer" to Pending State
+ 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 "Demo Customer" is now in 'Pending' state.
+ 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"
-
- Now i Escalate the Lead "Demo Customer" Parent "Sales Team".
+ I Escalate the Lead "Test Customer" Parent "Sales Team".
-
!python {model: crm.lead}: |
self.case_escalate(cr, uid, [ref("crm_lead_democustomer")])
--
- Now i add Internal Note Saying Escalated Reason
- Creating a crm.add.note record
--
+-
+ 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 aa note button to attach the record
--
+ 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)
-
- Now i Copying this lead "Demo Customer" to New Lead.
+ I Copying this lead "Test Customer" to New Lead.
-
!python {model: crm.lead}: |
self.copy(cr, uid, ref("crm_lead_democustomer"))
-
- Checking the Lead Copied or Not.
+ I checking the Lead Copied or Not.
-
!python {model: crm.lead}: |
- sid = self.search(cr, uid, [('name', '=', 'Demo Customer'),('state', '=', 'draft')])
+ sid = self.search(cr, uid, [('name', '=', 'Test Customer'),('state', '=', 'draft')])
if not sid:
raise AssertionError("Lead is not copied Successfully")
-