From fa8056f4b996443dbe495f28b6ae291fbf4f5c85 Mon Sep 17 00:00:00 2001
From: Oliver Walters <oliver.henry.walters@gmail.com>
Date: Sun, 8 Sep 2019 23:15:44 +1000
Subject: [PATCH] Fill out supplier_part details when receiving a line for a
 purchase order

---
 InvenTree/order/models.py                            | 1 +
 InvenTree/order/templates/order/purchase_orders.html | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py
index ad8a4c0918..9408247fd6 100644
--- a/InvenTree/order/models.py
+++ b/InvenTree/order/models.py
@@ -247,6 +247,7 @@ class PurchaseOrder(Order):
         if line.part:
             stock = StockItem(
                 part=line.part.part,
+                supplier_part=line.part,
                 location=location,
                 quantity=quantity,
                 purchase_order=self)
diff --git a/InvenTree/order/templates/order/purchase_orders.html b/InvenTree/order/templates/order/purchase_orders.html
index 78649ca6de..0e93c6d900 100644
--- a/InvenTree/order/templates/order/purchase_orders.html
+++ b/InvenTree/order/templates/order/purchase_orders.html
@@ -27,7 +27,7 @@ InvenTree | Purchase Orders
 $("#po-create").click(function() {
     launchModalForm("{% url 'purchase-order-create' %}",
         {
-            reload: true,
+            follow: true,
         }
     );
 });