diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-09-15 11:07:40 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-09-15 11:07:40 +0700 |
| commit | 248c42efcc30cb55d1827bb7b1e438753ffd0898 (patch) | |
| tree | 2e638148b353361db508cd1bc3a4f22ae0ac9cff | |
| parent | 3bc157731d03e9beb41dab993461b2bd6dcb1953 (diff) | |
<Miqdad> done
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 18811b85..98cf6ff1 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -1066,8 +1066,11 @@ class PurchaseOrder(models.Model): # sticky=True # ) + has_bom = self.product_bom_id.id + has_manufacturing = self.manufacturing_id.id + 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: + if not self.matches_so and not self.env.user.is_purchasing_manager and not self.env.user.is_leader and not has_bom and not has_manufacturing: raise UserError("Tidak ada link dengan SO, harus di confirm oleh Purchasing Manager") send_email = False |
