Sometimes it works, sometimes it doesn’t, and I occasionally encounter a blank screen or errors.
it happened always when i am working in app.py file here i am working in app_report.py
import frappe
def execute(filters=None):
frappe.clear_cache()
columns, data = get_columns(), get_data(filters)
return columns, data
def get_data(filters):
query = “”"
SELECT
name,select_department,emp_name,
stage_1_emp_status, stage_2_emp_status,
stage_3_emp_status, stage_4_emp_status,
stage_5_emp_status, stage_6_emp_status,
stage_7_emp_status
FROM
tabAsset Request
“”"
data = frappe.db.sql(query)
return data
def get_columns():
return [
(“ID”) + “:Link/Asset Request:100”,
(“Department”) + “:Data:100”,
(“Employee”) + “:Data:100”,
(“Reporting Person Status”) + “:Data:100”,
(“HOD Status”) + “:Data:100”,
(“GM Status”) + “:Data:100”,
(“CFO Status”) + “:Data:100”,
(“CEO Status”) + “:Data:100”,
(“CTO Status”) + “:Data:100”,
(“Store Status”) + “:Data:100”,
]
After Refresh