30 lines
1.0 KiB
YAML
30 lines
1.0 KiB
YAML
-
|
|
In order to test the process of payment order
|
|
-
|
|
I confirm payment order.
|
|
-
|
|
!workflow {model: payment.order, action: open, ref: payment_order_1}
|
|
-
|
|
I check that Payment order is now "Confirmed".
|
|
-
|
|
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be 'Confirmed' state}:
|
|
- state == 'open'
|
|
-
|
|
In order to not payment line so I perform action to change the state of payment order to "cancel".
|
|
-
|
|
!workflow {model: payment.order, action: cancel, ref: payment_order_1}
|
|
-
|
|
I check that Payment order is now "cancelled".
|
|
-
|
|
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be in 'Confirmed' state}:
|
|
- state == 'cancel'
|
|
-
|
|
I set the payment order in "Draft" state.
|
|
-
|
|
!python {model: payment.order}: |
|
|
self.set_to_draft(cr, uid, [ref("payment_order_1")])
|
|
-
|
|
I check that Payment order is now "draft".
|
|
-
|
|
!assert {model: payment.order, id: payment_order_1, severity: error, string: Payment Order should be in 'Draft' state}:
|
|
- state == 'draft' |