fix: added default kanban rows for lead/deal/task

This commit is contained in:
Shariq Ansari 2024-06-21 15:33:52 +05:30
parent c776951a63
commit 24339023ba
3 changed files with 41 additions and 0 deletions

View File

@ -189,6 +189,20 @@ class CRMDeal(Document):
"_assign",
]
return {'columns': columns, 'rows': rows}
@staticmethod
def default_kanban_data():
rows = [
"name",
"lead_name",
"organization",
"annual_revenue",
"email",
"mobile_no",
"deal_owner",
"modified",
]
return {'rows': rows}
@frappe.whitelist()
def add_contact(deal, contact):

View File

@ -324,6 +324,20 @@ class CRMLead(Document):
]
return {'columns': columns, 'rows': rows}
@staticmethod
def default_kanban_data():
rows = [
"name",
"lead_name",
"organization",
"email",
"mobile_no",
"lead_owner",
"modified",
"image",
]
return {'rows': rows}
@frappe.whitelist()
def convert_to_deal(lead, doc=None):
if not (doc and doc.flags.get("ignore_permissions")) and not frappe.has_permission("CRM Lead", "write", lead):

View File

@ -60,3 +60,16 @@ class CRMTask(Document):
"modified",
]
return {'columns': columns, 'rows': rows}
@staticmethod
def default_kanban_data():
rows = [
"name",
"title",
"description",
"assigned_to",
"due_date",
"priority",
"modified",
]
return {'rows': rows}