summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-17 11:08:26 +0700
committerFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-17 11:08:26 +0700
commitbd0cc0fa2518e735cbe766bd0ea3726c63d3ebbd (patch)
tree2a72e879b8d6dbf651f57144c108903785566acf
parentf32b6681379ae24945eeb238e46886772aa440ec (diff)
(andri) off validasi approval matches SO
-rwxr-xr-xindoteknik_custom/models/purchase_order.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index b596f365..a1c3c0c4 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -1069,13 +1069,13 @@ class PurchaseOrder(models.Model):
) % order.name)
def button_confirm(self):
- if self.env.user.id != 7 and not self.env.user.is_leader: # Pimpinan
- if '/PJ/' in self.name:
- low_margin_lines = self.order_sales_match_line.filtered(
- 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.")
+ # if self.env.user.id != 7 and not self.env.user.is_leader: # Pimpinan
+ # if '/PJ/' in self.name:
+ # low_margin_lines = self.order_sales_match_line.filtered(
+ # 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: