mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user