diff options
| -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 |
