summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-11-18 10:10:03 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-11-18 10:10:03 +0700
commitc11d6c564db098b3553893406e9f59bbef029feb (patch)
treeab431f8a9d3335ee174816b88102373e0a59fcc5
parent5fda2edbacb79e31f26e0ba332a76244354ec337 (diff)
<iman> edit code
-rw-r--r--indoteknik_api/models/sale_order.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_api/models/sale_order.py b/indoteknik_api/models/sale_order.py
index 8e0371a3..16a17200 100644
--- a/indoteknik_api/models/sale_order.py
+++ b/indoteknik_api/models/sale_order.py
@@ -85,6 +85,11 @@ class SaleOrder(models.Model):
}
product['quantity'] = line.product_uom_qty
product['available_quantity'] = line.product_available_quantity
+ for data_v2 in sale_order.fulfillment_line_v2:
+ product_v2 = self.env['product.product'].api_single_response(data_v2.product_id)
+ if product['id'] == product_v2['id']:
+ product['so_qty'] = data_v2.so_qty
+ product['reserved_stock_qty'] = data_v2.reserved_stock_qty
data_with_detail['products'].append(product)
for invoice in sale_order.invoice_ids:
if invoice.state == 'posted':