diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2026-01-20 08:43:13 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2026-01-20 08:43:13 +0700 |
| commit | b0c7ff770d472a4fbcf2c93bcf546f67f4d8c799 (patch) | |
| tree | ca47aa24c6cdb0ef0f9c131581f55316d1437d1a /indoteknik_custom/models | |
| parent | 7e52c025439a8614a1ec6ae77dfdda934989a09b (diff) | |
| parent | 32d0c433ff990bde6f2839982b935cf809bde29d (diff) | |
Merge branch 'odoo-backup' of bitbucket.org:altafixco/indoteknik-addons into gudang-service
merge
Diffstat (limited to 'indoteknik_custom/models')
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index a114743f..35fa79a8 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -1083,8 +1083,9 @@ class PurchaseOrder(models.Model): if '/PJ/' in self.name: price_change_detected = any(line.price_unit_before for line in self.order_line) if price_change_detected: - if self.total_percent_margin <= 15.0: - raise UserError("Approval Pimpinan diperlukan jika terdapat perubahan Unit Price pada PO Line dan Memiliki Margin <= 15%") + if self.order_sales_match_line: + if self.total_percent_margin <= 15.0: + raise UserError("Approval Pimpinan diperlukan jika terdapat perubahan Unit Price pada PO Line dan Memiliki Margin <= 15%") else: low_margin_match_so = self.order_sales_match_line.filtered( lambda match: match.so_header_margin <= 15.0 |
