mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 09:54:47 +00:00
[fix] Fetch UOM Conversion Factor from template if not specified in variants
This commit is contained in:
@@ -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")}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user