Merge pull request #232 from frappe/develop
chore: Merge develop to main
This commit is contained in:
commit
abd4e9abe0
@ -110,7 +110,7 @@ def add_default_communication_statuses():
|
|||||||
doc.insert()
|
doc.insert()
|
||||||
|
|
||||||
def add_default_fields_layout():
|
def add_default_fields_layout():
|
||||||
layouts = {
|
quick_entry_layouts = {
|
||||||
"CRM Lead-Quick Entry": {
|
"CRM Lead-Quick Entry": {
|
||||||
"doctype": "CRM Lead",
|
"doctype": "CRM Lead",
|
||||||
"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}]'
|
"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():
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for layout in layouts:
|
sidebar_fields_layouts = {
|
||||||
|
"CRM Lead-Side Panel": {
|
||||||
|
"doctype": "CRM Lead",
|
||||||
|
"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"]}]'
|
||||||
|
},
|
||||||
|
"CRM Deal-Side Panel": {
|
||||||
|
"doctype": "CRM Deal",
|
||||||
|
"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"]}]'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for layout in quick_entry_layouts:
|
||||||
if frappe.db.exists("CRM Fields Layout", layout):
|
if frappe.db.exists("CRM Fields Layout", layout):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
doc = frappe.new_doc("CRM Fields Layout")
|
doc = frappe.new_doc("CRM Fields Layout")
|
||||||
doc.type = "Quick Entry"
|
doc.type = "Quick Entry"
|
||||||
doc.dt = layouts[layout]["doctype"]
|
doc.dt = quick_entry_layouts[layout]["doctype"]
|
||||||
doc.layout = layouts[layout]["layout"]
|
doc.layout = quick_entry_layouts[layout]["layout"]
|
||||||
|
doc.insert()
|
||||||
|
|
||||||
|
for layout in sidebar_fields_layouts:
|
||||||
|
if frappe.db.exists("CRM Fields Layout", layout):
|
||||||
|
continue
|
||||||
|
|
||||||
|
doc = frappe.new_doc("CRM Fields Layout")
|
||||||
|
doc.type = "Side Panel"
|
||||||
|
doc.dt = sidebar_fields_layouts[layout]["doctype"]
|
||||||
|
doc.layout = sidebar_fields_layouts[layout]["layout"]
|
||||||
doc.insert()
|
doc.insert()
|
||||||
|
|
||||||
def add_property_setter():
|
def add_property_setter():
|
||||||
|
|||||||
@ -72,6 +72,7 @@ const sections = computed(() => {
|
|||||||
if (fieldsData[0].type !== 'Section Break') {
|
if (fieldsData[0].type !== 'Section Break') {
|
||||||
_sections.push({
|
_sections.push({
|
||||||
label: 'General',
|
label: 'General',
|
||||||
|
hideLabel: true,
|
||||||
columns: 1,
|
columns: 1,
|
||||||
fields: [],
|
fields: [],
|
||||||
})
|
})
|
||||||
@ -80,6 +81,7 @@ const sections = computed(() => {
|
|||||||
if (field.type === 'Section Break') {
|
if (field.type === 'Section Break') {
|
||||||
_sections.push({
|
_sections.push({
|
||||||
label: field.value,
|
label: field.value,
|
||||||
|
hideLabel: true,
|
||||||
columns: 1,
|
columns: 1,
|
||||||
fields: [],
|
fields: [],
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user