diff --git a/addons/crm/test/test_crm_lead.yml b/addons/crm/test/test_crm_lead.yml index 52472a9d9e8..6bdfc398826 100644 --- a/addons/crm/test/test_crm_lead.yml +++ b/addons/crm/test/test_crm_lead.yml @@ -1,4 +1,4 @@ -- | +- | In order to test the CRM in OpenERP, I will do a customer qualification process that starts with a fist contact with a customer (a lead), which will be converted to a @@ -25,6 +25,7 @@ email_from: info@mycustomer.com name: New Customer partner_name: Capegemini + partner_id: base.res_partner_9 phone: (855) 924-4364 mobile: (333) 715-1450 section_id: crm.section_sales_department @@ -45,6 +46,11 @@ !assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in open state}: - state == "open" +- + Now, Find id for case object +- + !python {model: crm.case.categ}: | + self._find_object_id(cr, uid, context) - | As the lead seems to be a real business opportunity, I will convert it to a partner @@ -72,7 +78,6 @@ !python {model: crm.lead}: | lead = self.browse(cr, uid, ref("crm_lead_newcustomer0")) assert lead.type == 'opportunity' - #- # | # yaml is also not working with smtp server and send new email. diff --git a/addons/crm/test/test_crm_lead_case2.yml b/addons/crm/test/test_crm_lead_case2.yml index 5e6e0896627..1c306905daa 100644 --- a/addons/crm/test/test_crm_lead_case2.yml +++ b/addons/crm/test/test_crm_lead_case2.yml @@ -22,7 +22,9 @@ working_hours: 0.0 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 - | 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". diff --git a/addons/crm/test/test_crm_opportunity.yml b/addons/crm/test/test_crm_opportunity.yml index 7640cc67815..7a816286e90 100644 --- a/addons/crm/test/test_crm_opportunity.yml +++ b/addons/crm/test/test_crm_opportunity.yml @@ -11,18 +11,17 @@ 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 open opportunity by click on "Open" button, -- - !python {model: crm.lead}: | - self.case_open(cr, uid, [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') - | I schedule Meeting on this current opportunity by clicking on "schedule Meeting". @@ -78,4 +77,37 @@ partner_address_id: base.res_partner_address_1 partner_id: base.res_partner_9 section_id: crm.section_sales_department - +- | + Now, 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 +- + 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_lead_newcustomer0')] + self.merge(cr, uid, op_ids, {'lead_ids': lead_ids})