From bd0cc0fa2518e735cbe766bd0ea3726c63d3ebbd Mon Sep 17 00:00:00 2001 From: FIN-IT_AndriFP Date: Fri, 17 Oct 2025 11:08:26 +0700 Subject: (andri) off validasi approval matches SO --- indoteknik_custom/models/purchase_order.py | 14 +++++++------- 1 file 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: -- cgit v1.2.3