From 2832c5fe5f96271400749022a9136a6f72b474ca Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Mon, 31 Jul 2023 11:40:38 +0700 Subject: unlink account move --- indoteknik_custom/models/account_move.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index 4db97706..b188285d 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -31,8 +31,7 @@ class AccountMove(models.Model): def unlink(self): res = super(AccountMove, self).unlink() - if not self.env.user.is_accounting: - raise UserError('Hanya Accounting yang bisa delete') + raise UserError('Data Hanya Bisa Di Cancel') return res def button_cancel(self): -- cgit v1.2.3