[bug?] validate batch number when save other than submit delivery note

currently in the delivery note’s validate method, the set batch_no function is called when save,but not submit, so it prevent the delivery note creation before the stock of the batch number is available, for make to order case, even though customized packing list can base on draft delivery note, but now delivery note can not be created before the work order finished and stock entry - manufacture is done.

def validate(self):
	self.validate_posting_time()
	super(DeliveryNote, self).validate()
	self.set_status()
	self.so_required()
	self.validate_proj_cust()
	self.check_sales_order_on_hold_or_close("against_sales_order")
	self.validate_for_items()
	self.validate_warehouse()
	self.validate_uom_is_integer("stock_uom", "stock_qty")
	self.validate_uom_is_integer("uom", "qty")
	self.validate_with_previous_doc()

	if self._action != 'submit' and not self.is_return:
		set_batch_nos(self, 'warehouse', True)

	from erpnext.stock.doctype.packed_item.packed_item import make_packing_list
	make_packing_list(self)

	self.update_current_stock()

	if not self.installation_status: self.installation_status = 'Not Installed'

my idea is do the batch validation when submit other than save, change the code from

if self._action != 'submit' and not self.is_return:
    			set_batch_nos(self, 'warehouse', True)

to this

if self._action == 'submit' and not self.is_return:
    			set_batch_nos(self, 'warehouse', True)