removed amendment_date mandatory validation from purchase cucle

This commit is contained in:
Rushabh Mehta 2013-01-23 09:17:51 +01:00
parent b7f13118d3
commit 5842ee0918
5 changed files with 3 additions and 18 deletions

View File

@ -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,
}
}

View File

@ -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)

View File

@ -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')
webnotes.conn.set(self.doc,'status','Cancelled')

View File

@ -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)
pc.validate_reference_value(self)

View File

@ -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)