summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-09-15 11:02:48 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-09-15 11:02:48 +0000
commit3e064e9bbc070260943f2c3ba4055a8831a2b158 (patch)
tree3b740beb91ab838aa69ff2c4685135ba38ff5433 /indoteknik_custom/models/purchase_order.py
parent2bb9e9f01c795f3b72593c1286a9a56ea6e2e120 (diff)
parent248c42efcc30cb55d1827bb7b1e438753ffd0898 (diff)
Merged in mo_po (pull request #412)
Mo po
Diffstat (limited to 'indoteknik_custom/models/purchase_order.py')
-rwxr-xr-xindoteknik_custom/models/purchase_order.py5
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