diff options
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 6083e9e7..d16d508e 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 |
