From cf4b57fe825ae3522b7d893344eb9649c7bd10b3 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Wed, 28 May 2025 13:13:44 +0700 Subject: add purchasing manager as approval manufacturing order while confirm --- indoteknik_custom/models/manufacturing.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indoteknik_custom/models/manufacturing.py') diff --git a/indoteknik_custom/models/manufacturing.py b/indoteknik_custom/models/manufacturing.py index 715d8513..aea01362 100644 --- a/indoteknik_custom/models/manufacturing.py +++ b/indoteknik_custom/models/manufacturing.py @@ -11,6 +11,9 @@ class Manufacturing(models.Model): def action_confirm(self): if self._name != 'mrp.production': return super(Manufacturing, self).action_confirm() + + if not self.env.user.is_purchasing_manager: + raise UserError("Hanya bisa di confirm oleh Purchasing Manager") # if self.location_src_id.id != 75: # raise UserError('Component Location hanya bisa di AS/Stock') -- cgit v1.2.3