diff --git a/buying/doctype/purchase_common/purchase_common.py b/buying/doctype/purchase_common/purchase_common.py index 700fd7a87b6..550fc9f3698 100644 --- a/buying/doctype/purchase_common/purchase_common.py +++ b/buying/doctype/purchase_common/purchase_common.py @@ -165,15 +165,6 @@ class DocType(BuyingController): d.purchase_ref_rate = d.purchase_rate = d.import_ref_rate \ = d.import_rate = item_last_purchase_rate - # validation - # ------------------------------------------------------------------------------------------------------- - - # validate fields - def validate_mandatory(self, obj): - # check amendment date - if obj.doc.amended_from and not obj.doc.amendment_date: - msgprint("Please enter amendment date") - raise Exception # validate for same items and validate is_stock_item , is_purchase_item also validate uom and conversion factor def validate_for_items(self, obj): @@ -480,4 +471,4 @@ def get_uom_details(args=None): return { "conversion_factor": conversion_factor, "qty": flt(args["stock_qty"]) / conversion_factor, - } \ No newline at end of file + } diff --git a/buying/doctype/purchase_order/purchase_order.py b/buying/doctype/purchase_order/purchase_order.py index 6cef02a20b2..ea57babcbc1 100644 --- a/buying/doctype/purchase_order/purchase_order.py +++ b/buying/doctype/purchase_order/purchase_order.py @@ -52,8 +52,6 @@ class DocType(BuyingController): # 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) diff --git a/buying/doctype/purchase_request/purchase_request.py b/buying/doctype/purchase_request/purchase_request.py index 9fc4dc8ea17..324200b2bcd 100644 --- a/buying/doctype/purchase_request/purchase_request.py +++ b/buying/doctype/purchase_request/purchase_request.py @@ -126,8 +126,6 @@ class DocType(BuyingController): # Get Purchase Common Obj pc_obj = get_obj(dt='Purchase Common') - # Validate Mandatory - pc_obj.validate_mandatory(self) # Validate for items pc_obj.validate_for_items(self) @@ -196,4 +194,4 @@ class DocType(BuyingController): self.update_bin(is_submit = 0, is_stopped = (cstr(self.doc.status) == 'Stopped') and 1 or 0) # Step 5:=> Set Status - webnotes.conn.set(self.doc,'status','Cancelled') \ No newline at end of file + webnotes.conn.set(self.doc,'status','Cancelled') diff --git a/buying/doctype/supplier_quotation/supplier_quotation.py b/buying/doctype/supplier_quotation/supplier_quotation.py index c8f528276e4..51a1e07a7fa 100644 --- a/buying/doctype/supplier_quotation/supplier_quotation.py +++ b/buying/doctype/supplier_quotation/supplier_quotation.py @@ -75,7 +75,6 @@ class DocType(BuyingController): def validate_common(self): pc = get_obj('Purchase Common') - pc.validate_mandatory(self) pc.validate_for_items(self) pc.get_prevdoc_date(self) - pc.validate_reference_value(self) \ No newline at end of file + pc.validate_reference_value(self) diff --git a/stock/doctype/purchase_receipt/purchase_receipt.py b/stock/doctype/purchase_receipt/purchase_receipt.py index 46484e042ee..83fa0b1e5c3 100644 --- a/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/stock/doctype/purchase_receipt/purchase_receipt.py @@ -130,7 +130,6 @@ class DocType(BuyingController): pc_obj = get_obj(dt='Purchase Common') pc_obj.validate_for_items(self) - pc_obj.validate_mandatory(self) pc_obj.get_prevdoc_date(self) pc_obj.validate_reference_value(self) self.check_for_stopped_status(pc_obj)