fix: integer UOM check in transactions (#20176)
This commit is contained in:
parent
ef0d26c161
commit
7c8aaba449
@ -164,8 +164,8 @@ def validate_uom_is_integer(doc, uom_field, qty_fields, child_dt=None):
|
|||||||
qty_fields = [qty_fields]
|
qty_fields = [qty_fields]
|
||||||
|
|
||||||
distinct_uoms = list(set([d.get(uom_field) for d in doc.get_all_children()]))
|
distinct_uoms = list(set([d.get(uom_field) for d in doc.get_all_children()]))
|
||||||
integer_uoms = filter(lambda uom: frappe.db.get_value("UOM", uom,
|
integer_uoms = list(filter(lambda uom: frappe.db.get_value("UOM", uom,
|
||||||
"must_be_whole_number", cache=True) or None, distinct_uoms)
|
"must_be_whole_number", cache=True) or None, distinct_uoms))
|
||||||
|
|
||||||
if not integer_uoms:
|
if not integer_uoms:
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user