summaryrefslogtreecommitdiff
path: root/indoteknik_api/models/sale_order.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-11-29 03:42:58 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-11-29 03:42:58 +0000
commit301ad8d828e5ff43515b9f1ab467c9082fccd6f7 (patch)
tree6cc7e014ef006e8d7794f2b6f50437bef61dd724 /indoteknik_api/models/sale_order.py
parentfa3da08e5c0837e1492a3b00b17b7492c07ac676 (diff)
parent75cad0da1476a2e605ef5d0f35cfb58944831934 (diff)
Merged in CR/website-improvment (pull request #255)
CR/website improvment
Diffstat (limited to 'indoteknik_api/models/sale_order.py')
-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 0771f97a..727379c5 100644
--- a/indoteknik_api/models/sale_order.py
+++ b/indoteknik_api/models/sale_order.py
@@ -87,6 +87,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':