[IMP]improve code and yml
bzr revid: sgo@tinyerp.com-20130219131921-nbfs273xujvriomu
This commit is contained in:
parent
e983e49f20
commit
d4a1cec260
|
@ -80,8 +80,8 @@ The Dashboard for the Sales Manager will include
|
|||
],
|
||||
'demo': ['sale_demo.xml'],
|
||||
'test': [
|
||||
'test/sale_order_salesmanager_demo.yml',
|
||||
'test/sale_order_salesman_demo.yml',
|
||||
'test/create_sale_users.yml',
|
||||
'test/sale_order_demo.yml',
|
||||
'test/manual_order_policy.yml',
|
||||
'test/cancel_order.yml',
|
||||
'test/delete_order.yml',
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
-
|
||||
Create a user as 'Salesmanager'
|
||||
-
|
||||
!record {model: res.users, id: res_users_salesmanager}:
|
||||
company_id: base.main_company
|
||||
name: Sales manager
|
||||
login: sm
|
||||
password: sm
|
||||
groups_id:
|
||||
- base.group_sale_manager
|
||||
-
|
||||
Create a user as 'Salesman'
|
||||
-
|
||||
!record {model: res.users, id: res_users_salesman}:
|
||||
company_id: base.main_company
|
||||
name: Salesman
|
||||
login: su
|
||||
password: su
|
||||
groups_id:
|
||||
- base.group_sale_salesman_all_leads
|
|
@ -0,0 +1,41 @@
|
|||
-
|
||||
Test the data with salesman,
|
||||
-
|
||||
!context
|
||||
uid: 'res_users_salesman'
|
||||
-
|
||||
In order to test process of the Sale Order, I create sale order
|
||||
-
|
||||
!record {model: sale.order, id: sale_order_test1}:
|
||||
partner_id: base.res_partner_2
|
||||
note: Invoice after delivery
|
||||
payment_term: account.account_payment_term
|
||||
order_line:
|
||||
- product_id: product.product_product_7
|
||||
product_uom_qty: 8
|
||||
-
|
||||
I verify that the onchange was correctly triggered
|
||||
-
|
||||
!assert {model: sale.order, id: sale.sale_order_test1, string: The onchange function of product was not correctly triggered}:
|
||||
- order_line[0].name == u'[LCD17] 17\u201d LCD Monitor'
|
||||
- order_line[0].price_unit == 1350.0
|
||||
- order_line[0].product_uom_qty == 8
|
||||
- order_line[0].product_uom.id == ref('product.product_uom_unit')
|
||||
|
||||
-
|
||||
I create another sale order
|
||||
-
|
||||
!record {model: sale.order, id: sale_order_test2}:
|
||||
partner_id: base.res_partner_2
|
||||
order_line:
|
||||
- product_id: product.product_product_7
|
||||
product_uom_qty: 16
|
||||
product_uom: product.product_uom_dozen
|
||||
-
|
||||
I verify that the onchange was correctly triggered
|
||||
-
|
||||
!assert {model: sale.order, id: sale.sale_order_test2, string: The onchange function of product was not correctly triggered}:
|
||||
- order_line[0].name == u'[LCD17] 17\u201d LCD Monitor'
|
||||
- order_line[0].price_unit == 1350.0 * 12
|
||||
- order_line[0].product_uom.id == ref('product.product_uom_dozen')
|
||||
- order_line[0].product_uom_qty == 16
|
|
@ -1,31 +0,0 @@
|
|||
-
|
||||
In order to test process of the Sale Order, I create sale order
|
||||
-
|
||||
Create a user as 'Salesmanager'
|
||||
-
|
||||
!record {model: res.users, id: res_users_salesmanager}:
|
||||
company_id: base.main_company
|
||||
name: Sales manager
|
||||
login: sm
|
||||
password: sm
|
||||
groups_id:
|
||||
- base.group_sale_manager
|
||||
-
|
||||
Now, check the data with sales Manager
|
||||
-
|
||||
!context
|
||||
uid: 'res_users_salesmanager'
|
||||
-
|
||||
!record {model: sale.order, id: sale_order_test1}:
|
||||
partner_id: base.res_partner_2
|
||||
note: Invoice after delivery
|
||||
payment_term: account.account_payment_term
|
||||
order_line:
|
||||
- product_id: product.product_product_7
|
||||
product_uom_qty: 8
|
||||
-
|
||||
I verify that the onchange was correctly triggered
|
||||
-
|
||||
!assert {model: sale.order, id: sale.sale_order_test1, string: The onchange function of product was not correctly triggered}:
|
||||
- order_line[0].name == u'[LCD17] 17\u201d LCD Monitor'
|
||||
- order_line[0].price_unit == 1350.0
|
Loading…
Reference in New Issue