flectra/addons/purchase/test/ui/delete_order.yml
flectra-admin 769eafb483 [INIT] Inception of Flectra from Odoo
Flectra is Forked from Odoo v11 commit : (6135e82d73)
2018-01-16 11:45:59 +05:30

32 lines
669 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 odoo.exceptions import UserError
try:
self.unlink()
except UserError:
pass
-
I delete a draft order.
-
!python {model: purchase.order, id: purchase_order_5}: |
self.unlink()