summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-16 11:52:52 +0700
committerFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-16 11:52:52 +0700
commit8ff0270ee40b34d8eb85cd8d5e9572211a0e36a9 (patch)
tree455f1f0fdd02eb466d25a848c810dd098f70c2b9
parent787ce986cc652bd92d0e477c11853eaef871b4e5 (diff)
(andri) off check po manual confirm
-rwxr-xr-xindoteknik_custom/models/purchase_order.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index 1a88d036..f8718a0d 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -1072,15 +1072,15 @@ class PurchaseOrder(models.Model):
if self.env.user.id != 7: # Pimpinan
if '/PJ/' in self.name:
low_margin_lines = self.order_sales_match_line.filtered(
- lambda match: match.so_header_margin <= 34.0
+ lambda match: match.so_header_margin <= 15.0
)
if low_margin_lines:
raise UserError("Matches SO terdapat item dengan header margin SO <= 15%. Approval Pimpinan diperlukan.")
- else:
- is_po_manual = '/A/' not in self.name and '/MO/' not in self.name
- if is_po_manual:
- if not self.order_sales_match_line:
- raise UserError("Tidak ada matches SO, Approval Pimpinan diperlukan.")
+ # else:
+ # is_po_manual = '/A/' not in self.name and '/MO/' not in self.name
+ # if is_po_manual:
+ # if not self.order_sales_match_line:
+ # raise UserError("Tidak ada matches SO, Approval Pimpinan diperlukan.")
self._check_assets_note()
# self._check_payment_term() # check payment term