Merge pull request #4136 from nabinhait/uom
[fix] Fetch UOM Conversion Factor from template if not specified in variants
This commit is contained in:
commit
714948c867
@ -346,8 +346,7 @@ def get_conversion_factor(item_code, uom):
|
|||||||
variant_of = frappe.db.get_value("Item", item_code, "variant_of")
|
variant_of = frappe.db.get_value("Item", item_code, "variant_of")
|
||||||
filters = {"parent": item_code, "uom": uom}
|
filters = {"parent": item_code, "uom": uom}
|
||||||
if variant_of:
|
if variant_of:
|
||||||
filters = {"parent": ("in", (item_code, variant_of))}
|
filters["parent"] = ("in", (item_code, variant_of))
|
||||||
|
|
||||||
return {"conversion_factor": frappe.db.get_value("UOM Conversion Detail",
|
return {"conversion_factor": frappe.db.get_value("UOM Conversion Detail",
|
||||||
filters, "conversion_factor")}
|
filters, "conversion_factor")}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user