diff --git a/InvenTree/order/templates/order/po_received_items.html b/InvenTree/order/templates/order/po_received_items.html
new file mode 100644
index 0000000000..b3b46c4aa4
--- /dev/null
+++ b/InvenTree/order/templates/order/po_received_items.html
@@ -0,0 +1,34 @@
+{% extends "order/order_base.html" %}
+
+{% load inventree_extras %}
+{% load i18n %}
+{% load static %}
+
+{% block details %}
+
+{% include 'order/po_tabs.html' with tab='received' %}
+
+
{% trans "Received Items" %}
+
+
+{% include "stock_table.html" with read_only=True %}
+
+{% endblock %}
+
+{% block js_ready %}
+{{ block.super }}
+
+loadStockTable($("#stock-table"), {
+ params: {
+ purchase_order: {{ order.id }},
+ part_detail: true,
+ supplier_detail: true,
+ location_detail: true,
+ },
+ buttons: [
+ '#stock-options',
+ ],
+ filterkey: "postock"
+});
+
+{% endblock %}
\ No newline at end of file
diff --git a/InvenTree/order/templates/order/po_tabs.html b/InvenTree/order/templates/order/po_tabs.html
index d5c7286c3f..5792107b04 100644
--- a/InvenTree/order/templates/order/po_tabs.html
+++ b/InvenTree/order/templates/order/po_tabs.html
@@ -2,7 +2,10 @@
-
- {% trans "Items" %}
+ {% trans "Line Items" %}
+
+ -
+ {% trans "Received Items" %}
-
{% trans "Attachments" %}
diff --git a/InvenTree/order/urls.py b/InvenTree/order/urls.py
index 22104df5c7..7707b73f37 100644
--- a/InvenTree/order/urls.py
+++ b/InvenTree/order/urls.py
@@ -21,6 +21,7 @@ purchase_order_detail_urls = [
url(r'^notes/', views.PurchaseOrderNotes.as_view(), name='po-notes'),
+ url(r'^received/', views.PurchaseOrderDetail.as_view(template_name='order/po_received_items.html'), name='po-received'),
url(r'^attachments/', views.PurchaseOrderDetail.as_view(template_name='order/po_attachments.html'), name='po-attachments'),
url(r'^.*$', views.PurchaseOrderDetail.as_view(), name='po-detail'),
]
diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py
index ab70c98322..dabeaa20ea 100644
--- a/InvenTree/stock/api.py
+++ b/InvenTree/stock/api.py
@@ -498,6 +498,11 @@ class StockList(generics.ListCreateAPIView):
if sales_order:
queryset = queryset.filter(sales_order=sales_order)
+ purchase_order = params.get('purchase_order', None)
+
+ if purchase_order is not None:
+ queryset = queryset.filter(purchase_order=purchase_order)
+
# Filter stock items which are installed in another (specific) stock item
installed_in = params.get('installed_in', None)
diff --git a/InvenTree/templates/js/stock.html b/InvenTree/templates/js/stock.html
index eb5e4adbf7..f8388c3b62 100644
--- a/InvenTree/templates/js/stock.html
+++ b/InvenTree/templates/js/stock.html
@@ -262,7 +262,7 @@ function loadStockTable(table, options) {
formatNoMatches: function() {
return '{% trans "No stock items matching query" %}';
},
- url: options.url,
+ url: options.url || "{% url 'api-stock-list' %}",
queryParams: filters,
customSort: customGroupSorter,
groupBy: true,