Skip to content

Commit abd4e9a

Browse files
authored
Merge pull request #232 from frappe/develop
chore: Merge develop to main
2 parents d3aba68 + 2756530 commit abd4e9a

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

crm/install.py

+25-4
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def add_default_communication_statuses():
110110
doc.insert()
111111

112112
def add_default_fields_layout():
113-
layouts = {
113+
quick_entry_layouts = {
114114
"CRM Lead-Quick Entry": {
115115
"doctype": "CRM Lead",
116116
"layout": '[{"label":"Person","fields":["salutation","first_name","last_name","email","mobile_no", "gender"],"hideLabel":true},{"label":"Organization","fields":["organization","website","no_of_employees","territory","annual_revenue","industry"],"hideLabel":true,"hideBorder":false},{"label":"Other","columns":2,"fields":["status","lead_owner"],"hideLabel":true,"hideBorder":false}]'
@@ -129,14 +129,35 @@ def add_default_fields_layout():
129129
},
130130
}
131131

132-
for layout in layouts:
132+
sidebar_fields_layouts = {
133+
"CRM Lead-Side Panel": {
134+
"doctype": "CRM Lead",
135+
"layout": '[{"label": "Details", "name": "details", "opened": true, "fields": ["organization", "website", "territory", "industry", "job_title", "source", "lead_owner"]}, {"label": "Person", "name": "person_tab", "opened": true, "fields": ["salutation", "first_name", "last_name", "email", "mobile_no"]}]'
136+
},
137+
"CRM Deal-Side Panel": {
138+
"doctype": "CRM Deal",
139+
"layout": '[{"label":"Contacts","name":"contacts_section","opened":true,"editable":false,"contacts":[]},{"label":"Organization Details","name":"organization_tab","opened":true,"fields":["organization","website","territory","annual_revenue","close_date","probability","next_step","deal_owner"]}]'
140+
},
141+
}
142+
143+
for layout in quick_entry_layouts:
133144
if frappe.db.exists("CRM Fields Layout", layout):
134145
continue
135146

136147
doc = frappe.new_doc("CRM Fields Layout")
137148
doc.type = "Quick Entry"
138-
doc.dt = layouts[layout]["doctype"]
139-
doc.layout = layouts[layout]["layout"]
149+
doc.dt = quick_entry_layouts[layout]["doctype"]
150+
doc.layout = quick_entry_layouts[layout]["layout"]
151+
doc.insert()
152+
153+
for layout in sidebar_fields_layouts:
154+
if frappe.db.exists("CRM Fields Layout", layout):
155+
continue
156+
157+
doc = frappe.new_doc("CRM Fields Layout")
158+
doc.type = "Side Panel"
159+
doc.dt = sidebar_fields_layouts[layout]["doctype"]
160+
doc.layout = sidebar_fields_layouts[layout]["layout"]
140161
doc.insert()
141162

142163
def add_property_setter():

frontend/src/components/Settings/SettingsPage.vue

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const sections = computed(() => {
7272
if (fieldsData[0].type !== 'Section Break') {
7373
_sections.push({
7474
label: 'General',
75+
hideLabel: true,
7576
columns: 1,
7677
fields: [],
7778
})
@@ -80,6 +81,7 @@ const sections = computed(() => {
8081
if (field.type === 'Section Break') {
8182
_sections.push({
8283
label: field.value,
84+
hideLabel: true,
8385
columns: 1,
8486
fields: [],
8587
})

0 commit comments

Comments
 (0)