summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/stock_picking.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-05-22 02:15:56 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-05-22 02:15:56 +0000
commitad1325d80785f236a32bff2f2645fe8c85c50efb (patch)
tree85d8772e1af6ef37a0bfe3bc19064258b7bea39d /indoteknik_custom/models/stock_picking.py
parentf6c324302fb2a6490c9c95836887e2c58d684e86 (diff)
parent4f5594be8d73f88fbb42671525d0d2c6ed977abe (diff)
Merged in production (pull request #143)
Production
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
-rw-r--r--indoteknik_custom/models/stock_picking.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index 22aceaf4..62d86911 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -88,8 +88,9 @@ class StockPicking(models.Model):
@api.onchange('carrier_id')
def constrains_carrier_id(self):
- if not self.env.user.is_logistic_approver:
- raise UserError('Hanya Logistic yang bisa mengubah shipping method')
+ if self.carrier_id:
+ if not self.env.user.is_logistic_approver:
+ raise UserError('Hanya Logistic yang bisa mengubah shipping method')
def do_unreserve(self):
res = super(StockPicking, self).do_unreserve()