summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-03-19 13:34:25 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-03-19 13:34:25 +0700
commitcc1759574f76b084a1ce44e1acf01ed20dcdd729 (patch)
tree22949122eab941421b82d3a3fd31f507024e41b3
parent99cf4f8d2a109f09049a52bccdb85dde6aec1081 (diff)
fix bug button cancel stock picking
-rw-r--r--indoteknik_custom/models/stock_picking.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index b8a83d5c..6c6cbaa1 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -1060,7 +1060,7 @@ class StockPicking(models.Model):
if self.origin and 'Return of' in self.origin:
raise UserError("Button ini hanya untuk Logistik")
- if not self.env.user.has_group('indoteknik_custom.group_role_it') and not self.env.user.has_group('indoteknik_custom.group_role_logistic'):
+ if not self.env.user.has_group('indoteknik_custom.group_role_it') and not self.env.user.has_group('indoteknik_custom.group_role_logistic') and self.picking_type_code == 'outgoing':
raise UserError("Button ini hanya untuk Logistik")
res = super(StockPicking, self).action_cancel()