23 lines
706 B
Python
23 lines
706 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" : "empty" if not str(client["optin_approved_date"]) else str(client["optin_approved_date"]),
|
|
"status" : str(client["status"]),
|
|
"instance" : str(client["instance"]),
|
|
|
|
|
|
}
|
|
for client in records]
|