from __future__ import unicode_literals
import webnotes
from webnotes.utils import cint, cstr, flt
from webnotes.model.doc import Document
from webnotes.model.code import get_obj
from webnotes import msgprint, _
class CustomDocType(DocType):
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist
Hi Pratik,Is there any update on this ?I am customising the ERPNext version 3 latest but i am worried without using plugins if I upgrade to 4, everything will be overwritten.Is there a way ? Any direction separate the custom code ?Like in version 3, i can use command to create a script @ erpnext/stock/doctype/stock_entry/stock_entry.py. Its content will befrom __future__ import unicode_literals
import webnotes
from webnotes.utils import cint, cstr, flt
from webnotes.model.doc import Document
from webnotes.model.code import get_obj
from webnotes import msgprint, _
class CustomDocType(DocType):
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclistNot sure how i go from here to extend the DocType's functionality. For example:- on_submit of stock_entry I need to do some extra stuffs ...- can i make a normal @webnotes.whitelist() function to expose to client ?
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/8048810f-64c3-424c-ba6b-b8f21ae32943%40googlegroups.com.