def load_from_db(self, dt=None, dn=None): """ Load doclist from dt """ from webnotes.model.doc import getchildren if not dt: dt = self.doc.doctype if not dn: dn = self.doc.name doc = Document(dt, dn) # get all children types tablefields = webnotes.model.meta.get_table_fields(dt) # load chilren doclist = webnotes.doclist([ doc, ]) for t in tablefields: doclist += getchildren(doc.name, t[0], t[1], dt) self.set_doclist(doclist) if dt == dn: self.convert_type(self.doc)
def load_from_db(self, dt=None, dn=None, prefix="tab"): """ Load doclist from dt """ from webnotes.model.doc import getchildren if not dt: dt = self.doc.doctype if not dn: dn = self.doc.name doc = Document(dt, dn, prefix=prefix) # get all children types tablefields = webnotes.model.meta.get_table_fields(dt) # load chilren doclist = webnotes.doclist([doc]) for t in tablefields: doclist += getchildren(doc.name, t[0], t[1], dt, prefix=prefix) self.set_doclist(doclist) if dt == dn: self.convert_type(self.doc)
def load_from_db(self, dt, dn): """ Load doclist from dt """ from webnotes.model.doc import Document, getchildren doc = Document(dt, dn, prefix=prefix) # get all children types tablefields = webnotes.model.meta.get_table_fields(dt) # load chilren doclist = [doc,] for t in tablefields: doclist += getchildren(doc.name, t[0], t[1], dt, prefix=prefix) self.docs = docs
def load_from_db(self, dt=None, dn=None, prefix='tab'): from webnotes.model.doc import Document, getchildren if not dt: dt = self.doc.doctype if not dn: dn = self.doc.name doc = Document(dt, dn, prefix=prefix) # get all children types tablefields = webnotes.model.meta.get_table_fields(dt) # load chilren doclist = webnotes.doclist([doc,]) for t in tablefields: doclist += getchildren(doc.name, t[0], t[1], dt, prefix=prefix) self.set_doclist(doclist) self.run_method("onload")
def load_from_db(self, dt, dn): """ Load doclist from dt """ from webnotes.model.doc import Document, getchildren doc = Document(dt, dn, prefix=prefix) # get all children types tablefields = webnotes.model.meta.get_table_fields(dt) # load chilren doclist = [ doc, ] for t in tablefields: doclist += getchildren(doc.name, t[0], t[1], dt, prefix=prefix) self.docs = docs
def load_from_db(self, dt=None, dn=None, prefix='tab'): """ Load doclist from dt """ from webnotes.model.doc import Document, getchildren if not dt: dt = self.doc.doctype if not dn: dn = self.doc.name doc = Document(dt, dn, prefix=prefix) # get all children types tablefields = webnotes.model.meta.get_table_fields(dt) # load chilren doclist = webnotes.doclist([ doc, ]) for t in tablefields: doclist += getchildren(doc.name, t[0], t[1], dt, prefix=prefix) self.set_doclist(doclist) self.run_method("onload")