本文整理汇总了Python中webnotes.get_doclist函数的典型用法代码示例。如果您正苦于以下问题:Python get_doclist函数的具体用法?Python get_doclist怎么用?Python get_doclist使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_doclist函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: add_workflows
def add_workflows(doclist):
from webnotes.model.workflow import get_workflow_name
doctype = doclist[0].name
# get active workflow
workflow_name = get_workflow_name(doctype)
if workflow_name and webnotes.conn.exists("Workflow", workflow_name):
doclist += webnotes.get_doclist("Workflow", workflow_name)
# add workflow states (for icons and style)
for state in map(lambda d: d.state, doclist.get({"doctype":"Workflow Document State"})):
doclist += webnotes.get_doclist("Workflow State", state)
开发者ID:bindscha,项目名称:wnframework_old,代码行数:13,代码来源:doctype.py
示例2: get_doctype_doclist
def get_doctype_doclist(doctype):
"""get doclist of single doctype"""
doclist = webnotes.get_doclist('DocType', doctype)
add_custom_fields(doctype, doclist)
apply_property_setters(doctype, doclist)
sort_fields(doclist)
return doclist
开发者ID:bindscha,项目名称:wnframework_old,代码行数:7,代码来源:doctype.py
示例3: add_validators
def add_validators(doctype, doclist):
for validator in webnotes.conn.sql(
"""select name from `tabDocType Validator` where
for_doctype=%s""",
doctype,
as_dict=1,
):
doclist.extend(webnotes.get_doclist("DocType Validator", validator.name))
开发者ID:rohitw1991,项目名称:latestadbwnf,代码行数:8,代码来源:doctype.py
示例4: get_return_doclist_and_details
def get_return_doclist_and_details(args):
ref = webnotes._dict()
# get ref_doclist
if args["purpose"] in return_map:
for fieldname, val in return_map[args["purpose"]].items():
if args.get(fieldname):
ref.fieldname = fieldname
ref.doclist = webnotes.get_doclist(val[0], args[fieldname])
ref.parentfields = val[1]
break
return ref
开发者ID:andrewabel,项目名称:erpnext,代码行数:13,代码来源:stock_entry.py
示例5: append_taxes
def append_taxes(self):
"""append taxes as per tax master link field"""
# clear tax table
self.doclist = self.doclist.get({"parentfield": ["!=",
self.fmap.taxes_and_charges]})
tax_master_doctype = self.meta.get_options(self.fmap.taxes_and_charges_master)
master_tax_list = webnotes.get_doclist(tax_master_doctype,
self.doc.fields.get(self.fmap.taxes_and_charges_master)).get(
{"parentfield": self.fmap.taxes_and_charges})
for base_tax in master_tax_list:
tax = _dict([[field, base_tax.fields.get(field)]
for field in base_tax.fields
if field not in webnotes.model.default_fields])
tax.update({
"doctype": self.meta.get_options(self.fmap.taxes_and_charges),
"parentfield": self.fmap.taxes_and_charges,
"rate": flt(tax.rate, self.precision.tax.rate),
})
self.doclist.append(tax)
开发者ID:AminfiBerlin,项目名称:erpnext,代码行数:21,代码来源:tax_controller.py
注:本文中的webnotes.get_doclist函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论