diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-11-12 13:41:57 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-11-12 13:41:57 +0700 |
| commit | 537e3afa70512c084516b7c11aef970252d83e58 (patch) | |
| tree | 60cc21e0b9b4b5707a1a12a313f1eae50a97ca3a | |
| parent | 9f293c1270e29db78ac8542221a4bbe6d208ea8f (diff) | |
bf plafon in po
| -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 d65e1d66..3397616d 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -738,9 +738,10 @@ class PurchaseOrder(models.Model): def po_approve(self): # if self.amount_untaxed >= 50000000 and not self.env.user.has_group('indoteknik_custom.group_role_merchandiser'): # raise UserError("Hanya Merchandiser yang bisa approve") + greater_than_plafon, message = self._get_msg_plafon_qty() if self.env.user.is_leader or self.env.user.has_group('indoteknik_custom.group_role_merchandiser'): raise UserError("Bisa langsung Confirm") - elif self.total_percent_margin == self.total_so_percent_margin and self.matches_so: + elif self.total_percent_margin == self.total_so_percent_margin and self.matches_so and not greater_than_plafon: raise UserError("Bisa langsung Confirm") else: reason = '' @@ -754,7 +755,6 @@ class PurchaseOrder(models.Model): if not self.matches_so: reason += 'not link with so, ' # Check Plafon Qty and Get Message every Line Product - greater_than_plafon, message = self._get_msg_plafon_qty() if greater_than_plafon: reason += message # Post a highlighted message to lognote |
