[IMP]improve yaml for cancel order

bzr revid: sgo@tinyerp.com-20130219072734-70093wqxyory3arz
This commit is contained in:
sgo@tinyerp.com
2013-02-19 12:57:34 +05:30
parent e983e49f20
commit 83af08294e
2 changed files with 17 additions and 2 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ The Dashboard for the Sales Manager will include
'test/sale_order_salesmanager_demo.yml',
'test/sale_order_salesman_demo.yml',
'test/manual_order_policy.yml',
'test/cancel_order.yml',
'test/cancel_order_sale_manager.yml',
'test/delete_order.yml',
'test/edi_sale_order.yml',
],
@@ -3,7 +3,21 @@
I confirm order (with at least 2 lines)
-
!workflow {model: sale.order, action: order_confirm, ref: sale_order_8}
-
Create a user as 'Salesmanager for cancel order'
-
!record {model: res.users, id: res_users_can_so}:
company_id: base.main_company
name: Sales manager for cancel
login: smc
password: smc
groups_id:
- base.group_sale_manager
-
Now, check the data with sales Manager for cancel order.
-
!context
uid: 'res_users_can_so'
-
I check state of order in 'Sale Order'.
-
@@ -32,6 +46,7 @@
ctx = context.copy()
ctx.update({"active_model": 'sale.order', "active_ids": [ref("sale_order_8")], "active_id":ref("sale_order_8")})
pay_id = self.create(cr, uid, {'advance_payment_method': 'fixed', 'amount': 5})
print ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.",uid
self.create_invoices(cr, uid, [pay_id], context=ctx)
invoice_ids = self.pool.get('sale.order').browse(cr, uid, ref("sale_order_8")).invoice_ids