flectra/addons/purchase/test/ui/delete_order.yml
2018-01-16 02:34:37 -08:00

32 lines
672 B
YAML

-
Give access rights of Purchase user to delete purchase order
-
!context
uid: 'res_users_purchase_user'
-
In order to test to delete process on purchase order.
-
I try to delete confirmed order and check Error Message.
-
!python {model: purchase.order, id: purchase_order_1}: |
try:
self.unlink()
except Exception:
pass
-
I delete a cancelled order.
-
!python {model: purchase.order, id: purchase_order_7}: |
from flectra.exceptions import UserError
try:
self.unlink()
except UserError:
pass
-
I delete a draft order.
-
!python {model: purchase.order, id: purchase_order_5}: |
self.unlink()