summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/stock_picking.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-09-20 15:06:17 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-09-20 15:06:17 +0700
commit79bf9729d10c8fb37ef9071ab6df2b6644ddea49 (patch)
tree6226da5e38ad44673a1bb5d7d4e2b0fd5df1fada /indoteknik_custom/models/stock_picking.py
parenteb7661705303a64c97e84061b53d48d5c46f6293 (diff)
parentd2bb21ae878db2a3b77dbb3341046c9d12ba1de5 (diff)
Merge branch 'production' into iman/new-register
# Conflicts: # indoteknik_custom/models/res_users.py
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
-rw-r--r--indoteknik_custom/models/stock_picking.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index 6083e9e7..3dd960e2 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -126,6 +126,8 @@ class StockPicking(models.Model):
def do_unreserve(self):
res = super(StockPicking, self).do_unreserve()
+ if not self.env.user.is_purchasing_manager:
+ raise UserError('Hanya Purchasing Manager yang bisa Unreserve')
current_time = datetime.datetime.utcnow()
self.date_unreserve = current_time
return res
@@ -371,6 +373,9 @@ class StockPicking(models.Model):
if self.picking_type_id.id == 28 and not self.env.user.is_logistic_approver:
raise UserError("Harus di Approve oleh Logistik")
+
+ if self.location_dest_id.id == 47 and not self.env.user.is_purchasing_manager:
+ raise UserError("Transfer ke gudang selisih harus di approve Rafly Hanggara")
if self.group_id.sale_id:
if self.group_id.sale_id.payment_link_midtrans: