fix: added default columns in listview
This commit is contained in:
parent
1ed93a5a81
commit
b261506559
@ -118,7 +118,8 @@ before_uninstall = "crm.uninstall.before_uninstall"
|
||||
# Override standard doctype classes
|
||||
|
||||
override_doctype_class = {
|
||||
"Contact": "crm.overrides.contact.CustomContact"
|
||||
"Contact": "crm.overrides.contact.CustomContact",
|
||||
"Email Template": "crm.overrides.email_template.CustomEmailTemplate",
|
||||
}
|
||||
|
||||
# Document Events
|
||||
|
||||
48
crm/overrides/email_template.py
Normal file
48
crm/overrides/email_template.py
Normal file
@ -0,0 +1,48 @@
|
||||
# import frappe
|
||||
from frappe import _
|
||||
from frappe.email.doctype.email_template.email_template import EmailTemplate
|
||||
|
||||
|
||||
class CustomEmailTemplate(EmailTemplate):
|
||||
@staticmethod
|
||||
def default_list_data():
|
||||
columns = [
|
||||
{
|
||||
'label': 'Name',
|
||||
'type': 'Data',
|
||||
'key': 'name',
|
||||
'width': '17rem',
|
||||
},
|
||||
{
|
||||
'label': 'Subject',
|
||||
'type': 'Data',
|
||||
'key': 'subject',
|
||||
'width': '12rem',
|
||||
},
|
||||
{
|
||||
'label': 'Enabled',
|
||||
'type': 'Check',
|
||||
'key': 'enabled',
|
||||
'width': '6rem',
|
||||
},
|
||||
{
|
||||
'label': 'Doctype',
|
||||
'type': 'Link',
|
||||
'key': 'reference_doctype',
|
||||
'width': '12rem',
|
||||
},
|
||||
{
|
||||
'label': 'Last Modified',
|
||||
'type': 'Datetime',
|
||||
'key': 'modified',
|
||||
'width': '8rem',
|
||||
},
|
||||
]
|
||||
rows = [
|
||||
"name",
|
||||
"enabled",
|
||||
"reference_doctype",
|
||||
"subject",
|
||||
"modified",
|
||||
]
|
||||
return {'columns': columns, 'rows': rows}
|
||||
Loading…
x
Reference in New Issue
Block a user