diff --git a/crm/api/doc.py b/crm/api/doc.py index dbadf320..335c511c 100644 --- a/crm/api/doc.py +++ b/crm/api/doc.py @@ -125,7 +125,6 @@ def get_list_data(doctype: str, filters: dict, order_by: str): } -@frappe.whitelist() def get_doctype_fields(doctype): not_allowed_fieldtypes = [ "Section Break", diff --git a/crm/fcrm/doctype/crm_deal/api.py b/crm/fcrm/doctype/crm_deal/api.py index a995e65a..5e1e562e 100644 --- a/crm/fcrm/doctype/crm_deal/api.py +++ b/crm/fcrm/doctype/crm_deal/api.py @@ -1,6 +1,7 @@ import frappe from frappe import _ +from crm.api.doc import get_doctype_fields @frappe.whitelist() def get_deal(name): @@ -25,4 +26,5 @@ def get_deal(name): fields=["contact", "is_primary"], ) + deal["doctype_fields"] = get_doctype_fields("CRM Deal") return deal diff --git a/crm/fcrm/doctype/crm_lead/api.py b/crm/fcrm/doctype/crm_lead/api.py index f51be6fa..26c58cff 100644 --- a/crm/fcrm/doctype/crm_lead/api.py +++ b/crm/fcrm/doctype/crm_lead/api.py @@ -1,6 +1,7 @@ import frappe from frappe import _ +from crm.api.doc import get_doctype_fields @frappe.whitelist() def get_lead(name): @@ -13,4 +14,5 @@ def get_lead(name): frappe.throw(_("Lead not found"), frappe.DoesNotExistError) lead = lead.pop() + lead["doctype_fields"] = get_doctype_fields("CRM Lead") return lead \ No newline at end of file diff --git a/frontend/src/pages/Deal.vue b/frontend/src/pages/Deal.vue index 34e89ba9..ff4b9aed 100644 --- a/frontend/src/pages/Deal.vue +++ b/frontend/src/pages/Deal.vue @@ -131,13 +131,16 @@ v-model="deal.data" @updateField="updateField" /> -
+