2010-08-09 07:05:31 +00:00
|
|
|
-
|
|
|
|
In order to test the sale_crm module in the Open-ERP,
|
|
|
|
I create an opportunity and create a sale order through 'Convert to Sale' wizard .
|
|
|
|
-
|
|
|
|
I create an opportunity
|
|
|
|
-
|
|
|
|
!record {model: crm.lead, id: crm_lead_opportunity0}:
|
|
|
|
country_id: base.be
|
|
|
|
name: Opportunity-1
|
|
|
|
planned_revenue: 50000.0
|
|
|
|
probability: 70.0
|
|
|
|
partner_address_id: base.res_partner_address_7
|
|
|
|
partner_id: base.res_partner_4
|
|
|
|
planned_revenue: 0.0
|
|
|
|
probability: 0.0
|
|
|
|
section_id: crm.section_sales_department
|
|
|
|
type: opportunity
|
|
|
|
categ_id: crm.categ_oppor1
|
|
|
|
-
|
|
|
|
Then I click on the 'Convert to Sale' wizard
|
|
|
|
-
|
|
|
|
I place a sale order for product keyboard having quantity 50
|
|
|
|
-
|
|
|
|
!record {model: crm.make.sale, id: crm_make_sale_0}:
|
|
|
|
partner_id: base.res_partner_4
|
|
|
|
shop_id: sale.shop
|
|
|
|
-
|
|
|
|
Then I click on the 'Ok' button of wizard
|
|
|
|
-
|
|
|
|
!python {model: crm.make.sale}: |
|
2010-08-17 11:58:59 +00:00
|
|
|
crm_obj = self.pool.get('crm.lead')
|
|
|
|
crm = crm_obj.browse(cr, uid, ref("crm_lead_opportunity0"))
|
2010-08-09 07:05:31 +00:00
|
|
|
self.makeOrder(cr, uid, [ref("crm_make_sale_0")], {"lang": "en_US", "tz": False,
|
2010-08-17 11:58:59 +00:00
|
|
|
"active_model": "crm.lead", "section_id": "crm.section_sales_department", "default_type": "opportunity",
|
|
|
|
"search_default_user_id": 1, "search_default_current": 1, "active_ids": [crm.id],
|
|
|
|
"active_id": crm.id})
|
2010-08-09 07:05:31 +00:00
|
|
|
-
|
|
|
|
I verify that a sale order has been generated from an opportunity
|
|
|
|
-
|
2010-08-17 11:58:59 +00:00
|
|
|
!python {model: crm.lead}: |
|
2010-08-09 07:05:31 +00:00
|
|
|
crm = self.browse(cr, uid, ref("crm_lead_opportunity0"))
|
2010-10-08 14:40:49 +00:00
|
|
|
assert (crm.ref),("sale order has not been created")
|