frappe/frappe#478, removed instances of .fields

This commit is contained in:
Rushabh Mehta
2014-03-31 23:37:40 +05:30
parent 231f6a5b58
commit f2227d033c
32 changed files with 61 additions and 63 deletions

View File

@@ -110,8 +110,8 @@ def validate_uom_is_integer(doclist, uom_field, qty_fields):
if d.get(uom_field) in integer_uoms:
for f in qty_fields:
if d.get(f):
if cint(d.fields[f])!=d.fields[f]:
frappe.msgprint(_("For UOM") + " '" + d.fields[uom_field] \
if cint(d.get(f))!=d.get(f):
frappe.msgprint(_("For UOM") + " '" + d.get(uom_field) \
+ "': " + _("Quantity cannot be a fraction.") \
+ " " + _("In Row") + ": " + str(d.idx),
raise_exception=UOMMustBeIntegerError)