diff options
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 5 |
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() |
