Creating new doctype

Hello All,

   In old version(webnotes) to create new instance of a doctype we were using 

  exam=Document(‘EXAM’) 
  exam.abc=abc
  exam.save(new=1)   
  
 how can I implement this in erpnext ?

Thank You.



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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/juHC6_K1xNUJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hi,
This will also work. But better way to create a document is using of wrapper.insert() method. That will call valudate and on_update function automatically.

Regards,
Nabin Hait

On 1 Feb 2013 20:21, "gangadhar kadam" <em...@gmail.com> wrote:
Hello All,
In old version(webnotes) to create new instance of a doctype we were using

exam=Document('EXAM')
exam.abc=abc
exam.save(new=1)
how can I implement this in erpnext ?

Thank You.



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-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/juHC6_K1xNUJ.

For more options, visit https://groups.google.com/groups/opt_out.






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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.