summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-04-17 15:49:17 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-04-17 15:49:17 +0700
commit53a313d291039c88476bedfb226d672ebb81e25b (patch)
tree5192a873a236d00a071f3f20a1269c7570a1a959
parent3d3e6660b991e5170c6629b86790630636b4c9f9 (diff)
modified function check_qty_apo
-rw-r--r--indoteknik_custom/models/automatic_purchase.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py
index d3158182..a5c1041a 100644
--- a/indoteknik_custom/models/automatic_purchase.py
+++ b/indoteknik_custom/models/automatic_purchase.py
@@ -175,8 +175,10 @@ class AutomaticPurchase(models.Model):
qty_pj += line.product_qty + lines.qty_purchase
qty_outgoing_pj += line.qty_outgoing
+ id_po = []
if qty_pj > qty_outgoing_pj:
- raise UserError('Qty yang anda beli lebih dari qty outgoing')
+ id_po.append(po.name)
+ raise UserError('Qty yang anda beli lebih dari qty outgoing. %s' %po)
def create_po_by_vendor(self, vendor_id):
current_time = datetime.now()