summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-10-08 15:20:43 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-10-08 15:20:43 +0700
commitc8b3d4f3c5da81eb3858af6b8a7fc54b83a286a5 (patch)
treed0708f099fd6f91cc56ac1ee95114b6786ebdbf6
parent714aaa74a023df959719370061b5af2a2340a6bf (diff)
<Miqdad> delivery departure date val
-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 4772c433..8e947267 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -1654,6 +1654,11 @@ class StockPicking(models.Model):
line.sale_line_id = sale_line.id
def write(self, vals):
+ allowed_user_ids = [17, 6277]
+ if 'driver_departure_date' in vals:
+ if self.env.user.id not in allowed_user_ids and not self.env.context.get('allow_driver_departure_edit'):
+ raise UserError("Hanya Denise dan Faisal yang dapat mengubah Delivery Departure Date.")
+
if 'linked_manual_bu_out' in vals:
for record in self:
if (record.picking_type_code == 'internal'