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

Python utilities.validate_status函数代码示例

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

本文整理汇总了Python中utilities.validate_status函数的典型用法代码示例。如果您正苦于以下问题:Python validate_status函数的具体用法?Python validate_status怎么用?Python validate_status使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了validate_status函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: validate

	def validate(self):
		super(DocType, self).validate()
		
		self.validate_order_type()
		self.validate_delivery_date()
		self.validate_mandatory()
		self.validate_proj_cust()
		self.validate_po()
		self.validate_uom_is_integer("stock_uom", "qty")
		self.validate_for_items()
		self.validate_warehouse()

		from stock.doctype.packed_item.packed_item import make_packing_list
		self.doclist = make_packing_list(self,'sales_order_details')

		self.validate_with_previous_doc()
				
		if not self.doc.status:
			self.doc.status = "Draft"

		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped", 
			"Cancelled"])

		if not self.doc.billing_status: self.doc.billing_status = 'Not Billed'
		if not self.doc.delivery_status: self.doc.delivery_status = 'Not Delivered'
开发者ID:aalishanmatrix,项目名称:erpnext,代码行数:26,代码来源:sales_order.py


示例2: validate

	def validate(self):
		super(DocType, self).validate()
		
		self.po_required()
		self.validate_fiscal_year()

		if not self.doc.status:
			self.doc.status = "Draft"

		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Cancelled"])

		self.validate_accepted_rejected_qty()
		self.validate_inspection()						 # Validate Inspection
		get_obj('Stock Ledger').validate_serial_no(self, 'purchase_receipt_details')
		self.validate_challan_no()

		pc_obj = get_obj(dt='Purchase Common')
		pc_obj.validate_for_items(self)
		pc_obj.get_prevdoc_date(self)
		pc_obj.validate_reference_value(self)
		self.check_for_stopped_status(pc_obj)

		# sub-contracting
		self.validate_for_subcontracting()
		self.update_raw_materials_supplied("pr_raw_material_details")
		
		self.update_valuation_rate("purchase_receipt_details")
开发者ID:twocngdagz,项目名称:erpnext,代码行数:28,代码来源:purchase_receipt.py


示例3: validate

	def validate(self):
		self.validate_fiscal_year()
		self.validate_order_type()
		self.validate_mandatory()
		self.validate_proj_cust()
		self.validate_po()
		#self.validate_reference_value()
		self.validate_for_items()
		sales_com_obj = get_obj(dt = 'Sales Common')
		sales_com_obj.check_active_sales_items(self)
		sales_com_obj.check_conversion_rate(self)

				# verify whether rate is not greater than max_discount
		sales_com_obj.validate_max_discount(self,'sales_order_details')
				# this is to verify that the allocated % of sales persons is 100%
		sales_com_obj.get_allocated_sum(self)
		self.doclist = sales_com_obj.make_packing_list(self,'sales_order_details')

				# get total in words
		dcc = TransactionBase().get_company_currency(self.doc.company)		
		self.doc.in_words = sales_com_obj.get_total_in_words(dcc, self.doc.rounded_total)
		self.doc.in_words_export = sales_com_obj.get_total_in_words(self.doc.currency, self.doc.rounded_total_export)
		
		if not self.doc.status:
			self.doc.status = "Draft"

		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped", 
			"Cancelled"])

		if not self.doc.billing_status: self.doc.billing_status = 'Not Billed'
		if not self.doc.delivery_status: self.doc.delivery_status = 'Not Delivered'
开发者ID:arunemmanuel,项目名称:erpnext,代码行数:32,代码来源:sales_order.py


示例4: validate

	def validate(self):
		self.validate_fiscal_year()

		if not self.doc.status:
			self.doc.status = "Draft"

		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped", 
			"Cancelled"])

		# Step 2:=> get Purchase Common Obj
		pc_obj = get_obj(dt='Purchase Common')
		
		# Step 3:=> validate mandatory
		pc_obj.validate_mandatory(self)

		# Step 4:=> validate for items
		pc_obj.validate_for_items(self)

		# Step 5:=> validate conversion rate
		pc_obj.validate_conversion_rate(self)
		
		# Get po date
		pc_obj.get_prevdoc_date(self)
		
		# validate_doc
		self.validate_doc(pc_obj)
		
		# Check for stopped status
		self.check_for_stopped_status(pc_obj)
		
		 # get total in words
		dcc = TransactionBase().get_company_currency(self.doc.company)
		self.doc.in_words = pc_obj.get_total_in_words(dcc, self.doc.grand_total)
		self.doc.in_words_import = pc_obj.get_total_in_words(self.doc.currency, self.doc.grand_total_import)
开发者ID:arunemmanuel,项目名称:erpnext,代码行数:35,代码来源:purchase_order.py


示例5: validate

	def validate(self):
		self.po_required()
		self.validate_fiscal_year()

		if not self.doc.status:
			self.doc.status = "Draft"

		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Cancelled"])

		self.validate_accepted_rejected_qty()
		self.validate_inspection()						 # Validate Inspection
		get_obj('Stock Ledger').validate_serial_no(self, 'purchase_receipt_details')
		self.validate_challan_no()

		pc_obj = get_obj(dt='Purchase Common')
		pc_obj.validate_for_items(self)
		pc_obj.validate_mandatory(self)
		pc_obj.validate_conversion_rate(self)
		pc_obj.get_prevdoc_date(self)
		pc_obj.validate_reference_value(self)
		self.check_for_stopped_status(pc_obj)

		# get total in words
		dcc = TransactionBase().get_company_currency(self.doc.company)
		self.doc.in_words = pc_obj.get_total_in_words(dcc, self.doc.grand_total)
		self.doc.in_words_import = pc_obj.get_total_in_words(self.doc.currency, self.doc.grand_total_import)
		# update valuation rate
		self.update_valuation_rate()
开发者ID:arunemmanuel,项目名称:erpnext,代码行数:29,代码来源:purchase_receipt.py


示例6: validate

	def validate(self):
		super(DocType, self).validate()
		
		self.validate_order_type()
		self.validate_delivery_date()
		self.validate_mandatory()
		self.validate_proj_cust()
		self.validate_po()
		self.validate_uom_is_integer("stock_uom", "qty")
		self.validate_for_items()
		self.validate_warehouse()
		sales_com_obj = get_obj(dt = 'Sales Common')
		sales_com_obj.check_active_sales_items(self)
		

		sales_com_obj.validate_max_discount(self,'sales_order_details')
		self.doclist = sales_com_obj.make_packing_list(self,'sales_order_details')
		
		self.validate_with_previous_doc()
				
		if not self.doc.status:
			self.doc.status = "Draft"

		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped", 
			"Cancelled"])

		if not self.doc.billing_status: self.doc.billing_status = 'Not Billed'
		if not self.doc.delivery_status: self.doc.delivery_status = 'Not Delivered'
开发者ID:rohitw1991,项目名称:innoworth-app,代码行数:29,代码来源:sales_order.py


示例7: validate

    def validate(self):
        super(DocType, self).validate()

        self.validate_fiscal_year()

        if not self.doc.status:
            self.doc.status = "Draft"

        import utilities

        utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped", "Cancelled"])

        # Step 2:=> get Purchase Common Obj
        pc_obj = get_obj(dt="Purchase Common")

        # Step 4:=> validate for items
        pc_obj.validate_for_items(self)

        # Get po date
        pc_obj.get_prevdoc_date(self)

        # validate_doc
        self.validate_doc(pc_obj)

        # Check for stopped status
        self.check_for_stopped_status(pc_obj)
开发者ID:jnarvaezp,项目名称:erpnext,代码行数:26,代码来源:purchase_order.py


示例8: validate

	def validate(self):
		super(DocType, self).validate()
		
		self.validate_fiscal_year()

		if not self.doc.status:
			self.doc.status = "Draft"

		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped", 
			"Cancelled"])

		# Step 2:=> get Purchase Common Obj
		pc_obj = get_obj(dt='Purchase Common')
		

		# Step 4:=> validate for items
		pc_obj.validate_for_items(self)

		# Get po date
		pc_obj.get_prevdoc_date(self)
		
		# validate_doc
		self.validate_doc(pc_obj)
		
		# Check for stopped status
		self.check_for_stopped_status(pc_obj)
		
		# sub-contracting
		self.validate_for_subcontracting()
		self.update_raw_materials_supplied("po_raw_material_details")
开发者ID:BillTheBest,项目名称:erpnext,代码行数:31,代码来源:purchase_order.py


示例9: validate

	def validate(self):
		import utilities
		utilities.validate_status(self.doc.status, ["Present", "Absent", "Half Day"])
		self.validate_fiscal_year()
		self.validate_att_date()
		self.validate_duplicate_record()
		self.check_leave_record()
开发者ID:BANSALJEE,项目名称:erpnext,代码行数:7,代码来源:attendance.py


示例10: validate

	def validate(self):
		super(DocType, self).validate()
		
		self.po_required()

		if not self.doc.status:
			self.doc.status = "Draft"

		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Cancelled"])

		self.validate_with_previous_doc()
		self.validate_rejected_warehouse()
		self.validate_accepted_rejected_qty()
		self.validate_inspection()
		self.validate_uom_is_integer("uom", ["qty", "received_qty"])
		self.validate_uom_is_integer("stock_uom", "stock_qty")
		self.validate_challan_no()

		pc_obj = get_obj(dt='Purchase Common')
		pc_obj.validate_for_items(self)
		pc_obj.get_prevdoc_date(self)
		self.check_for_stopped_status(pc_obj)

		# sub-contracting
		self.validate_for_subcontracting()
		self.update_raw_materials_supplied("pr_raw_material_details")
		
		self.update_valuation_rate("purchase_receipt_details")
开发者ID:rohitw1991,项目名称:innoworth-app,代码行数:29,代码来源:purchase_receipt.py


示例11: validate

	def validate(self):
		super(DocType, self).validate()
		
		self.validate_fiscal_year()
		self.validate_order_type()
		self.validate_mandatory()
		self.validate_proj_cust()
		self.validate_po()
		#self.validate_reference_value()
		self.validate_for_items()
		sales_com_obj = get_obj(dt = 'Sales Common')
		sales_com_obj.check_active_sales_items(self)
		sales_com_obj.check_conversion_rate(self)

		sales_com_obj.validate_max_discount(self,'sales_order_details')
		sales_com_obj.get_allocated_sum(self)
		self.doclist = sales_com_obj.make_packing_list(self,'sales_order_details')
		
		if not self.doc.status:
			self.doc.status = "Draft"

		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped", 
			"Cancelled"])

		if not self.doc.billing_status: self.doc.billing_status = 'Not Billed'
		if not self.doc.delivery_status: self.doc.delivery_status = 'Not Delivered'
开发者ID:MiteshC,项目名称:erpnext,代码行数:27,代码来源:sales_order.py


示例12: validate

	def validate(self):
		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "submitted", "Cancelled"])

		self.so_required()
		self.validate_fiscal_year()
		self.validate_proj_cust()
		sales_com_obj = get_obj(dt = 'Sales Common')
		sales_com_obj.check_stop_sales_order(self)
		sales_com_obj.check_active_sales_items(self)
		sales_com_obj.get_prevdoc_date(self)
		self.validate_mandatory()
		self.validate_reference_value()
		self.validate_for_items()
		sales_com_obj.validate_max_discount(self, 'delivery_note_details')						 #verify whether rate is not greater than max discount
		sales_com_obj.get_allocated_sum(self)	# this is to verify that the allocated % of sales persons is 100%
		sales_com_obj.check_conversion_rate(self)
		
		# Get total in Words
		dcc = TransactionBase().get_company_currency(self.doc.company)
		self.doc.in_words = sales_com_obj.get_total_in_words(dcc, self.doc.rounded_total)
		self.doc.in_words_export = sales_com_obj.get_total_in_words(self.doc.currency, self.doc.rounded_total_export)

		# Set actual qty for each item in selected warehouse
		self.update_current_stock()

		self.doc.status = 'Draft'
		if not self.doc.billing_status: self.doc.billing_status = 'Not Billed'
		if not self.doc.installation_status: self.doc.installation_status = 'Not Installed'
开发者ID:arunemmanuel,项目名称:erpnext,代码行数:29,代码来源:delivery_note.py


示例13: validate

	def validate(self):
		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped", 
			"In Process", "Completed", "Cancelled"])

		if self.doc.production_item :
			item_detail = sql("select name from `tabItem` where name = '%s' and docstatus != 2"
			 	% self.doc.production_item, as_dict = 1)
			if not item_detail:
				msgprint("Item '%s' does not exist or cancelled in the system." 
					% cstr(self.doc.production_item), raise_exception=1)

		if self.doc.bom_no:
			bom = sql("""select name from `tabBOM` where name=%s and docstatus=1 
				and is_active=1 and item=%s"""
				, (self.doc.bom_no, self.doc.production_item), as_dict =1)
			if not bom:
				msgprint("""Incorrect BOM: %s entered. 
					May be BOM not exists or inactive or not submitted 
					or for some other item.""" % cstr(self.doc.bom_no), raise_exception=1)
					
		if self.doc.sales_order:
			if not webnotes.conn.sql("""select name from `tabSales Order` 
					where name=%s and docstatus = 1""", self.doc.sales_order):
				msgprint("Sales Order: %s is not valid" % self.doc.sales_order, raise_exception=1)
				
			self.validate_production_order_against_so()

		from utilities.transaction_base import validate_uom_is_integer
		validate_uom_is_integer(self.doclist, "stock_uom", ["qty", "produced_qty"])
开发者ID:BANSALJEE,项目名称:erpnext,代码行数:30,代码来源:production_order.py


示例14: validate

	def validate(self):
		super(DocType, self).validate()
		
		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Cancelled"])

		self.so_required()
		self.validate_fiscal_year()
		self.validate_proj_cust()
		sales_com_obj = get_obj(dt = 'Sales Common')
		sales_com_obj.check_stop_sales_order(self)
		sales_com_obj.check_active_sales_items(self)
		sales_com_obj.get_prevdoc_date(self)
		self.validate_mandatory()
		self.validate_reference_value()
		self.validate_for_items()
		self.validate_warehouse()
		
		sales_com_obj.validate_max_discount(self, 'delivery_note_details')
		sales_com_obj.get_allocated_sum(self)
		sales_com_obj.check_conversion_rate(self)

		# Set actual qty for each item in selected warehouse
		self.update_current_stock()

		self.doc.status = 'Draft'
		if not self.doc.billing_status: self.doc.billing_status = 'Not Billed'
		if not self.doc.installation_status: self.doc.installation_status = 'Not Installed'
开发者ID:BillTheBest,项目名称:erpnext,代码行数:28,代码来源:delivery_note.py


示例15: validate

	def validate(self):
		super(DocType, self).validate()
		
		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Cancelled"])

		self.so_required()
		self.validate_proj_cust()
		sales_com_obj = get_obj(dt = 'Sales Common')
		sales_com_obj.check_stop_sales_order(self)
		sales_com_obj.check_active_sales_items(self)
		sales_com_obj.get_prevdoc_date(self)
		self.validate_for_items()
		self.validate_warehouse()
		self.validate_uom_is_integer("stock_uom", "qty")
		
		sales_com_obj.validate_max_discount(self, 'delivery_note_details')
		sales_com_obj.check_conversion_rate(self)

		# Set actual qty for each item in selected warehouse
		self.update_current_stock()
		
		self.validate_with_previous_doc()
		
		self.doc.status = 'Draft'
		if not self.doc.installation_status: self.doc.installation_status = 'Not Installed'	
开发者ID:LPlusPlus,项目名称:erpnext,代码行数:26,代码来源:delivery_note.py


示例16: validate

	def validate(self):
		super(DocType, self).validate()
		
		self.validate_schedule_date()
		self.validate_uom_is_integer("uom", "qty")
		
		if not self.doc.status:
			self.doc.status = "Draft"

		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped", 
			"Cancelled"])
		
		# restrict material request type
		self.validate_value("material_request_type", "in", ["Purchase", "Transfer"])

		# Get Purchase Common Obj
		pc_obj = get_obj(dt='Purchase Common')


		# Validate for items
		pc_obj.validate_for_items(self)
		
		# Validate qty against SO
		self.validate_qty_against_so()
开发者ID:LPlusPlus,项目名称:erpnext,代码行数:25,代码来源:material_request.py


示例17: validate

	def validate(self):
		# if self.doc.exp_approver == self.doc.owner:
		# 	webnotes.msgprint("""Self Approval is not allowed.""", raise_exception=1)

		import utilities
		utilities.validate_status(self.doc.approval_status, ["Draft", "Approved", "Rejected"])

		self.validate_fiscal_year()
		self.validate_exp_details()
开发者ID:gowrav-vishwakarma,项目名称:erpnext,代码行数:9,代码来源:expense_claim.py


示例18: validate

	def validate(self):
		import utilities
		utilities.validate_status(self.doc.status, ["Active", "Left"])

		self.doc.employee = self.doc.name
		self.validate_date()
		self.validate_email()
		self.validate_status()
		self.validate_employee_leave_approver()
开发者ID:BANSALJEE,项目名称:erpnext,代码行数:9,代码来源:employee.py


示例19: validate

	def validate(self):
		# if self.doc.leave_approver == self.doc.owner:
		# 	webnotes.msgprint("""Self Approval is not allowed.""", raise_exception=1)
		import utilities
		utilities.validate_status(self.doc.status, ["Open", "Approved", "Rejected"])

		self.validate_to_date()
		self.validate_balance_leaves()
		self.validate_leave_overlap()
		self.validate_max_days()
开发者ID:gowrav-vishwakarma,项目名称:erpnext,代码行数:10,代码来源:leave_application.py


示例20: validate

	def validate(self):
		import utilities
		utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped", 
			"In Process", "Completed", "Cancelled"])

		self.validate_bom_no()
		self.validate_sales_order()
		self.validate_warehouse()
		
		from utilities.transaction_base import validate_uom_is_integer
		validate_uom_is_integer(self.doclist, "stock_uom", ["qty", "produced_qty"])
开发者ID:CarlosAnt,项目名称:erpnext,代码行数:11,代码来源:production_order.py



注:本文中的utilities.validate_status函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python utilities.verify函数代码示例发布时间:2022-05-26
下一篇:
Python utilities.valid_string函数代码示例发布时间: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