-
  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()


