Skip to content

Commit

Permalink
feat: add sender_name_field
Browse files Browse the repository at this point in the history
(cherry picked from commit 35d6e70)

# Conflicts:
#	frappe/core/doctype/doctype/doctype.json
#	frappe/core/doctype/doctype/doctype.py
#	frappe/custom/doctype/customize_form/customize_form.json
#	frappe/custom/doctype/customize_form/customize_form.py
  • Loading branch information
barredterra authored and mergify[bot] committed Dec 4, 2023
1 parent ae9455e commit eec8e1e
Show file tree
Hide file tree
Showing 4 changed files with 233 additions and 2 deletions.
44 changes: 43 additions & 1 deletion frappe/core/doctype/doctype/doctype.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"column_break_51",
"email_append_to",
"sender_field",
"sender_name_field",
"subject_field",
"sb2",
"permissions",
Expand Down Expand Up @@ -529,7 +530,7 @@
"depends_on": "email_append_to",
"fieldname": "sender_field",
"fieldtype": "Data",
"label": "Sender Field",
"label": "Sender Email Field",
"mandatory_depends_on": "email_append_to"
},
{
Expand Down Expand Up @@ -633,6 +634,43 @@
"fieldname": "is_calendar_and_gantt",
"fieldtype": "Check",
"label": "Is Calendar and Gantt"
<<<<<<< HEAD
=======
},
{
"fieldname": "settings_tab",
"fieldtype": "Tab Break",
"label": "Settings"
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "form_builder_tab",
"fieldtype": "Tab Break",
"label": "Form"
},
{
"fieldname": "form_builder",
"fieldtype": "HTML",
"label": "Form Builder"
},
{
"collapsible": 1,
"fieldname": "fields_section",
"fieldtype": "Section Break",
"label": "Fields"
},
{
"fieldname": "connections_tab",
"fieldtype": "Tab Break",
"label": "Connections",
"show_dashboard": 1
},
{
"depends_on": "email_append_to",
"fieldname": "sender_name_field",
"fieldtype": "Data",
"label": "Sender Name Field"
>>>>>>> 35d6e70382 (feat: add sender_name_field)
}
],
"icon": "fa fa-bolt",
Expand Down Expand Up @@ -715,7 +753,11 @@
"link_fieldname": "reference_doctype"
}
],
<<<<<<< HEAD
"modified": "2023-08-14 17:32:23.824794",
=======
"modified": "2023-12-01 18:37:16.799471",
>>>>>>> 35d6e70382 (feat: add sender_name_field)
"modified_by": "Administrator",
"module": "Core",
"name": "DocType",
Expand Down
91 changes: 91 additions & 0 deletions frappe/core/doctype/doctype/doctype.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,97 @@ class DocType(Document):
def get_feed(self):
return self.name

<<<<<<< HEAD
=======
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from frappe.core.doctype.docfield.docfield import DocField
from frappe.core.doctype.docperm.docperm import DocPerm
from frappe.core.doctype.doctype_action.doctype_action import DocTypeAction
from frappe.core.doctype.doctype_link.doctype_link import DocTypeLink
from frappe.core.doctype.doctype_state.doctype_state import DocTypeState
from frappe.types import DF

actions: DF.Table[DocTypeAction]
allow_auto_repeat: DF.Check
allow_copy: DF.Check
allow_events_in_timeline: DF.Check
allow_guest_to_view: DF.Check
allow_import: DF.Check
allow_rename: DF.Check
autoname: DF.Data | None
beta: DF.Check
color: DF.Data | None
custom: DF.Check
default_email_template: DF.Link | None
default_print_format: DF.Data | None
default_view: DF.Literal
description: DF.SmallText | None
document_type: DF.Literal["", "Document", "Setup", "System", "Other"]
documentation: DF.Data | None
editable_grid: DF.Check
email_append_to: DF.Check
engine: DF.Literal["InnoDB", "MyISAM"]
fields: DF.Table[DocField]
force_re_route_to_default_view: DF.Check
has_web_view: DF.Check
hide_toolbar: DF.Check
icon: DF.Data | None
image_field: DF.Data | None
in_create: DF.Check
index_web_pages_for_search: DF.Check
is_calendar_and_gantt: DF.Check
is_published_field: DF.Data | None
is_submittable: DF.Check
is_tree: DF.Check
is_virtual: DF.Check
issingle: DF.Check
istable: DF.Check
link_filters: DF.JSON
links: DF.Table[DocTypeLink]
make_attachments_public: DF.Check
max_attachments: DF.Int
migration_hash: DF.Data | None
module: DF.Link
naming_rule: DF.Literal[
"",
"Set by user",
"Autoincrement",
"By fieldname",
'By "Naming Series" field',
"Expression",
"Expression (old style)",
"Random",
"By script",
]
nsm_parent_field: DF.Data | None
permissions: DF.Table[DocPerm]
queue_in_background: DF.Check
quick_entry: DF.Check
read_only: DF.Check
restrict_to_domain: DF.Link | None
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
sort_field: DF.Data | None
sort_order: DF.Literal["ASC", "DESC"]
states: DF.Table[DocTypeState]
subject_field: DF.Data | None
timeline_field: DF.Data | None
title_field: DF.Data | None
track_changes: DF.Check
track_seen: DF.Check
track_views: DF.Check
translated_doctype: DF.Check
website_search_field: DF.Data | None
# end: auto-generated types

>>>>>>> 35d6e70382 (feat: add sender_name_field)
def validate(self):
"""Validate DocType before saving.
Expand Down
37 changes: 36 additions & 1 deletion frappe/custom/doctype/customize_form/customize_form.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"column_break_26",
"email_append_to",
"sender_field",
"sender_name_field",
"subject_field",
"document_actions_section",
"actions",
Expand Down Expand Up @@ -214,7 +215,7 @@
"depends_on": "email_append_to",
"fieldname": "sender_field",
"fieldtype": "Data",
"label": "Sender Field",
"label": "Sender Email Field",
"mandatory_depends_on": "email_append_to"
},
{
Expand Down Expand Up @@ -359,6 +360,36 @@
"fieldname": "is_calendar_and_gantt",
"fieldtype": "Check",
"label": "Is Calendar and Gantt"
<<<<<<< HEAD
=======
},
{
"fieldname": "form_builder",
"fieldtype": "HTML",
"label": "Form Builder"
},
{
"fieldname": "form_tab",
"fieldtype": "Tab Break",
"label": "Form"
},
{
"fieldname": "link_filters",
"fieldtype": "JSON",
"hidden": 1,
"label": "Link Filters"
},
{
"fieldname": "details_tab",
"fieldtype": "Tab Break",
"label": "Details"
},
{
"depends_on": "email_append_to",
"fieldname": "sender_name_field",
"fieldtype": "Data",
"label": "Sender Name Field"
>>>>>>> 35d6e70382 (feat: add sender_name_field)
}
],
"hide_toolbar": 1,
Expand All @@ -367,7 +398,11 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
<<<<<<< HEAD
"modified": "2022-08-30 11:45:16.772277",
=======
"modified": "2023-12-01 18:18:23.086134",
>>>>>>> 35d6e70382 (feat: add sender_name_field)
"modified_by": "Administrator",
"module": "Custom",
"name": "Customize Form",
Expand Down
63 changes: 63 additions & 0 deletions frappe/custom/doctype/customize_form/customize_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,69 @@


class CustomizeForm(Document):
<<<<<<< HEAD
=======
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from frappe.core.doctype.doctype_action.doctype_action import DocTypeAction
from frappe.core.doctype.doctype_link.doctype_link import DocTypeLink
from frappe.core.doctype.doctype_state.doctype_state import DocTypeState
from frappe.custom.doctype.customize_form_field.customize_form_field import CustomizeFormField
from frappe.types import DF

actions: DF.Table[DocTypeAction]
allow_auto_repeat: DF.Check
allow_copy: DF.Check
allow_import: DF.Check
autoname: DF.Data | None
default_email_template: DF.Link | None
default_print_format: DF.Link | None
default_view: DF.Literal
doc_type: DF.Link | None
editable_grid: DF.Check
email_append_to: DF.Check
fields: DF.Table[CustomizeFormField]
force_re_route_to_default_view: DF.Check
image_field: DF.Data | None
is_calendar_and_gantt: DF.Check
istable: DF.Check
label: DF.Data | None
link_filters: DF.JSON | None
links: DF.Table[DocTypeLink]
make_attachments_public: DF.Check
max_attachments: DF.Int
naming_rule: DF.Literal[
"",
"Set by user",
"By fieldname",
'By "Naming Series" field',
"Expression",
"Expression (old style)",
"Random",
"By script",
]
queue_in_background: DF.Check
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
sort_order: DF.Literal["ASC", "DESC"]
states: DF.Table[DocTypeState]
subject_field: DF.Data | None
title_field: DF.Data | None
track_changes: DF.Check
track_views: DF.Check
translated_doctype: DF.Check
# end: auto-generated types

>>>>>>> 35d6e70382 (feat: add sender_name_field)
def on_update(self):
frappe.db.delete("Singles", {"doctype": "Customize Form"})
frappe.db.delete("Customize Form Field")
Expand Down

0 comments on commit eec8e1e

Please sign in to comment.