mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-28 09:24:45 +00:00
Fixed validation for numeric variants to check with values from template instead of master
This commit is contained in:
@@ -513,8 +513,9 @@ def validate_item_variant_attributes(item, args):
|
|||||||
filters={"parent": ["in", args.keys()]}):
|
filters={"parent": ["in", args.keys()]}):
|
||||||
(attribute_values.setdefault(t.parent, [])).append(t.attribute_value)
|
(attribute_values.setdefault(t.parent, [])).append(t.attribute_value)
|
||||||
|
|
||||||
numeric_attributes = frappe._dict((t.name, t) for t in frappe.get_list("Item Attribute", filters={"numeric_values":1,
|
numeric_attributes = frappe._dict((t.attribute, t) for t in \
|
||||||
"name": ["in", args.keys()]}, fields=["name", "from_range", "to_range", "increment"]))
|
frappe.db.sql("""select attribute, from_range, to_range, increment from `tabItem Variant Attribute`
|
||||||
|
where parent = %s and numeric_values=1""", (item), as_dict=1))
|
||||||
|
|
||||||
for attribute, value in args.items():
|
for attribute, value in args.items():
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user