Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/buying/doctype/purchase_common/purchase_common.py b/buying/doctype/purchase_common/purchase_common.py
index 700fd7a..550fc9f 100644
--- a/buying/doctype/purchase_common/purchase_common.py
+++ b/buying/doctype/purchase_common/purchase_common.py
@@ -165,15 +165,6 @@
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 @@
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 6cef02a..ea57bab 100644
--- a/buying/doctype/purchase_order/purchase_order.py
+++ b/buying/doctype/purchase_order/purchase_order.py
@@ -52,8 +52,6 @@
# 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 9fc4dc8..324200b 100644
--- a/buying/doctype/purchase_request/purchase_request.py
+++ b/buying/doctype/purchase_request/purchase_request.py
@@ -126,8 +126,6 @@
# 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 @@
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 c8f5282..51a1e07 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation.py
+++ b/buying/doctype/supplier_quotation/supplier_quotation.py
@@ -75,7 +75,6 @@
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 5bc0776..600be7f 100644
--- a/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -130,7 +130,6 @@
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)