diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2025-05-28 13:13:44 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2025-05-28 13:13:44 +0700 |
| commit | cf4b57fe825ae3522b7d893344eb9649c7bd10b3 (patch) | |
| tree | 67ae80f16d2c0b8bfe9143e2a8d99e52f5419d15 | |
| parent | 5acd19789a0319887abe7b53fcbbb0a7ba9f8cf1 (diff) | |
add purchasing manager as approval manufacturing order while confirm
| -rw-r--r-- | indoteknik_custom/models/manufacturing.py | 3 | ||||
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 2 |
2 files changed, 4 insertions, 1 deletions
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') diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index d6b449fd..21ca55eb 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -850,7 +850,7 @@ class PurchaseOrder(models.Model): if not self.from_apo: if not self.matches_so and not self.env.user.is_purchasing_manager and not self.env.user.is_leader: - raise UserError("Tidak ada link dengan SO, harus approval Purchasing Manager") + raise UserError("Tidak ada link dengan SO, harus di confirm oleh Purchasing Manager") send_email = False if not self.not_update_purchasepricelist: |
