In case of manufacturing, the stock entry doctype and name goes into these fields :frowning: 

	self.purchase_document_type = purchase_sle.voucher_type
	self.purchase_document_no = purchase_sle.voucher_no

These fields are essentially how the serial no came into existence.