Merge pull request #3636 from neilLasrado/po

Patch for Production Order Track Operation
diff --git a/erpnext/change_log/v5/v5_1_5.md b/erpnext/change_log/v5/v5_1_5.md
new file mode 100644
index 0000000..9ebe28b
--- /dev/null
+++ b/erpnext/change_log/v5/v5_1_5.md
@@ -0,0 +1,8 @@
+- Customer's credit days based on fixed days / last day of the next month **[Sponsored by McLean Images](http://www.mcleans.net.au)**
+- Production Order is not allowed against Item Template (for Variants)
+- Currency symbol fixed for outstanding amount and advance amount field in Sales Invoice
+- A Contact can be linked to Customer, Supplier and Sales partner at the same time
+- Validation added to prevent task being closed with open dependent tasks
+- Blocked stock transactions against an expired batch
+- Added Employees in Newsletter List
+- Link Address to Customer / Supplier / Lead, based on logged-in user, if created in portal
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index 9a2da96..43f7cdd 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -171,9 +171,6 @@
 				frappe.throw(_("Row {0}: Qty is mandatory").format(d.idx))
 
 			if self.doctype == "Sales Order":
-				if (frappe.db.get_value("Item", d.item_code, "is_stock_item") == 'Yes' or
-					self.has_sales_bom(d.item_code)) and not d.warehouse:
-						frappe.throw(_("Reserved Warehouse required for stock Item {0} in row {1}").format(d.item_code, d.idx))
 				reserved_warehouse = d.warehouse
 				if flt(d.qty) > flt(d.delivered_qty):
 					reserved_qty_for_main_item = flt(d.qty) - flt(d.delivered_qty)
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index feffc4f..7d5b2ac 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -39,8 +39,8 @@
 		for d in self.get('items'):
 			check_list.append(cstr(d.item_code))
 
-			if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 'Yes':
-				if not d.warehouse:
+			if (frappe.db.get_value("Item", d.item_code, "is_stock_item") == 'Yes' or
+				self.has_sales_bom(d.item_code)) and not d.warehouse:
 					frappe.throw(_("Reserved warehouse required for stock item {0}").format(d.item_code))
 
 			# used for production plan
diff --git a/sponsors.md b/sponsors.md
new file mode 100644
index 0000000..74f67f8
--- /dev/null
+++ b/sponsors.md
@@ -0,0 +1,25 @@
+## Sponsors
+
+
+#### General
+
+- [CWT (connector & wire technology GmbH)](http://www.cwt-assembly.com/) (2013)
+- [Pinnacle GIS](http://pinnaclegis.com.au/) (2014)
+- [Rohit Industries](www.rigpl.com) (2014)
+
+
+#### Features
+
+<table>
+	<tbody>
+		<tr>
+			<td style="width: 30%">
+				<a href="http://www.mcleans.net.au">McLean Images</a>
+			</td>
+			<td>
+				For credit period setting options
+				for Customer <a href="https://github.com/frappe/erpnext/issues/3451">#3451</a>
+			</td>
+		</tr>
+	</tbody>
+</table>