def validate(self): super(DeliveryNote, self).validate() from erpnext.utilities import validate_status validate_status(self.status, ["Draft", "Submitted", "Cancelled"]) self.so_required() self.validate_proj_cust() self.check_stop_sales_order("against_sales_order") self.validate_for_items() self.validate_warehouse() self.validate_uom_is_integer("stock_uom", "qty") self.validate_with_previous_doc() from erpnext.stock.doctype.packed_item.packed_item import make_packing_list make_packing_list(self, "delivery_note_details") self.update_current_stock() if not self.status: self.status = "Draft" if not self.installation_status: self.installation_status = "Not Installed"
def validate(self): super(PurchaseReceipt, self).validate() self.po_required() if not self.status: self.status = "Draft" from erpnext.utilities import validate_status validate_status(self.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") pc_obj = frappe.get_doc('Purchase Common') pc_obj.validate_for_items(self) self.check_for_stopped_status(pc_obj) # sub-contracting self.validate_for_subcontracting() self.create_raw_materials_supplied("pr_raw_material_details") self.set_landed_cost_voucher_amount() self.update_valuation_rate("purchase_receipt_details")
def validate(self): super(SalesOrder, 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 erpnext.stock.doctype.packed_item.packed_item import make_packing_list make_packing_list(self,'items') self.validate_with_previous_doc() if not self.status: self.status = "Draft" from erpnext.utilities import validate_status validate_status(self.status, ["Draft", "Submitted", "Stopped", "Cancelled"]) if not self.billing_status: self.billing_status = 'Not Billed' if not self.delivery_status: self.delivery_status = 'Not Delivered'
def validate(self): from erpnext.utilities import validate_status validate_status(self.status, ["Present", "Absent", "Half Day"]) self.validate_fiscal_year() self.validate_att_date() self.validate_duplicate_record() self.check_leave_record()
def validate(self): from erpnext.utilities import validate_status from erpnext.accounts.utils import validate_fiscal_year validate_status(self.status, ["Present", "Absent", "Half Day"]) validate_fiscal_year(self.att_date, self.fiscal_year, _("Attendance Date"), self) self.validate_att_date() self.validate_duplicate_record() self.check_leave_record()
def validate(self): from erpnext.utilities import validate_status validate_status(self.status, ["Active", "Left"]) self.employee = self.name self.validate_date() self.validate_email() self.validate_status() self.validate_employee_leave_approver() if self.user_id: self.validate_for_enabled_user_id() self.validate_duplicate_user_id()
def validate(self): super(SupplierQuotation, self).validate() if not self.status: self.status = "Draft" from erpnext.utilities import validate_status validate_status(self.status, ["Draft", "Submitted", "Stopped", "Cancelled"]) self.validate_common() self.validate_with_previous_doc() self.validate_uom_is_integer("uom", "qty")
def validate(self): if self.docstatus == 0: self.status = "Draft" from erpnext.utilities import validate_status validate_status(self.status, ["Draft", "Submitted", "Stopped", "In Process", "Completed", "Cancelled"]) self.validate_bom_no() self.validate_sales_order() self.validate_warehouse() from erpnext.utilities.transaction_base import validate_uom_is_integer validate_uom_is_integer(self, "stock_uom", ["qty", "produced_qty"])
def validate(self): if self.docstatus == 0: self.status = "Draft" from erpnext.utilities import validate_status validate_status(self.status, [ "Draft", "Submitted", "Stopped", "In Process", "Completed", "Cancelled" ]) self.validate_bom_no() self.validate_sales_order() self.validate_warehouse() from erpnext.utilities.transaction_base import validate_uom_is_integer validate_uom_is_integer(self, "stock_uom", ["qty", "produced_qty"])
def validate(self): super(MaterialRequest, self).validate() self.validate_schedule_date() self.validate_uom_is_integer("uom", "qty") if not self.status: self.status = "Draft" from erpnext.utilities import validate_status validate_status(self.status, ["Draft", "Submitted", "Stopped", "Cancelled"]) self.validate_value("material_request_type", "in", ["Purchase", "Transfer"]) pc_obj = frappe.get_doc('Purchase Common') pc_obj.validate_for_items(self)
def validate(self): super(DocType, self).validate() from erpnext.utilities import validate_status validate_status(self.doc.status, ["Draft", "Submitted", "Cancelled"]) self.so_required() self.validate_proj_cust() self.check_stop_sales_order("against_sales_order") self.validate_for_items() self.validate_warehouse() self.validate_uom_is_integer("stock_uom", "qty") self.update_current_stock() self.validate_with_previous_doc() from erpnext.stock.doctype.packed_item.packed_item import make_packing_list self.doclist = make_packing_list(self, 'delivery_note_details') self.doc.status = 'Draft' if not self.doc.installation_status: self.doc.installation_status = 'Not Installed'
def validate(self): super(PurchaseOrder, self).validate() if not self.status: self.status = "Draft" from erpnext.utilities import validate_status validate_status(self.status, ["Draft", "Submitted", "Stopped", "Cancelled"]) pc_obj = frappe.get_doc('Purchase Common') pc_obj.validate_for_items(self) self.check_for_stopped_status(pc_obj) self.validate_uom_is_integer("uom", "qty") self.validate_uom_is_integer("stock_uom", ["qty", "required_qty"]) self.validate_with_previous_doc() self.validate_for_subcontracting() self.update_raw_materials_supplied("po_raw_material_details")
def validate(self): super(PurchaseOrder, self).validate() if not self.status: self.status = "Draft" from erpnext.utilities import validate_status validate_status(self.status, ["Draft", "Submitted", "Stopped", "Cancelled"]) pc_obj = frappe.get_doc('Purchase Common') pc_obj.validate_for_items(self) self.check_for_stopped_status(pc_obj) self.validate_uom_is_integer("uom", "qty") self.validate_uom_is_integer("stock_uom", ["qty", "required_qty"]) self.validate_with_previous_doc() self.validate_for_subcontracting() self.create_raw_materials_supplied("po_raw_material_details")