diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-03-19 13:17:52 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-03-19 13:17:52 +0700 |
| commit | 99cf4f8d2a109f09049a52bccdb85dde6aec1081 (patch) | |
| tree | 0ac0a88132421adc08344235e5473c185bd9c784 | |
| parent | 1f324148f176bafc471a5948b8c5322a9b175ffa (diff) | |
fix bug
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 23ddb47f..b8a83d5c 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1056,7 +1056,7 @@ class StockPicking(models.Model): return True def action_cancel(self): - if not self.env.user.is_logistic_approver: + if not self.env.user.is_logistic_approver and (self.env.context.get('active_model') == 'stock.picking' or self.env.context.get('active_model') == 'stock.picking.type'): if self.origin and 'Return of' in self.origin: raise UserError("Button ini hanya untuk Logistik") |
