Merge pull request #2489 from nabinhait/fix1

Pull all customer's po no in delivery note when made from multiple SO
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index 69693a7..6065ad5 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -175,6 +175,7 @@
    "fieldtype": "Data", 
    "hidden": 0, 
    "label": "PO No", 
+   "no_copy": 1, 
    "oldfieldname": "po_no", 
    "oldfieldtype": "Data", 
    "permlevel": 0, 
@@ -1020,7 +1021,7 @@
  "idx": 1, 
  "is_submittable": 1, 
  "issingle": 0, 
- "modified": "2014-10-08 14:22:44.717108", 
+ "modified": "2014-12-12 12:35:09.652211", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Sales Order", 
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 8153d8d..604ac11 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -275,6 +275,14 @@
 @frappe.whitelist()
 def make_delivery_note(source_name, target_doc=None):
 	def set_missing_values(source, target):
+		if source.po_no:
+			if target.po_no:
+				target_po_no = target.po_no.split(", ")
+				target_po_no.append(source.po_no)
+				target.po_no = ", ".join(list(set(target_po_no))) if len(target_po_no) > 1 else target_po_no[0]
+			else:
+				target.po_no = source.po_no
+
 		target.ignore_pricing_rule = 1
 		target.run_method("set_missing_values")
 		target.run_method("calculate_taxes_and_totals")
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json
index 4a957ff..2eeba50 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.json
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.json
@@ -178,7 +178,7 @@
   {
    "fieldname": "po_no", 
    "fieldtype": "Data", 
-   "hidden": 1, 
+   "hidden": 0, 
    "label": "Customer's Purchase Order No", 
    "no_copy": 0, 
    "oldfieldname": "po_no", 
@@ -1013,7 +1013,7 @@
  "idx": 1, 
  "in_create": 0, 
  "is_submittable": 1, 
- "modified": "2014-09-09 05:35:30.700911", 
+ "modified": "2014-12-12 12:36:59.262500", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Delivery Note",