OptInManagementProd/optmanagementprod/www/optanalystview.py

25 lines
842 B
Python

import frappe
@frappe.whitelist(allow_guest=True)
def fetch_data():
records = frappe.get_list('optlistprod',
filters=None,
limit_page_length=20)
return [{
"kol_id" : str(client["kol_id"]),
"kol_name" : str(client["kol_name"]),
"project_name" : str(client["project_name"]),
"client_name" : str(client["client_name"]),
"client_poc" : str(client["client_poc"]),
"optin_received_date" : str(client["optin_received_date"]),
"optin_approved_date" : str(client["optin_approved_date"]),
"status" : str(client["status"]),
"instance" : str(client["instance"]),
"npi_id": str(client["npi_id"]),
"country" : str(client["country"]),
"data_processed_date" : str(client["data_processed_date"]),
"user_name": str(client["user_name"]),
}
for client in records]