diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py index e41552f7aa5..1105a540d0d 100644 --- a/addons/account_payment/__openerp__.py +++ b/addons/account_payment/__openerp__.py @@ -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' ], diff --git a/addons/account_payment/test/process/draft2cancel_payment_order.yml b/addons/account_payment/test/process/draft2cancel_payment_order.yml new file mode 100644 index 00000000000..4c9bbdb4283 --- /dev/null +++ b/addons/account_payment/test/process/draft2cancel_payment_order.yml @@ -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' \ No newline at end of file