summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/approval_unreserve.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-11-01 10:50:52 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-11-01 10:50:52 +0700
commit926ab9c6d505eff4accbfd1e5472e0e63e900a30 (patch)
treedc1b97625670a3bc96b9db79af5516de64afdbd5 /indoteknik_custom/models/approval_unreserve.py
parent57f30e319a3f3c6c6c87418ffb12e44ac6846fe2 (diff)
cr approval unreserve
Diffstat (limited to 'indoteknik_custom/models/approval_unreserve.py')
-rw-r--r--indoteknik_custom/models/approval_unreserve.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/approval_unreserve.py b/indoteknik_custom/models/approval_unreserve.py
index 07ddda1f..ba8b8da7 100644
--- a/indoteknik_custom/models/approval_unreserve.py
+++ b/indoteknik_custom/models/approval_unreserve.py
@@ -74,7 +74,7 @@ class ApprovalUnreserve(models.Model):
raise UserError("Quantity yang di unreserve melebihi quantity yang ada")
def action_approve(self):
- if self.env.user.id != self.user_id.id:
+ if self.env.user.id != self.user_id.id and not self.env.user.has_group('indoteknik_custom.group_role_it'):
raise UserError("Hanya Sales nya yang bisa approve.")
if self.state != 'waiting_approval':