diff --git a/crm/api/doc.py b/crm/api/doc.py index a704bb94..9795246c 100644 --- a/crm/api/doc.py +++ b/crm/api/doc.py @@ -188,11 +188,16 @@ def get_doctype_fields(doctype): else: section_fields.append(get_field_obj(field)) - all_fields = [] + section_fields = [] for section in sections: - all_fields.append(sections[section]) + section_fields.append(sections[section]) - return all_fields + fields = [field for field in fields if field.fieldtype not in "Tab Break"] + fields_meta = {} + for field in fields: + fields_meta[field.fieldname] = field + + return section_fields, fields_meta def get_field_obj(field): diff --git a/crm/fcrm/doctype/crm_deal/api.py b/crm/fcrm/doctype/crm_deal/api.py index e37ca74d..2ab69e14 100644 --- a/crm/fcrm/doctype/crm_deal/api.py +++ b/crm/fcrm/doctype/crm_deal/api.py @@ -27,7 +27,7 @@ def get_deal(name): fields=["contact", "is_primary"], ) - deal["doctype_fields"] = get_doctype_fields("CRM Deal") + deal["doctype_fields"], deal["all_fields"] = get_doctype_fields("CRM Deal") deal["doctype"] = "CRM Deal" deal["_form_script"] = get_form_script('CRM Deal') return deal diff --git a/frontend/src/components/SectionFields.vue b/frontend/src/components/SectionFields.vue index 6932b3aa..c6d504c2 100644 --- a/frontend/src/components/SectionFields.vue +++ b/frontend/src/components/SectionFields.vue @@ -8,6 +8,7 @@ >