Ok do whatever @nabinhait says :)

On 04-May-2014, at 2:15 pm, Anand Doshi <notifications@github.com> wrote:

> In erpnext/stock/doctype/serial_no/serial_no.py:
> 
> > @@ -192,6 +193,25 @@ def on_stock_ledger_entry(self):
> >  			self.set_sales_details(last_sle.get("delivery_sle"))
> >  			self.set_maintenance_status()
> >  
> > +	def validate_status(self):
> > +		def check_if_available_for_delivery():
> > +			if not (self.purchase_document_type and self.purchase_document_no):
> > +				frappe.throw(_("Serial No {0} has to be received to make it available for delivery").format(self.name))
> > +
> In case of manufacturing, the stock entry doctype and name goes into these fields 
> 
> 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.
> 
> —
> Reply to this email directly or view it on GitHub.
>