feat: add sender_name_field

This commit is contained in:
barredterra 2023-12-01 18:39:39 +01:00
parent 6f36c0fa0b
commit 35d6e70382
4 changed files with 22 additions and 4 deletions

View file

@ -68,6 +68,7 @@
"column_break_51",
"email_append_to",
"sender_field",
"sender_name_field",
"subject_field",
"sb2",
"permissions",
@ -520,7 +521,7 @@
"depends_on": "email_append_to",
"fieldname": "sender_field",
"fieldtype": "Data",
"label": "Sender Field",
"label": "Sender Email Field",
"mandatory_depends_on": "email_append_to"
},
{
@ -661,6 +662,12 @@
"fieldtype": "Tab Break",
"label": "Connections",
"show_dashboard": 1
},
{
"depends_on": "email_append_to",
"fieldname": "sender_name_field",
"fieldtype": "Data",
"label": "Sender Name Field"
}
],
"icon": "fa fa-bolt",
@ -743,7 +750,7 @@
"link_fieldname": "reference_doctype"
}
],
"modified": "2023-11-01 16:45:14.960949",
"modified": "2023-12-01 18:37:16.799471",
"modified_by": "Administrator",
"module": "Core",
"name": "DocType",

View file

@ -162,6 +162,7 @@ class DocType(Document):
route: DF.Data | None
search_fields: DF.Data | None
sender_field: DF.Data | None
sender_name_field: DF.Data | None
show_name_in_global_search: DF.Check
show_preview_popup: DF.Check
show_title_field_in_link: DF.Check
@ -177,6 +178,7 @@ class DocType(Document):
translated_doctype: DF.Check
website_search_field: DF.Data | None
# end: auto-generated types
def validate(self):
"""Validate DocType before saving.

View file

@ -46,6 +46,7 @@
"column_break_26",
"email_append_to",
"sender_field",
"sender_name_field",
"subject_field",
"section_break_8",
"sort_field",
@ -219,7 +220,7 @@
"depends_on": "email_append_to",
"fieldname": "sender_field",
"fieldtype": "Data",
"label": "Sender Field",
"label": "Sender Email Field",
"mandatory_depends_on": "email_append_to"
},
{
@ -392,6 +393,12 @@
"fieldname": "details_tab",
"fieldtype": "Tab Break",
"label": "Details"
},
{
"depends_on": "email_append_to",
"fieldname": "sender_name_field",
"fieldtype": "Data",
"label": "Sender Name Field"
}
],
"hide_toolbar": 1,
@ -400,7 +407,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2023-11-16 11:23:06.427432",
"modified": "2023-12-01 18:18:23.086134",
"modified_by": "Administrator",
"module": "Custom",
"name": "Customize Form",

View file

@ -72,6 +72,7 @@ class CustomizeForm(Document):
quick_entry: DF.Check
search_fields: DF.Data | None
sender_field: DF.Data | None
sender_name_field: DF.Data | None
show_preview_popup: DF.Check
show_title_field_in_link: DF.Check
sort_field: DF.Literal
@ -83,6 +84,7 @@ class CustomizeForm(Document):
track_views: DF.Check
translated_doctype: DF.Check
# end: auto-generated types
def on_update(self):
frappe.db.delete("Singles", {"doctype": "Customize Form"})
frappe.db.delete("Customize Form Field")