• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python webnotes.get_doclist函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python webnotes.get_doctype函数代码示例发布时间:2022-05-26
下一篇:
Python webnotes.get_config函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap