Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
仰若水
frappe
Commits
f2bc961e
Commit
f2bc961e
authored
8 years ago
by
Nabin Hait
Browse files
Options
Download
Plain Diff
Fixed merge conflict
parents
4b231108
26507591
Changes
484
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
frappe/__init__.py
+36
-30
frappe/__init__.py
frappe/api.py
+2
-1
frappe/api.py
frappe/async.py
+3
-2
frappe/async.py
frappe/change_log/v7/v7_2_0.md
+18
-0
frappe/change_log/v7/v7_2_0.md
frappe/client.py
+71
-0
frappe/client.py
frappe/commands/scheduler.py
+1
-1
frappe/commands/scheduler.py
frappe/config/docs.py
+11
-3
frappe/config/docs.py
frappe/config/setup.py
+24
-18
frappe/config/setup.py
frappe/config/website.py
+17
-3
frappe/config/website.py
frappe/core/doctype/communication/communication.json
+1153
-983
frappe/core/doctype/communication/communication.json
frappe/core/doctype/communication/communication.py
+1
-0
frappe/core/doctype/communication/communication.py
frappe/core/doctype/communication/email.py
+40
-7
frappe/core/doctype/communication/email.py
frappe/core/doctype/docfield/docfield.json
+68
-2
frappe/core/doctype/docfield/docfield.json
frappe/core/doctype/doctype/boilerplate/controller_list.html
+2
-2
frappe/core/doctype/doctype/boilerplate/controller_list.html
frappe/core/doctype/doctype/doctype.json
+151
-32
frappe/core/doctype/doctype/doctype.json
frappe/core/doctype/doctype/doctype.py
+50
-7
frappe/core/doctype/doctype/doctype.py
frappe/core/doctype/error_log/error_log.json
+1
-1
frappe/core/doctype/error_log/error_log.json
frappe/core/doctype/error_log/error_log.py
+6
-0
frappe/core/doctype/error_log/error_log.py
frappe/core/doctype/error_log/error_log_list.js
+10
-0
frappe/core/doctype/error_log/error_log_list.js
frappe/core/doctype/error_snapshot/error_snapshot.html
+1
-1
frappe/core/doctype/error_snapshot/error_snapshot.html
with
1666 additions
and
1093 deletions
+1666
-1093
frappe/__init__.py
View file @
f2bc961e
...
...
@@ -41,16 +41,26 @@ class _dict(dict):
def
_
(
msg
,
lang
=
None
):
"""Returns translated string in current lang, if exists."""
from
frappe.translate
import
get_full_dict
from
frappe.utils
import
cstr
if
not
lang
:
lang
=
local
.
lang
# msg should always be unicode
msg
=
cstr
(
msg
).
strip
()
msg
=
as_unicode
(
msg
).
strip
()
return
get_full_dict
(
local
.
lang
).
get
(
msg
)
or
msg
def
as_unicode
(
text
,
encoding
=
'utf-8'
):
'''Convert to unicode if required'''
if
isinstance
(
text
,
unicode
):
return
text
elif
text
==
None
:
return
''
elif
isinstance
(
text
,
basestring
):
return
unicode
(
text
,
encoding
)
else
:
return
unicode
(
text
)
def
get_lang_dict
(
fortype
,
name
=
None
):
"""Returns the translated language dict for the given type and name.
...
...
@@ -225,11 +235,11 @@ def errprint(msg):
"""Log error. This is sent back as `exc` in response.
:param msg: Message."""
from
utils
import
cstr
msg
=
as_unicode
(
msg
)
if
not
request
or
(
not
"cmd"
in
local
.
form_dict
):
print
cstr
(
msg
)
print
msg
.
encode
(
'utf-8'
)
error_log
.
append
(
cstr
(
msg
)
)
error_log
.
append
(
msg
)
def
log
(
msg
):
"""Add to `debug_log`.
...
...
@@ -239,8 +249,7 @@ def log(msg):
if
conf
.
get
(
"logging"
)
or
False
:
print
repr
(
msg
)
from
utils
import
cstr
debug_log
.
append
(
cstr
(
msg
))
debug_log
.
append
(
as_unicode
(
msg
))
def
msgprint
(
msg
,
title
=
None
,
raise_exception
=
0
,
as_table
=
False
,
indicator
=
None
,
alert
=
False
):
"""Print a message to the user (via HTTP response).
...
...
@@ -355,12 +364,12 @@ def get_request_header(key, default=None):
:param default: Default value."""
return
request
.
headers
.
get
(
key
,
default
)
def
sendmail
(
recipients
=
()
,
sender
=
""
,
subject
=
"No Subject"
,
message
=
"No Message"
,
def
sendmail
(
recipients
=
[]
,
sender
=
""
,
subject
=
"No Subject"
,
message
=
"No Message"
,
as_markdown
=
False
,
delayed
=
True
,
reference_doctype
=
None
,
reference_name
=
None
,
unsubscribe_method
=
None
,
unsubscribe_params
=
None
,
unsubscribe_message
=
None
,
attachments
=
None
,
content
=
None
,
doctype
=
None
,
name
=
None
,
reply_to
=
None
,
cc
=
(),
show_as_cc
=
()
,
message_id
=
None
,
in_reply_to
=
None
,
send_after
=
None
,
expose_recipients
=
Fals
e
,
send_priority
=
1
,
communication
=
None
,
retry
=
1
):
cc
=
[]
,
message_id
=
None
,
in_reply_to
=
None
,
send_after
=
None
,
expose_recipients
=
Non
e
,
send_priority
=
1
,
communication
=
None
,
retry
=
1
,
now
=
None
):
"""Send email using user's default **Email Account** or global default **Email Account**.
...
...
@@ -383,25 +392,23 @@ def sendmail(recipients=(), sender="", subject="No Subject", message="No Message
:param expose_recipients: Display all recipients in the footer message - "This email was sent to"
:param communication: Communication link to be set in Email Queue record
"""
message
=
content
or
message
if
delayed
:
import
frappe.email.queue
frappe
.
email
.
queue
.
send
(
recipients
=
recipients
,
sender
=
sender
,
subject
=
subject
,
message
=
content
or
message
,
reference_doctype
=
doctype
or
reference_doctype
,
reference_name
=
name
or
reference_name
,
unsubscribe_method
=
unsubscribe_method
,
unsubscribe_params
=
unsubscribe_params
,
unsubscribe_message
=
unsubscribe_message
,
attachments
=
attachments
,
reply_to
=
reply_to
,
cc
=
cc
,
show_as_cc
=
show_as_cc
,
message_id
=
message_id
,
in_reply_to
=
in_reply_to
,
send_after
=
send_after
,
expose_recipients
=
expose_recipients
,
send_priority
=
send_priority
,
communication
=
communication
)
else
:
import
frappe.email
if
as_markdown
:
frappe
.
email
.
sendmail_md
(
recipients
,
sender
=
sender
,
subject
=
subject
,
msg
=
content
or
message
,
attachments
=
attachments
,
reply_to
=
reply_to
,
cc
=
cc
,
message_id
=
message_id
,
in_reply_to
=
in_reply_to
,
retry
=
retry
)
else
:
frappe
.
email
.
sendmail
(
recipients
,
sender
=
sender
,
subject
=
subject
,
msg
=
content
or
message
,
attachments
=
attachments
,
reply_to
=
reply_to
,
cc
=
cc
,
message_id
=
message_id
,
in_reply_to
=
in_reply_to
,
retry
=
retry
)
if
as_markdown
:
from
markdown2
import
markdown
message
=
markdown
(
message
)
if
not
delayed
:
now
=
True
import
email.queue
email
.
queue
.
send
(
recipients
=
recipients
,
sender
=
sender
,
subject
=
subject
,
message
=
message
,
reference_doctype
=
doctype
or
reference_doctype
,
reference_name
=
name
or
reference_name
,
unsubscribe_method
=
unsubscribe_method
,
unsubscribe_params
=
unsubscribe_params
,
unsubscribe_message
=
unsubscribe_message
,
attachments
=
attachments
,
reply_to
=
reply_to
,
cc
=
cc
,
message_id
=
message_id
,
in_reply_to
=
in_reply_to
,
send_after
=
send_after
,
expose_recipients
=
expose_recipients
,
send_priority
=
send_priority
,
communication
=
communication
,
now
=
now
)
whitelisted
=
[]
guest_methods
=
[]
...
...
@@ -847,13 +854,12 @@ def get_file_json(path):
def
read_file
(
path
,
raise_not_found
=
False
):
"""Open a file and return its content as Unicode."""
from
frappe.utils
import
cstr
if
isinstance
(
path
,
unicode
):
path
=
path
.
encode
(
"utf-8"
)
if
os
.
path
.
exists
(
path
):
with
open
(
path
,
"r"
)
as
f
:
return
cstr
(
f
.
read
())
return
as_unicode
(
f
.
read
())
elif
raise_not_found
:
raise
IOError
(
"{} Not Found"
.
format
(
path
))
else
:
...
...
This diff is collapsed.
Click to expand it.
frappe/api.py
View file @
f2bc961e
...
...
@@ -129,6 +129,7 @@ def handle():
return
build_response
(
"json"
)
def
validate_oauth
():
from
frappe.oauth
import
get_url_delimiter
form_dict
=
frappe
.
local
.
form_dict
authorization_header
=
frappe
.
get_request_header
(
"Authorization"
).
split
(
" "
)
if
frappe
.
get_request_header
(
"Authorization"
)
else
None
if
authorization_header
and
authorization_header
[
0
].
lower
()
==
"bearer"
:
...
...
@@ -142,7 +143,7 @@ def validate_oauth():
body
=
r
.
get_data
()
headers
=
r
.
headers
required_scopes
=
frappe
.
db
.
get_value
(
"OAuth Bearer Token"
,
token
,
"scopes"
).
split
(
";"
)
required_scopes
=
frappe
.
db
.
get_value
(
"OAuth Bearer Token"
,
token
,
"scopes"
).
split
(
get_url_delimiter
()
)
valid
,
oauthlib_request
=
get_oauth_server
().
verify_request
(
uri
,
http_method
,
body
,
headers
,
required_scopes
)
...
...
This diff is collapsed.
Click to expand it.
frappe/async.py
View file @
f2bc961e
...
...
@@ -9,7 +9,6 @@ import frappe
import
os
import
time
import
redis
from
functools
import
wraps
from
frappe.utils
import
get_site_path
from
frappe
import
conf
...
...
@@ -93,7 +92,9 @@ def publish_realtime(event=None, message=None, room=None,
room
=
get_site_room
()
if
after_commit
:
frappe
.
local
.
realtime_log
.
append
([
event
,
message
,
room
])
params
=
[
event
,
message
,
room
]
if
not
params
in
frappe
.
local
.
realtime_log
:
frappe
.
local
.
realtime_log
.
append
(
params
)
else
:
emit_via_redis
(
event
,
message
,
room
)
...
...
This diff is collapsed.
Click to expand it.
frappe/change_log/v7/v7_2_0.md
0 → 100644
View file @
f2bc961e
-
Filters Dashboard
-
Dashboard with pre-defined filters in List/Report View
-
Tag Category
-
Show/Group tags based on category
-
Updated Font Awesome version to 4.x.x
-
Checkboxes in grid
-
Delete selected rows
-
Map selected rows from one document to another.
-
Show Totals button in report
-
OpenID Connect for Frappe
-
Threading based on message id in Email Queue
-
New control object daterangepicker for filtering
-
Orientation selection in PDF
-
Expand/Collapse All buttons in tree view reports
-
Add attachment from email and copy attachments to Communication Record
-
Bulk Upload from zip file
-
Tree view decoration
-
Custom menu for report view
This diff is collapsed.
Click to expand it.
frappe/client.py
View file @
f2bc961e
...
...
@@ -8,14 +8,33 @@ import frappe.model
import
frappe.utils
import
json
,
os
'''
Handle RESTful requests that are mapped to the `/api/resource` route.
Requests via FrappeClient are also handled here.
'''
@
frappe
.
whitelist
()
def
get_list
(
doctype
,
fields
=
None
,
filters
=
None
,
order_by
=
None
,
limit_start
=
None
,
limit_page_length
=
20
):
'''Returns a list of records by filters, fields, ordering and limit
:param doctype: DocType of the data to be queried
:param fields: fields to be returned. Default is `name`
:param filters: filter list by this dict
:param order_by: Order by this fieldname
:param limit_start: Start at this index
:param limit_page_length: Number of records to be returned (default 20)'''
return
frappe
.
get_list
(
doctype
,
fields
=
fields
,
filters
=
filters
,
order_by
=
order_by
,
limit_start
=
limit_start
,
limit_page_length
=
limit_page_length
,
ignore_permissions
=
False
)
@
frappe
.
whitelist
()
def
get
(
doctype
,
name
=
None
,
filters
=
None
):
'''Returns a document by name or filters
:param doctype: DocType of the document to be returned
:param name: return document of this `name`
:param filters: If name is not set, filter by these values and return the first match'''
if
filters
and
not
name
:
name
=
frappe
.
db
.
get_value
(
doctype
,
json
.
loads
(
filters
))
if
not
name
:
...
...
@@ -29,6 +48,12 @@ def get(doctype, name=None, filters=None):
@
frappe
.
whitelist
()
def
get_value
(
doctype
,
fieldname
,
filters
=
None
,
as_dict
=
True
,
debug
=
False
):
'''Returns a value form a document
:param doctype: DocType to be queried
:param fieldname: Field to be returned (default `name`)
:param filters: dict or string for identifying the record'''
if
not
frappe
.
has_permission
(
doctype
):
frappe
.
throw
(
_
(
"Not permitted"
),
frappe
.
PermissionError
)
...
...
@@ -83,6 +108,9 @@ def set_value(doctype, name, fieldname, value=None):
@
frappe
.
whitelist
()
def
insert
(
doc
=
None
):
'''Insert a document
:param doc: JSON or dict object to be inserted'''
if
isinstance
(
doc
,
basestring
):
doc
=
json
.
loads
(
doc
)
...
...
@@ -98,6 +126,9 @@ def insert(doc=None):
@
frappe
.
whitelist
()
def
insert_many
(
docs
=
None
):
'''Insert multiple documents
:param docs: JSON or list of dict objects to be inserted in one request'''
if
isinstance
(
docs
,
basestring
):
docs
=
json
.
loads
(
docs
)
...
...
@@ -121,6 +152,9 @@ def insert_many(docs=None):
@
frappe
.
whitelist
()
def
save
(
doc
):
'''Update (save) an existing document
:param doc: JSON or dict object with the properties of the document to be updated'''
if
isinstance
(
doc
,
basestring
):
doc
=
json
.
loads
(
doc
)
...
...
@@ -129,11 +163,19 @@ def save(doc):
@
frappe
.
whitelist
()
def
rename_doc
(
doctype
,
old_name
,
new_name
,
merge
=
False
):
'''Rename document
:param doctype: DocType of the document to be renamed
:param old_name: Current `name` of the document to be renamed
:param new_name: New `name` to be set'''
new_name
=
frappe
.
rename_doc
(
doctype
,
old_name
,
new_name
,
merge
=
merge
)
return
new_name
@
frappe
.
whitelist
()
def
submit
(
doc
):
'''Submit a document
:param doc: JSON or dict object to be submitted remotely'''
if
isinstance
(
doc
,
basestring
):
doc
=
json
.
loads
(
doc
)
...
...
@@ -144,6 +186,10 @@ def submit(doc):
@
frappe
.
whitelist
()
def
cancel
(
doctype
,
name
):
'''Cancel a document
:param doctype: DocType of the document to be cancelled
:param name: name of the document to be cancelled'''
wrapper
=
frappe
.
get_doc
(
doctype
,
name
)
wrapper
.
cancel
()
...
...
@@ -151,6 +197,10 @@ def cancel(doctype, name):
@
frappe
.
whitelist
()
def
delete
(
doctype
,
name
):
'''Delete a remote document
:param doctype: DocType of the document to be deleted
:param name: name of the document to be deleted'''
frappe
.
delete_doc
(
doctype
,
name
)
@
frappe
.
whitelist
()
...
...
@@ -161,6 +211,9 @@ def set_default(key, value, parent=None):
@
frappe
.
whitelist
()
def
make_width_property_setter
(
doc
):
'''Set width Property Setter
:param doc: Property Setter document with `width` property'''
if
isinstance
(
doc
,
basestring
):
doc
=
json
.
loads
(
doc
)
if
doc
[
"doctype"
]
==
"Property Setter"
and
doc
[
"property"
]
==
"width"
:
...
...
@@ -168,6 +221,9 @@ def make_width_property_setter(doc):
@
frappe
.
whitelist
()
def
bulk_update
(
docs
):
'''Bulk update documents
:param docs: JSON list of documents to be updated remotely. Each document must have `docname` property'''
docs
=
json
.
loads
(
docs
)
failed_docs
=
[]
for
doc
in
docs
:
...
...
@@ -187,17 +243,32 @@ def bulk_update(docs):
@
frappe
.
whitelist
()
def
has_permission
(
doctype
,
docname
,
perm_type
=
"read"
):
'''Returns a JSON with data whether the document has the requested permission
:param doctype: DocType of the document to be checked
:param docname: `name` of the document to be checked
:param perm_type: one of `read`, `write`, `create`, `submit`, `cancel`, `report`. Default is `read`'''
# perm_type can be one of read, write, create, submit, cancel, report
return
{
"has_permission"
:
frappe
.
has_permission
(
doctype
,
perm_type
.
lower
(),
docname
)}
@
frappe
.
whitelist
()
def
get_password
(
doctype
,
name
,
fieldname
):
'''Return a password type property. Only applicable for System Managers
:param doctype: DocType of the document that holds the password
:param name: `name` of the document that holds the password
:param fieldname: `fieldname` of the password property
'''
frappe
.
only_for
(
"System Manager"
)
return
frappe
.
get_doc
(
doctype
,
name
).
get_password
(
fieldname
)
@
frappe
.
whitelist
()
def
get_js
(
items
):
'''Load JS code files. Will also append translations
and extend `frappe._messages`
:param items: JSON list of paths of the js files to be loaded.'''
items
=
json
.
loads
(
items
)
out
=
[]
for
src
in
items
:
...
...
This diff is collapsed.
Click to expand it.
frappe/commands/scheduler.py
View file @
f2bc961e
...
...
@@ -27,7 +27,7 @@ def trigger_scheduler_event(context, event):
try
:
frappe
.
init
(
site
=
site
)
frappe
.
connect
()
frappe
.
utils
.
scheduler
.
trigger
(
site
,
event
,
now
=
context
.
forc
e
)
frappe
.
utils
.
scheduler
.
trigger
(
site
,
event
,
now
=
Tru
e
)
finally
:
frappe
.
destroy
()
...
...
This diff is collapsed.
Click to expand it.
frappe/config/docs.py
View file @
f2bc961e
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
docs_version
=
"7.x.x"
source_link
=
"https://github.com/frappe/frappe"
docs_base_url
=
"https://frappe.github.io/frappe"
...
...
@@ -22,10 +27,13 @@ ERP for managing small and medium sized businesses.
[Get started with the Tutorial](https://frappe.github.io/frappe/user/)
"""
docs_version
=
"7.x.x"
google_analytics_id
=
'UA-8911157-23'
def
get_context
(
context
):
context
.
brand_html
=
(
'<img class="brand-logo" src="'
+
context
.
docs_base_url
+
'/assets/img/frappe-bird-white.png"> Frappé Framework</img>'
)
context
.
top_bar_items
=
[
{
"label"
:
"Developer Tutorials"
,
"url"
:
context
.
docs_base_url
+
"/user"
,
"right"
:
1
},
{
"label"
:
"API Documentation"
,
"url"
:
context
.
docs_base_url
+
"/current"
,
"right"
:
1
}
{
"label"
:
"Tutorials"
,
"url"
:
context
.
docs_base_url
+
"/user"
,
"right"
:
1
},
{
"label"
:
"API"
,
"url"
:
context
.
docs_base_url
+
"/current"
,
"right"
:
1
},
{
"label"
:
"Forum"
,
"url"
:
'https://discuss.erpnext.com'
,
"right"
:
1
}
]
This diff is collapsed.
Click to expand it.
frappe/config/setup.py
View file @
f2bc961e
...
...
@@ -6,7 +6,7 @@ def get_data():
data
=
[
{
"label"
:
_
(
"Users"
),
"icon"
:
"
icon
-group"
,
"icon"
:
"
fa fa
-group"
,
"items"
:
[
{
"type"
:
"doctype"
,
...
...
@@ -22,41 +22,41 @@ def get_data():
},
{
"label"
:
_
(
"Permissions"
),
"icon"
:
"
icon
-lock"
,
"icon"
:
"
fa fa
-lock"
,
"items"
:
[
{
"type"
:
"page"
,
"name"
:
"permission-manager"
,
"label"
:
_
(
"Role Permissions Manager"
),
"icon"
:
"
icon
-lock"
,
"icon"
:
"
fa fa
-lock"
,
"description"
:
_
(
"Set Permissions on Document Types and Roles"
)
},
{
"type"
:
"page"
,
"name"
:
"user-permissions"
,
"label"
:
_
(
"User Permissions Manager"
),
"icon"
:
"
icon
-shield"
,
"icon"
:
"
fa fa
-shield"
,
"description"
:
_
(
"Set Permissions per User"
)
},
{
"type"
:
"page"
,
"name"
:
"modules_setup"
,
"label"
:
_
(
"Show / Hide Modules"
),
"icon"
:
"
icon
-upload"
,
"icon"
:
"
fa fa
-upload"
,
"description"
:
_
(
"Show or hide modules globally."
)
},
{
"type"
:
"report"
,
"is_query_report"
:
True
,
"doctype"
:
"User"
,
"icon"
:
"
icon
-eye-open"
,
"icon"
:
"
fa fa
-eye-open"
,
"name"
:
"Permitted Documents For User"
,
"description"
:
_
(
"Check which Documents are readable by a User"
)
},
{
"type"
:
"report"
,
"doctype"
:
"DocShare"
,
"icon"
:
"
icon
-share"
,
"icon"
:
"
fa fa
-share"
,
"name"
:
"Document Share Report"
,
"description"
:
_
(
"Report of all document shares"
)
}
...
...
@@ -64,7 +64,7 @@ def get_data():
},
{
"label"
:
_
(
"Settings"
),
"icon"
:
"
icon
-wrench"
,
"icon"
:
"
fa fa
-wrench"
,
"items"
:
[
{
"type"
:
"doctype"
,
...
...
@@ -87,13 +87,13 @@ def get_data():
},
{
"label"
:
_
(
"Data"
),
"icon"
:
"
icon
-th"
,
"icon"
:
"
fa fa
-th"
,
"items"
:
[
{
"type"
:
"page"
,
"name"
:
"data-import-tool"
,
"label"
:
_
(
"Import / Export Data"
),
"icon"
:
"
icon
-upload"
,
"icon"
:
"
fa fa
-upload"
,
"description"
:
_
(
"Import / Export Data from .csv files."
)
},
{
...
...
@@ -121,13 +121,13 @@ def get_data():
"name"
:
"backups"
,
"label"
:
_
(
"Download Backups"
),
"description"
:
_
(
"List of backups available for download"
),
"icon"
:
"
icon
-download"
"icon"
:
"
fa fa
-download"
},
]
},
{
"label"
:
_
(
"Email"
),
"icon"
:
"
icon
-envelope"
,
"icon"
:
"
fa fa
-envelope"
,
"items"
:
[
{
"type"
:
"doctype"
,
...
...
@@ -153,7 +153,7 @@ def get_data():
},
{
"label"
:
_
(
"Printing"
),
"icon"
:
"
icon
-print"
,
"icon"
:
"
fa fa
-print"
,
"items"
:
[
{
"type"
:
"page"
,
...
...
@@ -175,7 +175,7 @@ def get_data():
},
{
"label"
:
_
(
"Workflow"
),
"icon"
:
"
icon
-random"
,
"icon"
:
"
fa fa
-random"
,
"items"
:
[
{
"type"
:
"doctype"
,
...
...
@@ -196,14 +196,14 @@ def get_data():
},
{
"label"
:
_
(
"Integrations"
),
"icon"
:
"
icon
-star"
,
"icon"
:
"
fa fa
-star"
,
"items"
:
[
{
"type"
:
"page"
,
"name"
:
"applications"
,
"label"
:
_
(
"Application Installer"
),
"description"
:
_
(
"Install Applications."
),
"icon"
:
"
icon
-download"
"icon"
:
"
fa fa
-download"
},
{
"type"
:
"doctype"
,
...
...
@@ -229,7 +229,7 @@ def get_data():
},
{
"label"
:
_
(
"Customize"
),
"icon"
:
"
icon
-glass"
,
"icon"
:
"
fa fa
-glass"
,
"items"
:
[
{
"type"
:
"doctype"
,
...
...
@@ -257,10 +257,16 @@ def get_data():
"type"
:
"doctype"
,
"name"
:
"DocType"
,
"description"
:
_
(
"Add custom forms."
)
},
{
"type"
:
"doctype"
,
"label"
:
_
(
"Custom Tags"
),
"name"
:
"Tag Category"
,
"description"
:
_
(
"Add your own Tag Categories"
)
}
]
},
]
add_setup_section
(
data
,
"frappe"
,
"website"
,
_
(
"Website"
),
"
icon
-globe"
)
add_setup_section
(
data
,
"frappe"
,
"website"
,
_
(
"Website"
),
"
fa fa
-globe"
)
return
data
This diff is collapsed.
Click to expand it.
frappe/config/website.py
View file @
f2bc961e
...
...
@@ -5,7 +5,7 @@ def get_data():
return
[
{
"label"
:
_
(
"Web Site"
),
"icon"
:
"
icon
-star"
,
"icon"
:
"
fa fa
-star"
,
"items"
:
[
{
"type"
:
"doctype"
,
...
...
@@ -46,7 +46,7 @@ def get_data():
},
{
"label"
:
_
(
"Setup"
),
"icon"
:
"
icon
-cog"
,
"icon"
:
"
fa fa
-cog"
,
"items"
:
[
{
"type"
:
"doctype"
,
...
...
@@ -84,5 +84,19 @@ def get_data():
"label"
:
_
(
"Portal Settings"
),
}
]
}
},
{
"label"
:
_
(
"Knowledge Base"
),
"items"
:
[
{
"type"
:
"doctype"
,
"name"
:
"Help Category"
,
},
{
"type"
:
"doctype"
,
"name"
:
"Help Article"
,
},
]
},
]
This diff is collapsed.
Click to expand it.
frappe/core/doctype/communication/communication.json
View file @
f2bc961e
{
"allow_copy"
:
0
,
"allow_import"
:
1
,
"allow_rename"
:
0
,
"autoname"
:
""
,
"creation"
:
"2013-01-29 10:47:14"
,
"custom"
:
0
,
"description"
:
"Keep a track of all communications"
,
"docstatus"
:
0
,
"doctype"
:
"DocType"
,
"document_type"
:
"Setup"
,
"allow_copy"
:
0
,
"allow_import"
:
1
,
"allow_rename"
:
0
,
"autoname"
:
""
,
"beta"
:
0
,
"creation"
:
"2013-01-29 10:47:14"
,
"custom"
:
0
,
"description"
:
"Keep a track of all communications"
,
"docstatus"
:
0
,
"doctype"
:
"DocType"
,
"document_type"
:
"Setup"
,
"editable_grid"
:
0
,
"engine"
:
"InnoDB"
,
"fields"
:
[
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"subject"
,
"fieldtype"
:
"Small Text"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Subject"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
1
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"collapsible_depends_on"
:
"eval:doc.communication_type==='Communication'"
,
"fieldname"
:
"section_break_10"
,
"fieldtype"
:
"Section Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"default"
:
""
,
"depends_on"
:
"eval:doc.communication_type===
\"
Communication
\"
"
,
"fieldname"
:
"communication_medium"
,
"fieldtype"
:
"Select"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Type"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"
\n
Email
\n
Chat
\n
Phone
\n
SMS
\n
Visit
\n
Other"
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"depends_on"
:
"eval:doc.communication_medium===
\"
Email
\"
"
,
"fieldname"
:
"sender"
,
"fieldtype"
:
"Data"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"From"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Email"
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"column_break_4"
,
"fieldtype"
:
"Column Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"depends_on"
:
""
,
"fieldname"
:
"recipients"
,
"fieldtype"
:
"Code"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"To"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Email"
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"depends_on"
:
"eval:doc.communication_medium===
\"
Email
\"
"
,
"fieldname"
:
"cc"
,
"fieldtype"
:
"Code"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"CC"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Email"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"depends_on"
:
"eval:in_list([
\"
Phone
\"
,
\"
SMS
\"
], doc.communication_medium)"
,
"fieldname"
:
"phone_no"
,
"fieldtype"
:
"Data"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Phone No."
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"description"
:
"Integrations can use this field to set email delivery status"
,
"fieldname"
:
"delivery_status"
,
"fieldtype"
:
"Select"
,
"hidden"
:
1
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Delivery Status"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"
\n
Sent
\n
Bounced
\n
Opened
\n
Marked As Spam
\n
Rejected
\n
Delayed
\n
Soft-Bounced
\n
Clicked
\n
Recipient Unsubscribed
\n
Error
\n
Expired
\n
Sending"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"section_break_8"
,
"fieldtype"
:
"Section Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"content"
,
"fieldtype"
:
"Text Editor"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Message"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
,
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"subject"
,
"fieldtype"
:
"Small Text"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Subject"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
1
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"collapsible_depends_on"
:
"eval:doc.communication_type==='Communication'"
,
"columns"
:
0
,
"fieldname"
:
"section_break_10"
,
"fieldtype"
:
"Section Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"default"
:
""
,
"depends_on"
:
"eval:doc.communication_type===
\"
Communication
\"
"
,
"fieldname"
:
"communication_medium"
,
"fieldtype"
:
"Select"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Type"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"
\n
Email
\n
Chat
\n
Phone
\n
SMS
\n
Visit
\n
Other"
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"depends_on"
:
"eval:doc.communication_medium===
\"
Email
\"
"
,
"fieldname"
:
"sender"
,
"fieldtype"
:
"Data"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"From"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Email"
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"column_break_4"
,
"fieldtype"
:
"Column Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"depends_on"
:
""
,
"fieldname"
:
"recipients"
,
"fieldtype"
:
"Code"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"To"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Email"
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"depends_on"
:
"eval:doc.communication_medium===
\"
Email
\"
"
,
"fieldname"
:
"cc"
,
"fieldtype"
:
"Code"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"CC"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Email"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"depends_on"
:
"eval:in_list([
\"
Phone
\"
,
\"
SMS
\"
], doc.communication_medium)"
,
"fieldname"
:
"phone_no"
,
"fieldtype"
:
"Data"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Phone No."
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"description"
:
"Integrations can use this field to set email delivery status"
,
"fieldname"
:
"delivery_status"
,
"fieldtype"
:
"Select"
,
"hidden"
:
1
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Delivery Status"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"
\n
Sent
\n
Bounced
\n
Opened
\n
Marked As Spam
\n
Rejected
\n
Delayed
\n
Soft-Bounced
\n
Clicked
\n
Recipient Unsubscribed
\n
Error
\n
Expired
\n
Sending"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"section_break_8"
,
"fieldtype"
:
"Section Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"content"
,
"fieldtype"
:
"Text Editor"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Message"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
,
"width"
:
"400"
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
1
,
"fieldname"
:
"status_section"
,
"fieldtype"
:
"Section Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Status"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"default"
:
"Communication"
,
"fieldname"
:
"communication_type"
,
"fieldtype"
:
"Select"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Communication Type"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Communication
\n
Comment
\n
Chat
\n
Bot
\n
Notification"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
1
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"comment_type"
,
"fieldtype"
:
"Select"
,
"hidden"
:
1
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Comment Type"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"
\n
Comment
\n
Like
\n
Info
\n
Label
\n
Workflow
\n
Created
\n
Updated
\n
Submitted
\n
Cancelled
\n
Deleted
\n
Assigned
\n
Assignment Completed
\n
Attachment
\n
Attachment Removed
\n
Shared
\n
Unshared
\n
Bot"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"column_break_5"
,
"fieldtype"
:
"Column Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"depends_on"
:
"eval:doc.communication_type===
\"
Communication
\"
"
,
"fieldname"
:
"status"
,
"fieldtype"
:
"Select"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
1
,
"label"
:
"Status"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Open
\n
Replied
\n
Closed
\n
Linked"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
1
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"depends_on"
:
"eval:doc.communication_type===
\"
Communication
\"
"
,
"fieldname"
:
"sent_or_received"
,
"fieldtype"
:
"Select"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
1
,
"label"
:
"Sent or Received"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Sent
\n
Received"
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
1
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
1
,
"fieldname"
:
"additional_info"
,
"fieldtype"
:
"Section Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"More Information"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"default"
:
"Today"
,
"fieldname"
:
"communication_date"
,
"fieldtype"
:
"Datetime"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Date"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"column_break_14"
,
"fieldtype"
:
"Column Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"sender_full_name"
,
"fieldtype"
:
"Data"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"From Full Name"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
1
,
"fieldname"
:
"reference_section"
,
"fieldtype"
:
"Section Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Reference"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"reference_doctype"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Reference DocType"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"DocType"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"reference_name"
,
"fieldtype"
:
"Dynamic Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Reference Name"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"reference_doctype"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"reference_owner"
,
"fieldtype"
:
"Read Only"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Reference Owner"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"reference_name.owner"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
1
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"depends_on"
:
"eval:doc.communication_medium===
\"
Email
\"
"
,
"fieldname"
:
"email_account"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Email Account"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Email Account"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"in_reply_to"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"In Reply To"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Communication"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"default"
:
"__user"
,
"fieldname"
:
"user"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
1
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"User"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"User"
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"column_break_27"
,
"fieldtype"
:
"Column Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"link_doctype"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Link DocType"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"DocType"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"link_name"
,
"fieldtype"
:
"Dynamic Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Link Name"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"link_doctype"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"timeline_doctype"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Timeline DocType"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"DocType"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"timeline_name"
,
"fieldtype"
:
"Dynamic Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Timeline Name"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"timeline_doctype"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"default"
:
"0"
,
"fieldname"
:
"unread_notification_sent"
,
"fieldtype"
:
"Check"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Unread Notification Sent"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"seen"
,
"fieldtype"
:
"Check"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Seen"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"fieldname"
:
"_user_tags"
,
"fieldtype"
:
"Data"
,
"hidden"
:
1
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"User Tags"
,
"length"
:
0
,
"no_copy"
:
1
,
"permlevel"
:
0
,
"print_hide"
:
1
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
1
,
"columns"
:
0
,
"fieldname"
:
"status_section"
,
"fieldtype"
:
"Section Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Status"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"text_content"
,
"fieldtype"
:
"Code"
,
"hidden"
:
1
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Text Content"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"default"
:
"Communication"
,
"fieldname"
:
"communication_type"
,
"fieldtype"
:
"Select"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Communication Type"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Communication
\n
Comment
\n
Chat
\n
Bot
\n
Notification"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
1
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"comment_type"
,
"fieldtype"
:
"Select"
,
"hidden"
:
1
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Comment Type"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"
\n
Comment
\n
Like
\n
Info
\n
Label
\n
Workflow
\n
Created
\n
Updated
\n
Submitted
\n
Cancelled
\n
Deleted
\n
Assigned
\n
Assignment Completed
\n
Attachment
\n
Attachment Removed
\n
Shared
\n
Unshared
\n
Bot"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"column_break_5"
,
"fieldtype"
:
"Column Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"depends_on"
:
"eval:doc.communication_type===
\"
Communication
\"
"
,
"fieldname"
:
"status"
,
"fieldtype"
:
"Select"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
1
,
"in_standard_filter"
:
1
,
"label"
:
"Status"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Open
\n
Replied
\n
Closed
\n
Linked"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
1
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"depends_on"
:
"eval:doc.communication_type===
\"
Communication
\"
"
,
"fieldname"
:
"sent_or_received"
,
"fieldtype"
:
"Select"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
1
,
"in_standard_filter"
:
1
,
"label"
:
"Sent or Received"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Sent
\n
Received"
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
1
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
1
,
"columns"
:
0
,
"fieldname"
:
"additional_info"
,
"fieldtype"
:
"Section Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"More Information"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"default"
:
"Today"
,
"fieldname"
:
"communication_date"
,
"fieldtype"
:
"Datetime"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Date"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"column_break_14"
,
"fieldtype"
:
"Column Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"sender_full_name"
,
"fieldtype"
:
"Data"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"From Full Name"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
1
,
"columns"
:
0
,
"fieldname"
:
"reference_section"
,
"fieldtype"
:
"Section Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Reference"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"reference_doctype"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Reference DocType"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"DocType"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"reference_name"
,
"fieldtype"
:
"Dynamic Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Reference Name"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"reference_doctype"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"reference_owner"
,
"fieldtype"
:
"Read Only"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Reference Owner"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"reference_name.owner"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
1
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"depends_on"
:
"eval:doc.communication_medium===
\"
Email
\"
"
,
"fieldname"
:
"email_account"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Email Account"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Email Account"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"in_reply_to"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"In Reply To"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"Communication"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"default"
:
"__user"
,
"fieldname"
:
"user"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
1
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"User"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"User"
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"column_break_27"
,
"fieldtype"
:
"Column Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"link_doctype"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Link DocType"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"DocType"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"link_name"
,
"fieldtype"
:
"Dynamic Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Link Name"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"link_doctype"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"timeline_doctype"
,
"fieldtype"
:
"Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Timeline DocType"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"DocType"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"timeline_name"
,
"fieldtype"
:
"Dynamic Link"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Timeline Name"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"timeline_doctype"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"default"
:
"0"
,
"fieldname"
:
"unread_notification_sent"
,
"fieldtype"
:
"Check"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Unread Notification Sent"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"seen"
,
"fieldtype"
:
"Check"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Seen"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"message_id"
,
"fieldtype"
:
"Data"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
1
,
"in_filter"
:
0
,
"in_standard_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Message ID"
,
"length"
:
995
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
1
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"_user_tags"
,
"fieldtype"
:
"Data"
,
"hidden"
:
1
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"User Tags"
,
"length"
:
0
,
"no_copy"
:
1
,
"permlevel"
:
0
,
"print_hide"
:
1
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
}
],
"hide_heading"
:
0
,
"hide_toolbar"
:
0
,
"icon"
:
"icon-comment"
,
"idx"
:
1
,
"in_create"
:
0
,
"in_dialog"
:
0
,
"is_submittable"
:
0
,
"issingle"
:
0
,
"istable"
:
0
,
"max_attachments"
:
0
,
"modified"
:
"2016-05-02 11:00:53.679035"
,
"modified_by"
:
"Administrator"
,
"module"
:
"Core"
,
"name"
:
"Communication"
,
"owner"
:
"Administrator"
,
],
"hide_heading"
:
0
,
"hide_toolbar"
:
0
,
"icon"
:
"fa fa-comment"
,
"idx"
:
1
,
"image_view"
:
0
,
"in_create"
:
0
,
"in_dialog"
:
0
,
"is_submittable"
:
0
,
"issingle"
:
0
,
"istable"
:
0
,
"max_attachments"
:
0
,
"modified"
:
"2016-12-14 16:02:10.145975"
,
"modified_by"
:
"Administrator"
,
"module"
:
"Core"
,
"name"
:
"Communication"
,
"owner"
:
"Administrator"
,
"permissions"
:
[
{
"amend"
:
0
,
"apply_user_permissions"
:
0
,
"cancel"
:
0
,
"create"
:
1
,
"delete"
:
1
,
"email"
:
0
,
"export"
:
0
,
"if_owner"
:
0
,
"import"
:
0
,
"permlevel"
:
0
,
"print"
:
0
,
"read"
:
1
,
"report"
:
1
,
"role"
:
"System Manager"
,
"set_user_permissions"
:
0
,
"share"
:
1
,
"submit"
:
0
,
"amend"
:
0
,
"apply_user_permissions"
:
0
,
"cancel"
:
0
,
"create"
:
1
,
"delete"
:
1
,
"email"
:
0
,
"export"
:
0
,
"if_owner"
:
0
,
"import"
:
0
,
"is_custom"
:
0
,
"permlevel"
:
0
,
"print"
:
0
,
"read"
:
1
,
"report"
:
1
,
"role"
:
"System Manager"
,
"set_user_permissions"
:
0
,
"share"
:
1
,
"submit"
:
0
,
"write"
:
1
},
{
"amend"
:
0
,
"apply_user_permissions"
:
0
,
"cancel"
:
0
,
"create"
:
1
,
"delete"
:
1
,
"email"
:
0
,
"export"
:
0
,
"if_owner"
:
1
,
"import"
:
0
,
"permlevel"
:
0
,
"print"
:
0
,
"read"
:
1
,
"report"
:
0
,
"role"
:
"All"
,
"set_user_permissions"
:
0
,
"share"
:
0
,
"submit"
:
0
,
},
{
"amend"
:
0
,
"apply_user_permissions"
:
0
,
"cancel"
:
0
,
"create"
:
1
,
"delete"
:
1
,
"email"
:
0
,
"export"
:
0
,
"if_owner"
:
1
,
"import"
:
0
,
"is_custom"
:
0
,
"permlevel"
:
0
,
"print"
:
0
,
"read"
:
1
,
"report"
:
0
,
"role"
:
"All"
,
"set_user_permissions"
:
0
,
"share"
:
0
,
"submit"
:
0
,
"write"
:
1
}
],
"quick_entry"
:
0
,
"read_only"
:
0
,
"read_only_onload"
:
0
,
"search_fields"
:
"subject"
,
"sort_order"
:
"DESC"
,
"title_field"
:
"subject"
,
],
"quick_entry"
:
0
,
"read_only"
:
0
,
"read_only_onload"
:
0
,
"search_fields"
:
"subject"
,
"sort_order"
:
"DESC"
,
"title_field"
:
"subject"
,
"track_seen"
:
0
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
frappe/core/doctype/communication/communication.py
View file @
f2bc961e
...
...
@@ -229,6 +229,7 @@ def on_doctype_update():
frappe
.
db
.
add_index
(
"Communication"
,
[
"status"
,
"communication_type"
])
frappe
.
db
.
add_index
(
"Communication"
,
[
"creation"
])
frappe
.
db
.
add_index
(
"Communication"
,
[
"modified"
])
frappe
.
db
.
add_index
(
"Communication"
,
[
"message_id(200)"
])
def
has_permission
(
doc
,
ptype
,
user
):
if
ptype
==
"read"
:
...
...
This diff is collapsed.
Click to expand it.
frappe/core/doctype/communication/email.py
View file @
f2bc961e
...
...
@@ -10,6 +10,7 @@ from frappe.utils import (get_url, get_formatted_email, cint,
from
frappe.utils.file_manager
import
get_file
from
frappe.email.queue
import
check_email_limit
from
frappe.utils.scheduler
import
log
from
frappe.email.email_body
import
get_message_id
import
frappe.email.smtp
import
MySQLdb
import
time
...
...
@@ -57,11 +58,22 @@ def make(doctype=None, name=None, content=None, subject=None, sent_or_received =
"communication_medium"
:
communication_medium
,
"sent_or_received"
:
sent_or_received
,
"reference_doctype"
:
doctype
,
"reference_name"
:
name
"reference_name"
:
name
,
"message_id"
:
get_message_id
().
strip
(
" <>"
)
})
comm
.
insert
(
ignore_permissions
=
True
)
if
not
doctype
:
# if no reference given, then send it against the communication
comm
.
db_set
(
dict
(
reference_doctype
=
'Communication'
,
reference_name
=
comm
.
name
))
if
isinstance
(
attachments
,
basestring
):
attachments
=
json
.
loads
(
attachments
)
# if not committed, delayed task doesn't find the communication
if
attachments
:
add_attachments
(
comm
.
name
,
attachments
)
frappe
.
db
.
commit
()
if
cint
(
send_email
):
...
...
@@ -120,10 +132,15 @@ def _notify(doc, print_html=None, print_format=None, attachments=None,
prepare_to_notify
(
doc
,
print_html
,
print_format
,
attachments
)
if
doc
.
outgoing_email_account
.
send_unsubscribe_message
:
unsubscribe_message
=
_
(
"Leave this conversation"
)
else
:
unsubscribe_message
=
""
frappe
.
sendmail
(
recipients
=
(
recipients
or
[])
+
(
cc
or
[]),
show_as_
cc
=
(
cc
or
[]),
expose_recipients
=
True
,
recipients
=
(
recipients
or
[]),
cc
=
(
cc
or
[]),
expose_recipients
=
"header"
,
sender
=
doc
.
sender
,
reply_to
=
doc
.
incoming_email_account
,
subject
=
doc
.
subject
,
...
...
@@ -131,8 +148,8 @@ def _notify(doc, print_html=None, print_format=None, attachments=None,
reference_doctype
=
doc
.
reference_doctype
,
reference_name
=
doc
.
reference_name
,
attachments
=
doc
.
attachments
,
message_id
=
doc
.
na
me
,
unsubscribe_message
=
_
(
"Leave this conversation"
)
,
message_id
=
doc
.
me
ssage_id
,
unsubscribe_message
=
unsubscribe_message
,
delayed
=
True
,
communication
=
doc
.
name
)
...
...
@@ -252,7 +269,7 @@ def set_incoming_outgoing_accounts(doc):
if
not
doc
.
outgoing_email_account
:
doc
.
outgoing_email_account
=
frappe
.
db
.
get_value
(
"Email Account"
,
{
"default_outgoing"
:
1
,
"enable_outgoing"
:
1
},
[
"email_id"
,
"always_use_account_email_id_as_sender"
,
"name"
],
as_dict
=
True
)
or
frappe
.
_dict
()
[
"email_id"
,
"always_use_account_email_id_as_sender"
,
"name"
,
"send_unsubscribe_message"
],
as_dict
=
True
)
or
frappe
.
_dict
()
def
get_recipients
(
doc
,
fetched_from_email_account
=
False
):
"""Build a list of email addresses for To"""
...
...
@@ -312,6 +329,20 @@ def get_cc(doc, recipients=None, fetched_from_email_account=False):
return
cc
def
add_attachments
(
name
,
attachments
):
'''Add attachments to the given Communiction'''
from
frappe.utils.file_manager
import
save_url
# loop through attachments
for
a
in
attachments
:
attach
=
frappe
.
db
.
get_value
(
"File"
,
{
"name"
:
a
},
[
"file_name"
,
"file_url"
,
"is_private"
],
as_dict
=
1
)
# save attachments to new doc
save_url
(
attach
.
file_url
,
attach
.
file_name
,
"Communication"
,
name
,
"Home/Attachments"
,
attach
.
is_private
)
def
filter_email_list
(
doc
,
email_list
,
exclude
,
is_cc
=
False
):
# temp variables
filtered
=
[]
...
...
@@ -383,6 +414,8 @@ def sendmail(communication_name, print_html=None, print_format=None, attachments
for
i
in
xrange
(
3
):
try
:
communication
=
frappe
.
get_doc
(
"Communication"
,
communication_name
)
if
communication
.
sent_or_received
==
"Received"
:
communication
.
message_id
=
None
communication
.
_notify
(
print_html
=
print_html
,
print_format
=
print_format
,
attachments
=
attachments
,
recipients
=
recipients
,
cc
=
cc
)
...
...
This diff is collapsed.
Click to expand it.
frappe/core/doctype/docfield/docfield.json
View file @
f2bc961e
...
...
@@ -23,6 +23,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
""
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -48,6 +49,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
1
,
"in_standard_filter"
:
0
,
"label"
:
"Label"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -78,6 +80,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
1
,
"in_standard_filter"
:
0
,
"label"
:
"Type"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -106,6 +109,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
1
,
"in_standard_filter"
:
0
,
"label"
:
"Name"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -133,6 +137,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
1
,
"in_standard_filter"
:
0
,
"label"
:
"Mandatory"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -164,6 +169,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Precision"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -191,6 +197,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Length"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -217,6 +224,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Index"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -246,6 +254,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"In List View"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -261,6 +270,33 @@
"unique"
:
0
,
"width"
:
"70px"
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"in_standard_filter"
,
"fieldtype"
:
"Check"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"In Standard Filter"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
...
...
@@ -273,6 +309,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Bold"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -300,6 +337,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Collapsible"
,
"length"
:
255
,
"no_copy"
:
0
,
...
...
@@ -327,6 +365,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Collapsible Depends On"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -353,6 +392,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
...
...
@@ -378,6 +418,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
1
,
"in_standard_filter"
:
0
,
"label"
:
"Options"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -405,6 +446,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Default"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -432,6 +474,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Permissions"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -457,6 +500,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Display Depends On"
,
"length"
:
255
,
"no_copy"
:
0
,
...
...
@@ -484,6 +528,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Hidden"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -513,6 +558,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Read Only"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -540,6 +586,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Unique"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -567,6 +614,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Set Only Once"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -592,6 +640,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
...
...
@@ -617,6 +666,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Perm Level"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -647,6 +697,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Ignore User Permissions"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -672,6 +723,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Allow on Submit"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -701,6 +753,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Report Hide"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -757,6 +810,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Ignore XSS Filter"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -783,6 +837,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Display"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -808,6 +863,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"In Filter"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -837,6 +893,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"No Copy"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -866,6 +923,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Print Hide"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -896,6 +954,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Print Hide If No Value"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -922,6 +981,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Print Width"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -947,6 +1007,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Width"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -978,6 +1039,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Columns"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -1004,6 +1066,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
...
...
@@ -1028,6 +1091,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
1
,
"in_standard_filter"
:
0
,
"label"
:
"Description"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -1057,6 +1121,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"oldfieldname"
:
"oldfieldname"
,
...
...
@@ -1083,6 +1148,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"oldfieldname"
:
"oldfieldtype"
,
...
...
@@ -1118,5 +1184,5 @@
"read_only"
:
0
,
"read_only_onload"
:
0
,
"sort_order"
:
"ASC"
,
"track_seen"
:
0
}
"track_seen"
:
0
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
frappe/core/doctype/doctype/boilerplate/controller_list.html
View file @
f2bc961e
<div
class=
"row"
style=
"max-height: 30px;"
>
<div
class=
"col-xs-12"
>
<div
class=
"
text-
ellipsis"
>
<div
class=
"ellipsis"
>
{{%= list.get_avatar_and_id(doc) %}}
<!-- sample text -->
...
...
@@ -13,7 +13,7 @@
<span
style=
"margin-right: 8px;"
title=
"{{%= __("
Title
")
%}}"
class=
"filterable"
data-filter=
"check,=,Yes"
>
<i
class=
"
icon
-icon text-muted"
></i>
<i
class=
"
fa fa
-icon text-muted"
></i>
</span>
{{% }} %}}
...
...
This diff is collapsed.
Click to expand it.
frappe/core/doctype/doctype/doctype.json
View file @
f2bc961e
...
...
@@ -25,6 +25,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
""
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -33,6 +34,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -51,6 +53,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
1
,
"in_standard_filter"
:
1
,
"label"
:
"Module"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -61,6 +64,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
1
,
"search_index"
:
1
,
...
...
@@ -80,6 +84,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
1
,
"label"
:
"Is Child Table"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -89,6 +94,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -109,6 +115,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Editable Grid"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -117,6 +124,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -136,6 +144,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
1
,
"label"
:
"Is Single"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -145,6 +154,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -163,12 +173,14 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -180,6 +192,7 @@
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"description"
:
""
,
"fieldname"
:
"document_type"
,
"fieldtype"
:
"Select"
,
"hidden"
:
0
,
...
...
@@ -187,7 +200,8 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Document Type"
,
"in_standard_filter"
:
0
,
"label"
:
"Show in Module Section"
,
"length"
:
0
,
"no_copy"
:
0
,
"oldfieldname"
:
"document_type"
,
...
...
@@ -197,35 +211,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"default"
:
"InnoDB"
,
"depends_on"
:
"eval:!doc.issingle"
,
"fieldname"
:
"engine"
,
"fieldtype"
:
"Select"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"label"
:
"Database Engine"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"InnoDB
\n
MyISAM"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -244,6 +230,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Icon"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -251,6 +238,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -269,6 +257,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Custom?"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -276,6 +265,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -294,6 +284,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Beta"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -302,6 +293,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -322,6 +314,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Image View"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -330,6 +323,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -348,6 +342,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Plugin"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -355,6 +350,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -373,6 +369,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Fields"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -381,6 +378,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -399,6 +397,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Fields"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -409,6 +408,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
1
,
"search_index"
:
0
,
...
...
@@ -427,6 +427,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Naming"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -434,6 +435,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -453,6 +455,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Auto Name"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -462,6 +465,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -480,6 +484,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Name Case"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -490,6 +495,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -508,6 +514,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Description"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -517,6 +524,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -536,12 +544,14 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -562,6 +572,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Title Field"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -569,6 +580,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -588,6 +600,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Search Fields"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -597,6 +610,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -616,6 +630,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Image Field"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -624,6 +639,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -645,6 +661,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Sort Field"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -652,6 +669,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -672,6 +690,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Sort Order"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -680,6 +699,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -700,6 +720,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Timeline Field"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -708,6 +729,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -727,6 +749,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Permission Rules"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -734,6 +757,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -753,6 +777,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Permissions"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -763,6 +788,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -782,12 +808,14 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -806,6 +834,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Permissions Settings"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -813,6 +842,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -831,6 +861,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"User Cannot Create"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -840,6 +871,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -858,6 +890,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"User Cannot Search"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -867,6 +900,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -885,6 +919,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Is Submittable"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -892,6 +927,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -911,6 +947,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Allow Import"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -918,6 +955,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -936,6 +974,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Allow Rename"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -945,6 +984,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -963,6 +1003,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"In Dialog"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -972,6 +1013,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -990,6 +1032,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Show Print First"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -999,6 +1042,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -1017,6 +1061,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Max Attachments"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -1026,6 +1071,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -1044,6 +1090,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Other Settings"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -1051,6 +1098,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -1069,6 +1117,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Hide Heading"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -1078,6 +1127,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -1096,6 +1146,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Hide Toolbar"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -1105,6 +1156,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -1123,6 +1175,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Hide Copy"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -1132,6 +1185,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -1150,6 +1204,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Track Seen"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -1158,6 +1213,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -1177,6 +1233,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Quick Entry"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -1185,6 +1242,7 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -1203,6 +1261,7 @@
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Default Print Format"
,
"length"
:
0
,
"no_copy"
:
0
,
...
...
@@ -1210,6 +1269,66 @@
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"fieldname"
:
"advanced"
,
"fieldtype"
:
"Section Break"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Advanced"
,
"length"
:
0
,
"no_copy"
:
0
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
"set_only_once"
:
0
,
"unique"
:
0
},
{
"allow_on_submit"
:
0
,
"bold"
:
0
,
"collapsible"
:
0
,
"columns"
:
0
,
"default"
:
"InnoDB"
,
"depends_on"
:
"eval:!doc.issingle"
,
"fieldname"
:
"engine"
,
"fieldtype"
:
"Select"
,
"hidden"
:
0
,
"ignore_user_permissions"
:
0
,
"ignore_xss_filter"
:
0
,
"in_filter"
:
0
,
"in_list_view"
:
0
,
"in_standard_filter"
:
0
,
"label"
:
"Database Engine"
,
"length"
:
0
,
"no_copy"
:
0
,
"options"
:
"InnoDB
\n
MyISAM"
,
"permlevel"
:
0
,
"precision"
:
""
,
"print_hide"
:
0
,
"print_hide_if_no_value"
:
0
,
"read_only"
:
0
,
"remember_last_selected_value"
:
0
,
"report_hide"
:
0
,
"reqd"
:
0
,
"search_index"
:
0
,
...
...
@@ -1219,7 +1338,7 @@
],
"hide_heading"
:
0
,
"hide_toolbar"
:
0
,
"icon"
:
"
icon
-bolt"
,
"icon"
:
"
fa fa
-bolt"
,
"idx"
:
6
,
"image_view"
:
0
,
"in_create"
:
0
,
...
...
@@ -1228,7 +1347,7 @@
"issingle"
:
0
,
"istable"
:
0
,
"max_attachments"
:
0
,
"modified"
:
"2016-1
0-13
01:1
3:58.133080
"
,
"modified"
:
"2016-1
1-08
01:1
7:33.593456
"
,
"modified_by"
:
"Administrator"
,
"module"
:
"Core"
,
"name"
:
"DocType"
,
...
...
This diff is collapsed.
Click to expand it.
frappe/core/doctype/doctype/doctype.py
View file @
f2bc961e
...
...
@@ -9,7 +9,7 @@ import frappe
from
frappe
import
_
from
frappe.utils
import
now
,
cint
from
frappe.model
import
no_value_fields
from
frappe.model
import
no_value_fields
,
default_fields
from
frappe.model.document
import
Document
from
frappe.custom.doctype.property_setter.property_setter
import
make_property_setter
from
frappe.desk.notifications
import
delete_notification_count_for
...
...
@@ -59,15 +59,47 @@ class DocType(Document):
self
.
make_amendable
()
self
.
validate_website
()
self
.
update_fields_to_fetch
()
def
check_developer_mode
(
self
):
"""Throw exception if not developer mode or via patch"""
if
frappe
.
flags
.
in_patch
:
if
frappe
.
flags
.
in_patch
or
frappe
.
flags
.
in_test
:
return
if
not
frappe
.
conf
.
get
(
"developer_mode"
)
and
not
self
.
custom
:
frappe
.
throw
(
_
(
"Not in Developer Mode! Set in site_config.json or make 'Custom' DocType."
))
def
update_fields_to_fetch
(
self
):
'''Update values for newly set fetch values'''
try
:
old_meta
=
frappe
.
get_meta
(
frappe
.
get_doc
(
'DocType'
,
self
.
name
),
cached
=
False
)
old_fields_to_fetch
=
[
df
.
fieldname
for
df
in
old_meta
.
get_fields_to_fetch
()]
except
frappe
.
DoesNotExistError
:
old_fields_to_fetch
=
[]
new_meta
=
frappe
.
get_meta
(
self
,
cached
=
False
)
if
set
(
old_fields_to_fetch
)
!=
set
([
df
.
fieldname
for
df
in
new_meta
.
get_fields_to_fetch
()]):
for
df
in
new_meta
.
get_fields_to_fetch
():
if
df
.
fieldname
not
in
old_fields_to_fetch
:
link_fieldname
,
source_fieldname
=
df
.
options
.
split
(
'.'
,
1
)
link_df
=
new_meta
.
get_field
(
link_fieldname
)
frappe
.
db
.
sql
(
'''update
`tab{link_doctype}` source,
`tab{doctype}` target
set
target.`{fieldname}` = source.`{source_fieldname}`
where
target.`{link_fieldname}` = source.name
and ifnull(target.`{fieldname}`, '')="" '''
.
format
(
link_doctype
=
link_df
.
options
,
source_fieldname
=
source_fieldname
,
doctype
=
self
.
name
,
fieldname
=
df
.
fieldname
,
link_fieldname
=
link_fieldname
))
def
validate_document_type
(
self
):
if
self
.
document_type
==
"Transaction"
:
self
.
document_type
=
"Document"
...
...
@@ -387,7 +419,6 @@ def validate_fields(meta):
if
not
meta
.
search_fields
:
return
fieldname_list
=
[
d
.
fieldname
for
d
in
fields
]
for
fieldname
in
(
meta
.
search_fields
or
""
).
split
(
","
):
fieldname
=
fieldname
.
strip
()
if
fieldname
not
in
fieldname_list
:
...
...
@@ -398,8 +429,6 @@ def validate_fields(meta):
if
not
meta
.
get
(
"title_field"
):
return
fieldname_list
=
[
d
.
fieldname
for
d
in
fields
]
if
meta
.
title_field
not
in
fieldname_list
:
frappe
.
throw
(
_
(
"Title field must be a valid fieldname"
),
InvalidFieldNameError
)
...
...
@@ -437,8 +466,6 @@ def validate_fields(meta):
if
not
meta
.
timeline_field
:
return
fieldname_list
=
[
d
.
fieldname
for
d
in
fields
]
if
meta
.
timeline_field
not
in
fieldname_list
:
frappe
.
throw
(
_
(
"Timeline field must be a valid fieldname"
),
InvalidFieldNameError
)
...
...
@@ -446,7 +473,22 @@ def validate_fields(meta):
if
df
.
fieldtype
not
in
(
"Link"
,
"Dynamic Link"
):
frappe
.
throw
(
_
(
"Timeline field must be a Link or Dynamic Link"
),
InvalidFieldNameError
)
def
check_sort_field
(
meta
):
'''Validate that sort_field(s) is a valid field'''
if
meta
.
sort_field
:
sort_fields
=
[
meta
.
sort_field
]
if
','
in
meta
.
sort_field
:
sort_fields
=
[
d
.
split
()[
0
]
for
d
in
meta
.
sort_field
.
split
(
','
)]
for
fieldname
in
sort_fields
:
if
not
fieldname
in
fieldname_list
+
list
(
default_fields
):
frappe
.
throw
(
_
(
"Sort field {0} must be a valid fieldname"
).
format
(
fieldname
),
InvalidFieldNameError
)
fields
=
meta
.
get
(
"fields"
)
fieldname_list
=
[
d
.
fieldname
for
d
in
fields
]
not_allowed_in_list_view
=
list
(
copy
.
copy
(
no_value_fields
))
if
meta
.
istable
:
not_allowed_in_list_view
.
remove
(
'Button'
)
...
...
@@ -470,6 +512,7 @@ def validate_fields(meta):
check_search_fields
(
meta
)
check_title_field
(
meta
)
check_timeline_field
(
meta
)
check_sort_field
(
meta
)
def
validate_permissions_for_doctype
(
doctype
,
for_remove
=
False
):
"""Validates if permissions are set correctly."""
...
...
This diff is collapsed.
Click to expand it.
frappe/core/doctype/error_log/error_log.json
View file @
f2bc961e
...
...
@@ -93,7 +93,7 @@
],
"hide_heading"
:
0
,
"hide_toolbar"
:
0
,
"icon"
:
"
icon
-warning-sign"
,
"icon"
:
"
fa fa
-warning-sign"
,
"idx"
:
1
,
"image_view"
:
0
,
"in_create"
:
0
,
...
...
This diff is collapsed.
Click to expand it.
frappe/core/doctype/error_log/error_log.py
View file @
f2bc961e
...
...
@@ -19,3 +19,9 @@ def set_old_logs_as_seen():
# clear old logs
frappe
.
db
.
sql
(
"""delete from `tabError Log` where datediff(curdate(), creation) > 30"""
)
@
frappe
.
whitelist
()
def
clear_error_logs
():
'''Flush all Error Logs'''
frappe
.
only_for
(
'System Manager'
)
frappe
.
db
.
sql
(
'''delete from `tabError Log`'''
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
frappe/core/doctype/error_log/error_log_list.js
View file @
f2bc961e
...
...
@@ -8,4 +8,14 @@ frappe.listview_settings['Error Log'] = {
}
},
order_by
:
"
seen asc, modified desc
"
,
onload
:
function
(
listview
)
{
listview
.
page
.
add_menu_item
(
__
(
"
Clear Error Logs
"
),
function
()
{
frappe
.
call
({
method
:
'
frappe.core.doctype.error_log.error_log.clear_error_logs
'
,
callback
:
function
()
{
listview
.
refresh
();
}
});
});
}
};
This diff is collapsed.
Click to expand it.
frappe/core/doctype/error_snapshot/error_snapshot.html
View file @
f2bc961e
...
...
@@ -62,7 +62,7 @@
</div>
<div
class=
"col-lg-1"
>
<span
class=
"btn btn-xs btn-default"
data-toggle=
"collapse"
data-target=
"#frame-{{ frameid }}-locals"
>
<i
class=
"
icon
-list-ul"
>
{{ __("Locals") }}
</i>
<i
class=
"
fa fa
-list-ul"
>
{{ __("Locals") }}
</i>
</span>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
…
25
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment