@frappe.whitelist()
def get_uom_details(item_code, uom, qty):
 conversion_factor = get_conversion_factor(item_code, uom).get(u'conversion_factor')
 if (not conversion_factor):
  frappe.msgprint(_(u'UOM coversion factor required for UOM: {0} in Item: {1}').format(uom, item_code))
  ret = {u'uom': u''}
 else:
  ret = {u'conversion_factor': flt(conversion_factor), u'transfer_qty': (flt(qty) * flt(conversion_factor))}
 return ret

@ frappe . whitelist ( ) def get_uom_details ( item_code , uom , qty ) : conversion_factor = get_conversion_factor ( item_code , uom ) . get ( u'conversion_factor' ) if ( not conversion_factor ) : frappe . msgprint ( _ ( u'UOM coversion factor required for UOM: {0} in Item: {1}' ) . format ( uom , item_code ) ) ret = { u'uom' : u'' } else : ret = { u'conversion_factor' : flt ( conversion_factor ) , u'transfer_qty' : ( flt ( qty ) * flt ( conversion_factor ) ) } return ret
returns dict {"conversion_factor": [value] .