-
  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}: |
    try:
        self.unlink(cr, uid, [ref("purchase_order_1")])
    except Exception,e:
        pass
-
  I delete a cancelled order.
-
  !python {model: purchase.order}: |
    from openerp.exceptions import UserError
    try:
        self.unlink(cr, uid, [ref("purchase_order_7")])
    except UserError:
        pass
-
  I delete a draft order.
-
  !python {model: purchase.order}: |
    self.unlink(cr, uid, [ref("purchase_order_5")])


