[IMP]account_payment: added a new file for draft2cancel payment order

bzr revid: mma@tinyerp.com-20111115064639-jzfeac0fd3zytmin
This commit is contained in:
Mayur Maheshwari (OpenERP) 2011-11-15 12:16:39 +05:30
parent 6c7405a0cd
commit d62a1ba6e9
2 changed files with 22 additions and 0 deletions

View File

@ -51,6 +51,7 @@ This module provides :
],
'demo_xml': ['account_payment_demo.xml'],
'test': [
'test/process/draft2cancel_payment_order.yml',
'test/process/draft2done_payment_order.yml',
'test/account_payment_report.yml'
],

View File

@ -0,0 +1,21 @@
-
In order to test the process of payment order
-
I perform action to change the state of payment order to "confirmed"
-
!workflow {model: payment.order, action: open, ref: account_payment.payment_order_1}
-
I check that Payment order is now "Confirmed"
-
!assert {model: payment.order, id: account_payment.payment_order_1}:
- state == 'open'
-
In order to no payment line so I perform action to change the state of payment order to "cancel"
-
!python {model: payment.order}: |
self.set_to_draft(cr, uid, [ref("account_payment.payment_order_1")])
-
I check that Payment order is now "draft"
-
!assert {model: payment.order, id: account_payment.payment_order_1}:
- state == 'draft'