summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order_line.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2023-12-22 09:04:41 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2023-12-22 09:04:41 +0700
commitfbb11ab07e66b28459375af175459c3a23148597 (patch)
tree53483794d588dd3467c1fbc625280b005799602b /indoteknik_custom/models/purchase_order_line.py
parent9abad8c8ee173626b05d13a5db9e81352dce0bb6 (diff)
parent80afbdeecd286c990ddc80c277287df6c95f5ee8 (diff)
Merge branch 'production' into purchasing-job
Diffstat (limited to 'indoteknik_custom/models/purchase_order_line.py')
-rwxr-xr-xindoteknik_custom/models/purchase_order_line.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/indoteknik_custom/models/purchase_order_line.py b/indoteknik_custom/models/purchase_order_line.py
index 06ffd57a..95813e0d 100755
--- a/indoteknik_custom/models/purchase_order_line.py
+++ b/indoteknik_custom/models/purchase_order_line.py
@@ -37,7 +37,7 @@ class PurchaseOrderLine(models.Model):
def suggest_purchasing(self):
for line in self:
- if line.qty_available < 0:
+ if line.qty_available < line.product_qty:
line.suggest = 'harus beli'
else:
line.suggest = 'masih cukup'
@@ -58,10 +58,10 @@ class PurchaseOrderLine(models.Model):
def _compute_qty_stock(self):
for line in self:
- line.qty_available = line.product_id.virtual_available
- line.qty_onhand = line.product_id.qty_available
- line.qty_incoming = line.product_id.incoming_qty
- line.qty_outgoing = line.product_id.outgoing_qty
+ line.qty_available = line.product_id.qty_available_bandengan
+ line.qty_onhand = line.product_id.qty_onhand_bandengan
+ line.qty_incoming = line.product_id.qty_incoming_bandengan
+ line.qty_outgoing = line.product_id.qty_outgoing_bandengan
@api.onchange('product_id')
def _onchange_product_custom(self):