Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Anand Doshi
2013-07-26 11:34:38 +05:30
22 changed files with 31 additions and 501 deletions

View File

@@ -502,6 +502,8 @@ def delete_events(ref_type, ref_name):
webnotes.delete_doc("Event", webnotes.conn.sql_list("""select name from `tabEvent`
where ref_type=%s and ref_name=%s""", (ref_type, ref_name)), for_reload=True)
class UOMMustBeIntegerError(webnotes.ValidationError): pass
def validate_uom_is_integer(doclist, uom_field, qty_fields):
if isinstance(qty_fields, basestring):
qty_fields = [qty_fields]
@@ -520,4 +522,4 @@ def validate_uom_is_integer(doclist, uom_field, qty_fields):
webnotes.msgprint(_("For UOM") + " '" + d.fields[uom_field] \
+ "': " + _("Quantity cannot be a fraction.") \
+ " " + _("In Row") + ": " + str(d.idx),
raise_exception=True)
raise_exception=UOMMustBeIntegerError)