creating new instance of doctype

23 views
Skip to first unread message

gangadhar kadam

unread,
Feb 3, 2013, 4:36:46 AM2/3/13
to erpnext-dev...@googlegroups.com
Hello All,
   I am using erpnext ,I have tried to create a new instance of doctype with old format like 
         inv=Document('Invoice') 
         inv.period=self.doc.s_period
         inv.save(new=1)  
   but i got 'Document'  unknown error

   can anybody help me to use wrapper.insert()  method syntax for my above example?

Thank you.
                
                

Rushabh Mehta

unread,
Feb 3, 2013, 7:56:58 AM2/3/13
to erpnext-dev...@googlegroups.com
Use:

d=webnotes.model_wrapper({
  "period": self.doc.s_period
})
d.insert()

Sent from mobile
--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/O-2GfVLb0PQJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages