summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/purchase_order.py')
-rwxr-xr-xindoteknik_custom/models/purchase_order.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index ea99e165..7e18bd8f 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -151,6 +151,10 @@ class PurchaseOrder(models.Model):
self.order_line.unlink()
for order_line in self.sale_order_id.order_line:
if order_line.product_id.id and order_line.product_id.id not in products_exception:
+ # qty_available = self.env['stock.quant'].search([
+ # ('product_id', '=', order_line.product_id.id),
+ # ('location_id', '=', "BU/Stock")
+ # ], limit=1)
qty_available = order_line.product_id.virtual_available
suggest = 'harus beli'
if order_line.product_id.virtual_available > order_line.product_qty: