Do not make packing list after submission
This commit is contained in:
		
							parent
							
								
									69641ddc36
								
							
						
					
					
						commit
						b73d3f925d
					
				| @ -102,7 +102,6 @@ class SalesOrder(SellingController): | |||||||
| 		self.validate_warehouse() | 		self.validate_warehouse() | ||||||
| 
 | 
 | ||||||
| 		from erpnext.stock.doctype.packed_item.packed_item import make_packing_list | 		from erpnext.stock.doctype.packed_item.packed_item import make_packing_list | ||||||
| 
 |  | ||||||
| 		make_packing_list(self,'sales_order_details') | 		make_packing_list(self,'sales_order_details') | ||||||
| 
 | 
 | ||||||
| 		self.validate_with_previous_doc() | 		self.validate_with_previous_doc() | ||||||
|  | |||||||
| @ -61,6 +61,9 @@ def update_packing_list_item(obj, packing_item_code, qty, warehouse, line, packi | |||||||
| 
 | 
 | ||||||
| def make_packing_list(obj, item_table_fieldname): | def make_packing_list(obj, item_table_fieldname): | ||||||
| 	"""make packing list for sales bom item""" | 	"""make packing list for sales bom item""" | ||||||
|  | 
 | ||||||
|  | 	if obj._action == "update_after_submit": return | ||||||
|  | 
 | ||||||
| 	packing_list_idx = 0 | 	packing_list_idx = 0 | ||||||
| 	parent_items = [] | 	parent_items = [] | ||||||
| 	for d in obj.get(item_table_fieldname): | 	for d in obj.get(item_table_fieldname): | ||||||
| @ -92,4 +95,3 @@ def cleanup_packing_list(obj, parent_items): | |||||||
| 	for d in packing_details: | 	for d in packing_details: | ||||||
| 		if d not in delete_list: | 		if d not in delete_list: | ||||||
| 			obj.append("packing_details", d) | 			obj.append("packing_details", d) | ||||||
| 	 |  | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user