fix in packing list issue
diff --git a/erpnext/selling/doctype/sales_common/sales_common.py b/erpnext/selling/doctype/sales_common/sales_common.py
index 7c5bfad..21f83b5 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.py
+++ b/erpnext/selling/doctype/sales_common/sales_common.py
@@ -437,6 +437,10 @@
pi.serial_no = cstr(line.serial_no)
pi.batch_no = cstr(line.batch_no)
pi.idx = self.packing_list_idx
+
+ # has to be saved, since this function is called on_update of delivery note
+ pi.save()
+
self.packing_list_idx += 1
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index fa4144b..61ebe3f 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -182,7 +182,6 @@
#self.validate_prevdoc_details()
self.validate_reference_value()
self.validate_for_items()
- sales_com_obj.make_packing_list(self,'delivery_note_details')
sales_com_obj.validate_max_discount(self, 'delivery_note_details') #verify whether rate is not greater than max discount
sales_com_obj.get_allocated_sum(self) # this is to verify that the allocated % of sales persons is 100%
sales_com_obj.check_conversion_rate(self)
@@ -474,6 +473,7 @@
# on update
def on_update(self):
+ get_obj('Sales Common').make_packing_list(self,'delivery_note_details')
self.set_actual_qty()
get_obj('Stock Ledger').scrub_serial_nos(self)