diff options
Diffstat (limited to 'indoteknik_custom/models/purchase_order.py')
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index a76cdab1..1a88d036 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -1072,10 +1072,10 @@ 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.sale_line_id.item_percent_margin <= 34.0 + lambda match: match.so_header_margin <= 34.0 ) if low_margin_lines: - raise UserError("Matches SO terdapat item dengan margin SO <= 15%. Approval Pimpinan diperlukan.") + 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: |
