diff --git a/frappe/__init__.py b/frappe/__init__.py
index 5f68452f3c..ee84d8b785 100644
--- a/frappe/__init__.py
+++ b/frappe/__init__.py
@@ -318,7 +318,7 @@ def sendmail(recipients=(), sender="", subject="No Subject", message="No Message
as_markdown=False, bulk=False, 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, as_bulk=False, send_after=None, expose_recipients=False,
+ cc=(), show_as_cc=(), message_id=None, in_reply_to=None, as_bulk=False, send_after=None, expose_recipients=False,
bulk_priority=1):
"""Send email using user's default **Email Account** or global default **Email Account**.
@@ -337,6 +337,7 @@ def sendmail(recipients=(), sender="", subject="No Subject", message="No Message
:param attachments: List of attachments.
:param reply_to: Reply-To email id.
:param message_id: Used for threading. If a reply is received to this email, Message-Id is sent back as In-Reply-To in received email.
+ :param in_reply_to: Used to send the Message-Id of a received email back as In-Reply-To.
:param send_after: Send after the given datetime.
:param expose_recipients: Display all recipients in the footer message - "This email was sent to"
"""
@@ -347,18 +348,18 @@ def sendmail(recipients=(), sender="", subject="No Subject", message="No Message
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, send_after=send_after,
- expose_recipients=expose_recipients, bulk_priority=bulk_priority)
+ 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, bulk_priority=bulk_priority)
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)
+ cc=cc, message_id=message_id, in_reply_to=in_reply_to)
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)
+ cc=cc, message_id=message_id, in_reply_to=in_reply_to)
logger = None
whitelisted = []
diff --git a/frappe/__version__.py b/frappe/__version__.py
index 4e6731b58a..2057eea754 100644
--- a/frappe/__version__.py
+++ b/frappe/__version__.py
@@ -1,2 +1,2 @@
from __future__ import unicode_literals
-__version__ = "6.23.3"
+__version__ = "6.24.10"
diff --git a/frappe/core/doctype/communication/comment.py b/frappe/core/doctype/communication/comment.py
index 78f7b2ab67..589210918b 100644
--- a/frappe/core/doctype/communication/comment.py
+++ b/frappe/core/doctype/communication/comment.py
@@ -15,15 +15,8 @@ def validate_comment(doc):
if not (doc.communication_type=='Comment' and doc.reference_doctype and doc.reference_name):
return
- comment_count = frappe.db.sql("""select count(*) from `tabCommunication`
- where
- communication_type='Comment'
- and reference_doctype=%(reference_doctype)s
- and reference_name=%(reference_name)s""",
- {"reference_doctype": doc.reference_doctype, "reference_name": doc.reference_name})[0][0]
-
- if comment_count >= 50:
- frappe.throw(_("Cannot add more than 50 comments"))
+ if doc.comment_type=="Comment" and "" not in doc.content:
+ doc.content += '\n'
def on_trash(doc):
if doc.communication_type != "Comment":
diff --git a/frappe/core/doctype/communication/communication.json b/frappe/core/doctype/communication/communication.json
index 4fab1d0e52..b2177277f3 100644
--- a/frappe/core/doctype/communication/communication.json
+++ b/frappe/core/doctype/communication/communication.json
@@ -1,955 +1,994 @@
{
- "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": "",
+ "creation": "2013-01-29 10:47:14",
+ "custom": 0,
+ "description": "Keep a track of all communications",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Setup",
"fields": [
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "subject",
- "fieldtype": "Small Text",
- "hidden": 0,
- "ignore_user_permissions": 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,
+ "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,
- "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,
+ "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,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Type",
- "length": 0,
- "no_copy": 0,
- "options": "\nEmail\nChat\nPhone\nSMS\nVisit\nOther",
- "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,
+ "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": "\nEmail\nChat\nPhone\nSMS\nVisit\nOther",
+ "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,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "From",
- "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,
+ "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,
- "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,
+ "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": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "To",
- "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,
+ "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": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "CC",
- "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,
+ "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,
- "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,
+ "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,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Delivery Status",
- "length": 0,
- "no_copy": 0,
- "options": "\nSent\nBounced\nOpened\nMarked As Spam\nRejected\nDelayed\nSoft-Bounced\nClicked\nRecipient Unsubscribed",
- "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,
+ "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": "\nSent\nBounced\nOpened\nMarked As Spam\nRejected\nDelayed\nSoft-Bounced\nClicked\nRecipient Unsubscribed",
+ "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,
- "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,
+ "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,
- "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,
+ "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,
"width": "400"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "fieldname": "status_section",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 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,
+ "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,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Communication Type",
- "length": 0,
- "no_copy": 0,
- "options": "Communication\nComment\nChat\nNotification",
- "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,
+ "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\nComment\nChat\nNotification",
+ "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,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Comment Type",
- "length": 0,
- "no_copy": 0,
- "options": "\nComment\nLike\nInfo\nLabel\nWorkflow\nCreated\nUpdated\nSubmitted\nCancelled\nDeleted\nAssigned\nAssignment Completed\nAttachment\nAttachment Removed\nShared\nUnshared",
- "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,
+ "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": "\nComment\nLike\nInfo\nLabel\nWorkflow\nCreated\nUpdated\nSubmitted\nCancelled\nDeleted\nAssigned\nAssignment Completed\nAttachment\nAttachment Removed\nShared\nUnshared",
+ "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,
- "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,
+ "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,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Status",
- "length": 0,
- "no_copy": 0,
- "options": "Open\nReplied\nClosed\nLinked",
- "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,
+ "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\nReplied\nClosed\nLinked",
+ "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,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Sent or Received",
- "length": 0,
- "no_copy": 0,
- "options": "Sent\nReceived",
- "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,
+ "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\nReceived",
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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": 0,
- "set_only_once": 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": 0,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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,
+ "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,
- "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": 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,
"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-02-13 06:39:17.516884",
- "modified_by": "Administrator",
- "module": "Core",
- "name": "Communication",
- "owner": "Administrator",
+ ],
+ "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-02-25 04:48:34.595179",
+ "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,
+ "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,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "All",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
"write": 1
}
- ],
- "read_only": 0,
- "read_only_onload": 0,
- "search_fields": "subject",
- "sort_order": "DESC",
+ ],
+ "read_only": 0,
+ "read_only_onload": 0,
+ "search_fields": "subject",
+ "sort_order": "DESC",
"title_field": "subject"
-}
+}
\ No newline at end of file
diff --git a/frappe/core/doctype/docfield/docfield.json b/frappe/core/doctype/docfield/docfield.json
index f53ebdda47..9d81c082c0 100644
--- a/frappe/core/doctype/docfield/docfield.json
+++ b/frappe/core/doctype/docfield/docfield.json
@@ -16,6 +16,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "",
@@ -39,6 +40,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Label",
@@ -67,6 +69,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Type",
@@ -93,6 +96,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Name",
@@ -118,6 +122,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Mandatory",
@@ -147,6 +152,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Precision",
@@ -172,6 +178,7 @@
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Length",
@@ -196,6 +203,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Index",
@@ -223,6 +231,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "In List View",
@@ -248,6 +257,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Bold",
@@ -273,6 +283,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Collapsible",
@@ -295,9 +306,10 @@
"collapsible": 0,
"depends_on": "eval:doc.fieldtype==\"Section Break\"",
"fieldname": "collapsible_depends_on",
- "fieldtype": "Small Text",
+ "fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Collapsible Depends On",
@@ -322,6 +334,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -345,6 +358,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Options",
@@ -370,6 +384,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Default",
@@ -395,6 +410,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Permissions",
@@ -415,9 +431,10 @@
"bold": 0,
"collapsible": 0,
"fieldname": "depends_on",
- "fieldtype": "Small Text",
+ "fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Depends On",
@@ -443,6 +460,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Hidden",
@@ -470,6 +488,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Read Only",
@@ -495,6 +514,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Unique",
@@ -520,6 +540,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Set Only Once",
@@ -543,6 +564,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -566,6 +588,7 @@
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Perm Level",
@@ -594,6 +617,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Ignore User Permissions",
@@ -617,6 +641,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Allow on Submit",
@@ -644,6 +669,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Report Hide",
@@ -663,6 +689,32 @@
"unique": 0,
"width": "50px"
},
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "Don't HTML Encode HTML tags like <script> or just characters like < or >, as they could be intentionally used in this field",
+ "fieldname": "ignore_xss_filter",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Ignore XSS 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,
@@ -671,6 +723,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Display",
@@ -694,6 +747,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "In Filter",
@@ -721,6 +775,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "No Copy",
@@ -748,6 +803,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Hide",
@@ -776,6 +832,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Hide If No Value",
@@ -800,6 +857,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Width",
@@ -823,6 +881,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Width",
@@ -850,6 +909,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -872,6 +932,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Description",
@@ -899,6 +960,7 @@
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -923,6 +985,7 @@
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -949,12 +1012,13 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2015-11-24 02:28:08.985496",
+ "modified": "2016-02-22 09:08:47.112186",
"modified_by": "Administrator",
"module": "Core",
"name": "DocField",
"owner": "Administrator",
"permissions": [],
"read_only": 0,
- "read_only_onload": 0
+ "read_only_onload": 0,
+ "sort_order": "ASC"
}
\ No newline at end of file
diff --git a/frappe/core/doctype/docperm/docperm.json b/frappe/core/doctype/docperm/docperm.json
index c8085aa8fb..7b4be6800c 100644
--- a/frappe/core/doctype/docperm/docperm.json
+++ b/frappe/core/doctype/docperm/docperm.json
@@ -16,6 +16,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Role and Level",
@@ -23,6 +24,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -38,6 +40,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Role",
@@ -48,6 +51,7 @@
"options": "Role",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 0,
"report_hide": 0,
@@ -66,6 +70,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Apply User Permissions",
@@ -73,6 +78,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -89,6 +95,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "If user is the owner",
@@ -97,6 +104,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -112,12 +120,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,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -134,6 +144,7 @@
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Level",
@@ -143,6 +154,7 @@
"oldfieldtype": "Int",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"print_width": "40px",
"read_only": 0,
"report_hide": 0,
@@ -159,9 +171,10 @@
"depends_on": "",
"description": "JSON list of DocTypes used to apply User Permissions. If empty, all linked DocTypes will be used to apply User Permissions.",
"fieldname": "user_permission_doctypes",
- "fieldtype": "Text",
+ "fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "User Permission DocTypes",
@@ -169,6 +182,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -184,6 +198,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Permissions",
@@ -191,6 +206,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -207,6 +223,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Read",
@@ -216,6 +233,7 @@
"oldfieldtype": "Check",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"print_width": "32px",
"read_only": 0,
"report_hide": 0,
@@ -234,6 +252,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Write",
@@ -243,6 +262,7 @@
"oldfieldtype": "Check",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"print_width": "32px",
"read_only": 0,
"report_hide": 0,
@@ -261,6 +281,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Create",
@@ -270,6 +291,7 @@
"oldfieldtype": "Check",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"print_width": "32px",
"read_only": 0,
"report_hide": 0,
@@ -288,6 +310,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Delete",
@@ -295,6 +318,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -310,12 +334,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,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -331,6 +357,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Submit",
@@ -340,6 +367,7 @@
"oldfieldtype": "Check",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"print_width": "32px",
"read_only": 0,
"report_hide": 0,
@@ -357,6 +385,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Cancel",
@@ -366,6 +395,7 @@
"oldfieldtype": "Check",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"print_width": "32px",
"read_only": 0,
"report_hide": 0,
@@ -383,6 +413,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Amend",
@@ -392,6 +423,7 @@
"oldfieldtype": "Check",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"print_width": "32px",
"read_only": 0,
"report_hide": 0,
@@ -409,6 +441,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Permissions",
@@ -416,6 +449,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -432,6 +466,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Report",
@@ -439,6 +474,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"print_width": "32px",
"read_only": 0,
"report_hide": 0,
@@ -457,6 +493,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Export",
@@ -464,6 +501,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -479,6 +517,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Import",
@@ -486,6 +525,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -502,6 +542,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Set User Permissions",
@@ -509,6 +550,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -524,12 +566,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,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -546,6 +590,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Share",
@@ -554,6 +599,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -570,6 +616,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print",
@@ -577,6 +624,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -593,6 +641,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Email",
@@ -600,6 +649,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -617,7 +667,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:45.429411",
+ "modified": "2016-02-22 09:18:14.138259",
"modified_by": "Administrator",
"module": "Core",
"name": "DocPerm",
diff --git a/frappe/core/doctype/error_snapshot/error_snapshot.json b/frappe/core/doctype/error_snapshot/error_snapshot.json
index b9dd81387b..e7dd851b2d 100644
--- a/frappe/core/doctype/error_snapshot/error_snapshot.json
+++ b/frappe/core/doctype/error_snapshot/error_snapshot.json
@@ -16,6 +16,7 @@
"fieldtype": "HTML",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Snapshot View",
@@ -40,6 +41,7 @@
"fieldtype": "Check",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Seen",
@@ -61,9 +63,10 @@
"bold": 0,
"collapsible": 0,
"fieldname": "evalue",
- "fieldtype": "Small Text",
+ "fieldtype": "Code",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Friendly Title",
@@ -88,6 +91,7 @@
"fieldtype": "Datetime",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Timestamp",
@@ -113,6 +117,7 @@
"fieldtype": "Int",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Relapses",
@@ -137,6 +142,7 @@
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Exception Type",
@@ -158,9 +164,10 @@
"bold": 0,
"collapsible": 0,
"fieldname": "traceback",
- "fieldtype": "Small Text",
+ "fieldtype": "Code",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Traceback",
@@ -185,6 +192,7 @@
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Parent Error Snapshot",
@@ -207,9 +215,10 @@
"bold": 0,
"collapsible": 0,
"fieldname": "pyver",
- "fieldtype": "Small Text",
+ "fieldtype": "Code",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Pyver",
@@ -231,9 +240,10 @@
"bold": 0,
"collapsible": 0,
"fieldname": "exception",
- "fieldtype": "Small Text",
+ "fieldtype": "Code",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Exception",
@@ -255,9 +265,10 @@
"bold": 0,
"collapsible": 0,
"fieldname": "locals",
- "fieldtype": "Text",
+ "fieldtype": "Code",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Locals",
@@ -279,9 +290,10 @@
"bold": 0,
"collapsible": 0,
"fieldname": "frames",
- "fieldtype": "Text",
+ "fieldtype": "Code",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Frames",
@@ -308,7 +320,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-12-28 00:44:30.751680",
+ "modified": "2016-02-22 09:23:46.208471",
"modified_by": "Administrator",
"module": "Core",
"name": "Error Snapshot",
diff --git a/frappe/core/doctype/file/file.json b/frappe/core/doctype/file/file.json
index 7c7b2a0a2a..7ad3426de3 100644
--- a/frappe/core/doctype/file/file.json
+++ b/frappe/core/doctype/file/file.json
@@ -16,6 +16,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "File Name",
@@ -42,6 +43,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Private",
@@ -66,6 +68,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Preview",
@@ -90,6 +93,7 @@
"fieldtype": "HTML",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Preview HTML",
@@ -114,6 +118,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -138,6 +143,7 @@
"fieldtype": "Check",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Home Folder",
@@ -162,6 +168,7 @@
"fieldtype": "Check",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Attachments Folder",
@@ -186,6 +193,7 @@
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "File Size",
@@ -209,6 +217,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -230,9 +239,10 @@
"collapsible": 0,
"depends_on": "eval:!doc.is_folder",
"fieldname": "file_url",
- "fieldtype": "Small Text",
+ "fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "File URL",
@@ -256,6 +266,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Thumbnail URL",
@@ -280,6 +291,7 @@
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Folder",
@@ -305,6 +317,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Folder",
@@ -330,6 +343,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -353,6 +367,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Attached To DocType",
@@ -377,6 +392,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -400,6 +416,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Attached To Name",
@@ -423,6 +440,7 @@
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Content Hash",
@@ -446,6 +464,7 @@
"fieldtype": "Int",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "lft",
@@ -470,6 +489,7 @@
"fieldtype": "Int",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "rgt",
@@ -494,6 +514,7 @@
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "old_parent",
@@ -522,7 +543,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2015-12-08 05:03:48.767257",
+ "modified": "2016-02-22 09:23:59.892258",
"modified_by": "Administrator",
"module": "Core",
"name": "File",
diff --git a/frappe/core/doctype/patch_log/patch_log.js b/frappe/core/doctype/patch_log/patch_log.js
new file mode 100644
index 0000000000..0080584a29
--- /dev/null
+++ b/frappe/core/doctype/patch_log/patch_log.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.ui.form.on('Patch Log', {
+ refresh: function(frm) {
+
+ }
+});
diff --git a/frappe/core/doctype/patch_log/patch_log.json b/frappe/core/doctype/patch_log/patch_log.json
index 96a0e4fff8..edbd03bceb 100644
--- a/frappe/core/doctype/patch_log/patch_log.json
+++ b/frappe/core/doctype/patch_log/patch_log.json
@@ -15,9 +15,10 @@
"bold": 0,
"collapsible": 0,
"fieldname": "patch",
- "fieldtype": "Small Text",
+ "fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Patch",
@@ -25,6 +26,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -43,7 +45,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:51.487656",
+ "modified": "2016-02-22 09:31:31.854246",
"modified_by": "Administrator",
"module": "Core",
"name": "Patch Log",
diff --git a/frappe/core/doctype/report/report.json b/frappe/core/doctype/report/report.json
index ffe98701f0..4d40a60899 100644
--- a/frappe/core/doctype/report/report.json
+++ b/frappe/core/doctype/report/report.json
@@ -17,6 +17,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Report Name",
@@ -24,6 +25,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -39,6 +41,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Ref DocType",
@@ -47,6 +50,7 @@
"options": "DocType",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -62,6 +66,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Is Standard",
@@ -70,6 +75,7 @@
"options": "No\nYes",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -85,6 +91,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Module",
@@ -93,6 +100,7 @@
"options": "Module Def",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -108,6 +116,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Add Total Row",
@@ -115,6 +124,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -130,12 +140,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,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -151,6 +163,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Report Type",
@@ -159,6 +172,7 @@
"options": "Report Builder\nQuery Report\nScript Report",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -174,6 +188,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Disabled",
@@ -181,6 +196,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -198,6 +214,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Apply User Permissions",
@@ -205,6 +222,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -220,12 +238,14 @@
"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,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -242,6 +262,7 @@
"fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Query",
@@ -249,6 +270,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -266,6 +288,7 @@
"fieldtype": "Code",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Javascript",
@@ -273,6 +296,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -286,9 +310,10 @@
"collapsible": 0,
"depends_on": "eval:doc.report_type==\"Report Builder\"",
"fieldname": "json",
- "fieldtype": "Text",
+ "fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "JSON",
@@ -296,6 +321,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -314,7 +340,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:55.357855",
+ "modified": "2016-02-22 09:14:41.050580",
"modified_by": "Administrator",
"module": "Core",
"name": "Report",
diff --git a/frappe/core/doctype/scheduler_log/scheduler_log.js b/frappe/core/doctype/scheduler_log/scheduler_log.js
new file mode 100644
index 0000000000..ac3b026934
--- /dev/null
+++ b/frappe/core/doctype/scheduler_log/scheduler_log.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.ui.form.on('Scheduler Log', {
+ refresh: function(frm) {
+
+ }
+});
diff --git a/frappe/core/doctype/scheduler_log/scheduler_log.json b/frappe/core/doctype/scheduler_log/scheduler_log.json
index 7582bb8960..fb94e75991 100644
--- a/frappe/core/doctype/scheduler_log/scheduler_log.json
+++ b/frappe/core/doctype/scheduler_log/scheduler_log.json
@@ -19,6 +19,7 @@
"fieldtype": "Check",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Seen",
@@ -27,6 +28,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -42,6 +44,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Method",
@@ -49,6 +52,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -61,9 +65,10 @@
"bold": 0,
"collapsible": 0,
"fieldname": "error",
- "fieldtype": "Text",
+ "fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Error",
@@ -71,6 +76,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -89,7 +95,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:57.440897",
+ "modified": "2016-02-22 09:35:31.852571",
"modified_by": "Administrator",
"module": "Core",
"name": "Scheduler Log",
diff --git a/frappe/core/doctype/version/version.json b/frappe/core/doctype/version/version.json
index a86578db39..ba9a975797 100644
--- a/frappe/core/doctype/version/version.json
+++ b/frappe/core/doctype/version/version.json
@@ -17,6 +17,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Ref DocType",
@@ -25,6 +26,7 @@
"options": "DocType",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -40,6 +42,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Docname",
@@ -47,6 +50,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -62,6 +66,7 @@
"fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Doclist JSON",
@@ -69,6 +74,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -87,7 +93,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:30:00.036254",
+ "modified": "2016-02-22 07:59:43.968145",
"modified_by": "Administrator",
"module": "Core",
"name": "Version",
@@ -115,5 +121,6 @@
}
],
"read_only": 0,
- "read_only_onload": 0
+ "read_only_onload": 0,
+ "sort_order": "ASC"
}
\ No newline at end of file
diff --git a/frappe/custom/doctype/custom_field/custom_field.json b/frappe/custom/doctype/custom_field/custom_field.json
index e7bb910d58..6b320b6c68 100644
--- a/frappe/custom/doctype/custom_field/custom_field.json
+++ b/frappe/custom/doctype/custom_field/custom_field.json
@@ -7,6 +7,7 @@
"description": "Adds a custom field to a DocType",
"docstatus": 0,
"doctype": "DocType",
+ "document_type": "Setup",
"fields": [
{
"allow_on_submit": 0,
@@ -16,6 +17,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Document",
@@ -42,6 +44,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Label",
@@ -67,6 +70,7 @@
"fieldtype": "HTML",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Label Help",
@@ -91,6 +95,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Fieldname",
@@ -118,6 +123,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Insert After",
@@ -143,6 +149,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -167,6 +174,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Field Type",
@@ -195,6 +203,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Precision",
@@ -220,6 +229,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Options",
@@ -245,6 +255,7 @@
"fieldtype": "HTML",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Options Help",
@@ -269,6 +280,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -293,6 +305,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Collapsible",
@@ -315,9 +328,10 @@
"collapsible": 0,
"depends_on": "eval:doc.fieldtype==\"Section Break\"",
"fieldname": "collapsible_depends_on",
- "fieldtype": "Data",
+ "fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Collapsible Depends On",
@@ -342,6 +356,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Default Value",
@@ -364,9 +379,10 @@
"bold": 0,
"collapsible": 0,
"fieldname": "depends_on",
- "fieldtype": "Small Text",
+ "fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Depends On",
@@ -390,6 +406,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Field Description",
@@ -418,6 +435,7 @@
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Permission Level",
@@ -443,6 +461,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Width",
@@ -468,6 +487,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "",
@@ -494,6 +514,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Is Mandatory Field",
@@ -519,6 +540,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Unique",
@@ -543,6 +565,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Read Only",
@@ -567,6 +590,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Ignore User Permissions",
@@ -590,6 +614,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Hidden",
@@ -613,6 +638,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Hide",
@@ -639,6 +665,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Hide If No Value",
@@ -663,6 +690,7 @@
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Width",
@@ -686,6 +714,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "No Copy",
@@ -711,6 +740,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Allow on Submit",
@@ -736,6 +766,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "In Report Filter",
@@ -761,6 +792,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "In List View",
@@ -784,6 +816,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Report Hide",
@@ -809,6 +842,7 @@
"fieldtype": "Check",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Index",
@@ -823,6 +857,32 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "Don't HTML Encode HTML tags like <script> or just characters like < or >, as they could be intentionally used in this field",
+ "fieldname": "ignore_xss_filter",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Ignore XSS 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
}
],
"hide_heading": 0,
@@ -835,7 +895,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-01-25 04:54:05.700031",
+ "modified": "2016-02-22 09:11:06.796094",
"modified_by": "Administrator",
"module": "Custom",
"name": "Custom Field",
diff --git a/frappe/custom/doctype/customize_form_field/customize_form_field.json b/frappe/custom/doctype/customize_form_field/customize_form_field.json
index 0c332c2ddf..27d3ff8600 100644
--- a/frappe/custom/doctype/customize_form_field/customize_form_field.json
+++ b/frappe/custom/doctype/customize_form_field/customize_form_field.json
@@ -7,6 +7,7 @@
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
+ "document_type": "Setup",
"fields": [
{
"allow_on_submit": 0,
@@ -16,6 +17,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Label and Type",
@@ -40,6 +42,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Label",
@@ -66,6 +69,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Type",
@@ -92,6 +96,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Name",
@@ -117,6 +122,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mandatory",
@@ -144,6 +150,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Unique",
@@ -168,6 +175,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "In List View",
@@ -191,6 +199,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -216,6 +225,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Precision",
@@ -242,6 +252,7 @@
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Length",
@@ -267,6 +278,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Options",
@@ -292,6 +304,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Permissions",
@@ -312,11 +325,12 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "description": "This field will appear only if the fieldname defined here has value OR the rules are true (examples): \nmyfield\neval:doc.myfield=='My Value'\neval:doc.age>18",
+ "description": "This field will appear only if the fieldname defined here has value OR the rules are true (examples): \nmyfield\neval:doc.myfield=='My Value'\neval:doc.age>18",
"fieldname": "depends_on",
- "fieldtype": "Data",
+ "fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Depends On",
@@ -343,6 +357,7 @@
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Perm Level",
@@ -368,6 +383,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Hidden",
@@ -395,6 +411,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Read Only",
@@ -420,6 +437,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Collapsible",
@@ -442,9 +460,10 @@
"collapsible": 0,
"depends_on": "eval:doc.fieldtype==\"Section Break\"",
"fieldname": "collapsible_depends_on",
- "fieldtype": "Data",
+ "fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Collapsible Depends On",
@@ -469,6 +488,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -492,6 +512,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Ignore User Permissions",
@@ -515,6 +536,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Allow on Submit",
@@ -540,6 +562,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Report Hide",
@@ -565,6 +588,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Display",
@@ -589,6 +613,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Default",
@@ -614,6 +639,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "In Filter",
@@ -641,6 +667,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -664,6 +691,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Description",
@@ -691,6 +719,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Hide",
@@ -717,6 +746,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Hide If No Value",
@@ -742,6 +772,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Width",
@@ -767,6 +798,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Width",
@@ -794,6 +826,7 @@
"fieldtype": "Check",
"hidden": 1,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Custom Field",
@@ -820,7 +853,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2015-11-24 02:27:50.426961",
+ "modified": "2016-02-22 09:11:53.773635",
"modified_by": "Administrator",
"module": "Custom",
"name": "Customize Form Field",
diff --git a/frappe/data/app_listing/erpnext_shopify.json b/frappe/data/app_listing/erpnext_shopify.json
index 3eb6584ec2..88db8f6494 100644
--- a/frappe/data/app_listing/erpnext_shopify.json
+++ b/frappe/data/app_listing/erpnext_shopify.json
@@ -9,5 +9,6 @@
"repo_url": "https://github.com/frappe/erpnext_shopify.git",
"app_title": "ERPNext Shopify",
"app_version": "1.0.0",
- "app_category": "Integrations"
+ "app_category": "Integrations",
+ "featured": 1
}
diff --git a/frappe/data/app_listing/paypal_integration.json b/frappe/data/app_listing/paypal_integration.json
new file mode 100644
index 0000000000..937e915c0c
--- /dev/null
+++ b/frappe/data/app_listing/paypal_integration.json
@@ -0,0 +1,14 @@
+{
+ "app_url": "https://frappe.github.io/paypal_integration",
+ "app_name": "paypal_integration",
+ "app_icon": "octicon octicon-credit-card",
+ "app_color": "#179bd7",
+ "app_description": "Accept Payment via PayPal",
+ "app_publisher": "Frappe",
+ "app_email": "hello@frappe.io",
+ "repo_url": "https://github.com/frappe/paypal_integration.git",
+ "app_title": "Paypal Integation",
+ "app_version": "1.0.0",
+ "app_category": "Integrations",
+ "featured": 1
+}
diff --git a/frappe/desk/form/load.py b/frappe/desk/form/load.py
index b8971079cd..fcc4859e42 100644
--- a/frappe/desk/form/load.py
+++ b/frappe/desk/form/load.py
@@ -147,6 +147,9 @@ def _get_communications(doctype, name, start=0, limit=20):
"attached_to_name": c.name}
))
+ elif c.communication_type=="Comment" and c.comment_type=="Comment":
+ c.content = frappe.utils.markdown(c.content)
+
return communications
def get_assignments(dt, dn):
diff --git a/frappe/desk/notifications.py b/frappe/desk/notifications.py
index 247c45cd94..c4910175bb 100644
--- a/frappe/desk/notifications.py
+++ b/frappe/desk/notifications.py
@@ -68,7 +68,8 @@ def get_notifications_for(notification_type, config, notification_count):
frappe.cache().hset("notification_count:" + m, frappe.session.user, open_count[m])
except frappe.PermissionError:
- frappe.msgprint("Permission Error in notifications for {0}".format(m))
+ pass
+ # frappe.msgprint("Permission Error in notifications for {0}".format(m))
return open_count
@@ -92,7 +93,8 @@ def get_notifications_for_doctypes(config, notification_count):
result = frappe.get_attr(condition)()
except frappe.PermissionError:
- frappe.msgprint("Permission Error in notifications for {0}".format(d))
+ pass
+ # frappe.msgprint("Permission Error in notifications for {0}".format(d))
except Exception, e:
# OperationalError: (1412, 'Table definition has changed, please retry transaction')
diff --git a/frappe/desk/page/setup_wizard/setup_wizard.js b/frappe/desk/page/setup_wizard/setup_wizard.js
index a56091459d..bd649c7762 100644
--- a/frappe/desk/page/setup_wizard/setup_wizard.js
+++ b/frappe/desk/page/setup_wizard/setup_wizard.js
@@ -4,6 +4,7 @@ frappe.provide("frappe.wiz.events");
frappe.wiz = {
slides: [],
events: {},
+ remove_app_slides: [],
on: function(event, fn) {
if(!frappe.wiz.events[event]) {
frappe.wiz.events[event] = [];
@@ -13,6 +14,7 @@ frappe.wiz = {
add_slide: function(slide) {
frappe.wiz.slides.push(slide);
},
+
run_event: function(event) {
$.each(frappe.wiz.events[event] || [], function(i, fn) {
fn(frappe.wiz.wizard);
@@ -32,7 +34,7 @@ frappe.pages['setup-wizard'].on_page_load = function(wrapper) {
});
frappe.wiz.run_event("before_load");
-
+
var wizard_settings = {
page_name: "setup-wizard",
parent: wrapper,
@@ -237,6 +239,7 @@ function load_frappe_slides() {
// language selection
frappe.wiz.welcome = {
name: "welcome",
+ app_name: "frappe",
title: __("Welcome"),
icon: "icon-world",
help: __("Let's prepare the system for first use."),
@@ -299,6 +302,18 @@ function load_frappe_slides() {
// reset all slides so that labels are translated
frappe.wiz.slides = [];
frappe.wiz.run_event("before_load");
+
+ // remove slides listed in remove_app_slides
+ for (var app in frappe.wiz.remove_app_slides) {
+ var new_slides = []
+ for (var i in frappe.wiz.slides) {
+ if (frappe.wiz.slides[i].app_name != frappe.wiz.remove_app_slides[app]) {
+ new_slides.push(frappe.wiz.slides[i]);
+ }
+ }
+ frappe.wiz.slides = new_slides;
+ }
+
frappe.wiz.wizard.slides = frappe.wiz.slides;
frappe.wiz.run_event("after_load");
@@ -315,10 +330,11 @@ function load_frappe_slides() {
});
});
}
- }
+ },
// region selection
frappe.wiz.region = {
+ app_name: "frappe",
title: __("Region"),
icon: "icon-flag",
help: __("Select your Country, Time Zone and Currency"),
@@ -404,6 +420,44 @@ function load_frappe_slides() {
});
});
}
+ },
+
+
+ frappe.wiz.user= {
+ app_name: "frappe",
+ title: __("The First User: You"),
+ icon: "icon-user",
+ fields: [
+ {"fieldname": "first_name", "label": __("First Name"), "fieldtype": "Data",
+ reqd:1},
+ {"fieldname": "last_name", "label": __("Last Name"), "fieldtype": "Data"},
+ {"fieldname": "email", "label": __("Email Address"), "fieldtype": "Data",
+ reqd:1, "description": __("You will use it to Login"), "options":"Email"},
+ {"fieldname": "password", "label": __("Password"), "fieldtype": "Password",
+ reqd:1},
+ {fieldtype:"Attach Image", fieldname:"attach_user",
+ label: __("Attach Your Picture"), is_private: 0},
+ ],
+ help: __('The first user will become the System Manager (you can change this later).'),
+ onload: function(slide) {
+ if(user!=="Administrator") {
+ slide.form.fields_dict.password.$wrapper.toggle(false);
+ slide.form.fields_dict.email.$wrapper.toggle(false);
+ slide.form.fields_dict.first_name.set_input(frappe.boot.user.first_name);
+ slide.form.fields_dict.last_name.set_input(frappe.boot.user.last_name);
+
+ var user_image = frappe.get_cookie("user_image");
+ if(user_image) {
+ var $attach_user = slide.form.fields_dict.attach_user.$wrapper;
+ $attach_user.find(".missing-image").toggle(false);
+ $attach_user.find("img").attr("src", decodeURIComponent(user_image)).toggle(true);
+ }
+
+ delete slide.form.fields_dict.email;
+ delete slide.form.fields_dict.password;
+ }
+ },
+ css_class: "single-column"
};
};
@@ -413,4 +467,5 @@ frappe.wiz.on("before_load", function() {
// add welcome slide
frappe.wiz.add_slide(frappe.wiz.welcome);
frappe.wiz.add_slide(frappe.wiz.region);
+ frappe.wiz.add_slide(frappe.wiz.user);
});
diff --git a/frappe/desk/page/setup_wizard/setup_wizard.py b/frappe/desk/page/setup_wizard/setup_wizard.py
index 53c6b15826..bf0b94795d 100644
--- a/frappe/desk/page/setup_wizard/setup_wizard.py
+++ b/frappe/desk/page/setup_wizard/setup_wizard.py
@@ -8,6 +8,7 @@ from frappe.utils import strip
from frappe.translate import (set_default_language, get_dict,
get_lang_dict, send_translations, get_language_from_code)
from frappe.geo.country_info import get_country_info
+from frappe.utils.file_manager import save_file
@frappe.whitelist()
def setup_complete(args):
@@ -23,6 +24,7 @@ def setup_complete(args):
# update system settings
update_system_settings(args)
+ update_user_name(args)
for method in frappe.get_hooks("setup_wizard_complete"):
frappe.get_attr(method)(args)
@@ -63,6 +65,41 @@ def update_system_settings(args):
})
system_settings.save()
+def update_user_name(args):
+ if args.get("email"):
+ args['name'] = args.get("email")
+
+ _mute_emails, frappe.flags.mute_emails = frappe.flags.mute_emails, True
+ doc = frappe.get_doc({
+ "doctype":"User",
+ "email": args.get("email"),
+ "first_name": args.get("first_name"),
+ "last_name": args.get("last_name")
+ })
+ doc.flags.no_welcome_mail = True
+ doc.insert()
+ frappe.flags.mute_emails = _mute_emails
+ from frappe.auth import _update_password
+ _update_password(args.get("email"), args.get("password"))
+
+ else:
+ args['name'] = frappe.session.user
+
+ # Update User
+ if not args.get('last_name') or args.get('last_name')=='None':
+ args['last_name'] = None
+ frappe.db.sql("""update `tabUser` SET first_name=%(first_name)s,
+ last_name=%(last_name)s WHERE name=%(name)s""", args)
+
+ if args.get("attach_user"):
+ attach_user = args.get("attach_user").split(",")
+ if len(attach_user)==3:
+ filename, filetype, content = attach_user
+ fileurl = save_file(filename, content, "User", args.get("name"), decode=True).file_url
+ frappe.db.set_value("User", args.get("name"), "user_image", fileurl)
+
+ add_all_roles_to(args.get("name"))
+
def process_args(args):
if not args:
args = frappe.local.form_dict
@@ -78,6 +115,14 @@ def process_args(args):
return args
+def add_all_roles_to(name):
+ user = frappe.get_doc("User", name)
+ for role in frappe.db.sql("""select name from tabRole"""):
+ if role[0] not in ["Administrator", "Guest", "All", "Customer", "Supplier", "Partner", "Employee"]:
+ d = user.append("user_roles")
+ d.role = role[0]
+ user.save()
+
@frappe.whitelist()
def load_messages(language):
"""Load translation messages for given langauge from all `setup_wizard_requires`
diff --git a/frappe/desk/query_report.py b/frappe/desk/query_report.py
index 5e12a26a30..d5a2291c19 100644
--- a/frappe/desk/query_report.py
+++ b/frappe/desk/query_report.py
@@ -8,7 +8,7 @@ import os, json
from frappe import _
from frappe.modules import scrub, get_module_path
-from frappe.utils import flt, cint, get_html_format
+from frappe.utils import flt, cint, get_html_format, cstr
from frappe.translate import send_translations
import frappe.desk.reportview
from frappe.permissions import get_role_permissions
@@ -80,7 +80,7 @@ def run(report_name, filters=()):
frappe.msgprint(_("Query must be a SELECT"), raise_exception=True)
result = [list(t) for t in frappe.db.sql(report.query, filters)]
- columns = [c[0] for c in frappe.db.get_description()]
+ columns = [cstr(c[0]) for c in frappe.db.get_description()]
else:
module = report.module or frappe.db.get_value("DocType", report.ref_doctype, "module")
if report.is_standard=="Yes":
@@ -242,11 +242,11 @@ def get_linked_doctypes(columns, data):
row = enumerate(row)
elif isinstance(row, dict):
row = row.items()
-
+
for col, val in row:
if val and col not in columns_with_value:
columns_with_value.append(col)
-
+
for doctype, key in linked_doctypes.items():
if key not in columns_with_value:
del linked_doctypes[doctype]
diff --git a/frappe/docs/user/guides/.txt b/frappe/docs/user/en/guides/.txt
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/.txt
rename to frappe/docs/user/en/guides/.txt
diff --git a/frappe/docs/user/guides/app-development/adding-module-icons-on-desktop.md b/frappe/docs/user/en/guides/app-development/adding-module-icons-on-desktop.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/adding-module-icons-on-desktop.md
rename to frappe/docs/user/en/guides/app-development/adding-module-icons-on-desktop.md
diff --git a/frappe/docs/user/guides/app-development/custom-module-icon.md b/frappe/docs/user/en/guides/app-development/custom-module-icon.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/custom-module-icon.md
rename to frappe/docs/user/en/guides/app-development/custom-module-icon.md
diff --git a/frappe/docs/user/guides/app-development/dialogs-types.md b/frappe/docs/user/en/guides/app-development/dialogs-types.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/dialogs-types.md
rename to frappe/docs/user/en/guides/app-development/dialogs-types.md
diff --git a/frappe/docs/user/guides/app-development/executing-code-on-doctype-events.md b/frappe/docs/user/en/guides/app-development/executing-code-on-doctype-events.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/executing-code-on-doctype-events.md
rename to frappe/docs/user/en/guides/app-development/executing-code-on-doctype-events.md
diff --git a/frappe/docs/user/guides/app-development/fetch-custom-field-value-from-master-to-all-related-transactions.md b/frappe/docs/user/en/guides/app-development/fetch-custom-field-value-from-master-to-all-related-transactions.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/fetch-custom-field-value-from-master-to-all-related-transactions.md
rename to frappe/docs/user/en/guides/app-development/fetch-custom-field-value-from-master-to-all-related-transactions.md
diff --git a/frappe/docs/user/guides/app-development/generating-docs.md b/frappe/docs/user/en/guides/app-development/generating-docs.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/generating-docs.md
rename to frappe/docs/user/en/guides/app-development/generating-docs.md
diff --git a/frappe/docs/user/guides/app-development/how-enable-developer-mode-in-frappe.md b/frappe/docs/user/en/guides/app-development/how-enable-developer-mode-in-frappe.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/how-enable-developer-mode-in-frappe.md
rename to frappe/docs/user/en/guides/app-development/how-enable-developer-mode-in-frappe.md
diff --git a/frappe/docs/user/guides/app-development/how-to-create-custom-fields-during-app-installation.md b/frappe/docs/user/en/guides/app-development/how-to-create-custom-fields-during-app-installation.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/how-to-create-custom-fields-during-app-installation.md
rename to frappe/docs/user/en/guides/app-development/how-to-create-custom-fields-during-app-installation.md
diff --git a/frappe/docs/user/guides/app-development/how-to-improve-a-standard-control.md b/frappe/docs/user/en/guides/app-development/how-to-improve-a-standard-control.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/how-to-improve-a-standard-control.md
rename to frappe/docs/user/en/guides/app-development/how-to-improve-a-standard-control.md
diff --git a/frappe/docs/user/guides/app-development/index.md b/frappe/docs/user/en/guides/app-development/index.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/index.md
rename to frappe/docs/user/en/guides/app-development/index.md
diff --git a/frappe/docs/user/guides/app-development/index.txt b/frappe/docs/user/en/guides/app-development/index.txt
old mode 100644
new mode 100755
similarity index 88%
rename from frappe/docs/user/guides/app-development/index.txt
rename to frappe/docs/user/en/guides/app-development/index.txt
index 32b9c08c0d..2c74940479
--- a/frappe/docs/user/guides/app-development/index.txt
+++ b/frappe/docs/user/en/guides/app-development/index.txt
@@ -4,7 +4,7 @@ generating-docs
how-enable-developer-mode-in-frappe
fetch-custom-field-value-from-master-to-all-related-transactions
executing-code-on-doctype-events
-how-to-add-customizations-to-app
+how-to-create-custom-fields-during-app-installation
insert-a-document-via-api
how-to-improve-a-standard-control
overriding-link-query-by-custom-script
diff --git a/frappe/docs/user/guides/app-development/insert-a-document-via-api.md b/frappe/docs/user/en/guides/app-development/insert-a-document-via-api.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/insert-a-document-via-api.md
rename to frappe/docs/user/en/guides/app-development/insert-a-document-via-api.md
diff --git a/frappe/docs/user/guides/app-development/overriding-link-query-by-custom-script.md b/frappe/docs/user/en/guides/app-development/overriding-link-query-by-custom-script.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/overriding-link-query-by-custom-script.md
rename to frappe/docs/user/en/guides/app-development/overriding-link-query-by-custom-script.md
diff --git a/frappe/docs/user/guides/app-development/single-type-doctype.md b/frappe/docs/user/en/guides/app-development/single-type-doctype.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/single-type-doctype.md
rename to frappe/docs/user/en/guides/app-development/single-type-doctype.md
diff --git a/frappe/docs/user/guides/app-development/trigger-event-on-deletion-of-grid-row.md b/frappe/docs/user/en/guides/app-development/trigger-event-on-deletion-of-grid-row.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/trigger-event-on-deletion-of-grid-row.md
rename to frappe/docs/user/en/guides/app-development/trigger-event-on-deletion-of-grid-row.md
diff --git a/frappe/docs/user/guides/app-development/using-html-templates-in-javascript.md b/frappe/docs/user/en/guides/app-development/using-html-templates-in-javascript.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/app-development/using-html-templates-in-javascript.md
rename to frappe/docs/user/en/guides/app-development/using-html-templates-in-javascript.md
diff --git a/frappe/docs/user/guides/basics/apps.md b/frappe/docs/user/en/guides/basics/apps.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/basics/apps.md
rename to frappe/docs/user/en/guides/basics/apps.md
diff --git a/frappe/docs/user/guides/basics/hooks.md b/frappe/docs/user/en/guides/basics/hooks.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/basics/hooks.md
rename to frappe/docs/user/en/guides/basics/hooks.md
diff --git a/frappe/docs/user/guides/basics/index.md b/frappe/docs/user/en/guides/basics/index.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/basics/index.md
rename to frappe/docs/user/en/guides/basics/index.md
diff --git a/frappe/docs/user/guides/basics/index.txt b/frappe/docs/user/en/guides/basics/index.txt
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/basics/index.txt
rename to frappe/docs/user/en/guides/basics/index.txt
diff --git a/frappe/docs/user/guides/basics/install.md b/frappe/docs/user/en/guides/basics/install.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/basics/install.md
rename to frappe/docs/user/en/guides/basics/install.md
diff --git a/frappe/docs/user/guides/basics/site_config.md b/frappe/docs/user/en/guides/basics/site_config.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/basics/site_config.md
rename to frappe/docs/user/en/guides/basics/site_config.md
diff --git a/frappe/docs/user/guides/basics/sites.md b/frappe/docs/user/en/guides/basics/sites.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/basics/sites.md
rename to frappe/docs/user/en/guides/basics/sites.md
diff --git a/frappe/docs/user/guides/basics/translations.md b/frappe/docs/user/en/guides/basics/translations.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/basics/translations.md
rename to frappe/docs/user/en/guides/basics/translations.md
diff --git a/frappe/docs/user/guides/basics/writing-tests.md b/frappe/docs/user/en/guides/basics/writing-tests.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/basics/writing-tests.md
rename to frappe/docs/user/en/guides/basics/writing-tests.md
diff --git a/frappe/docs/user/guides/data/import-large-csv-file.md b/frappe/docs/user/en/guides/data/import-large-csv-file.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/data/import-large-csv-file.md
rename to frappe/docs/user/en/guides/data/import-large-csv-file.md
diff --git a/frappe/docs/user/guides/data/index.md b/frappe/docs/user/en/guides/data/index.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/data/index.md
rename to frappe/docs/user/en/guides/data/index.md
diff --git a/frappe/docs/user/guides/data/index.txt b/frappe/docs/user/en/guides/data/index.txt
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/data/index.txt
rename to frappe/docs/user/en/guides/data/index.txt
diff --git a/frappe/docs/user/guides/deployment/checking-problems-in-bench.md b/frappe/docs/user/en/guides/deployment/checking-problems-in-bench.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/deployment/checking-problems-in-bench.md
rename to frappe/docs/user/en/guides/deployment/checking-problems-in-bench.md
diff --git a/frappe/docs/user/guides/deployment/configuring-https.md b/frappe/docs/user/en/guides/deployment/configuring-https.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/deployment/configuring-https.md
rename to frappe/docs/user/en/guides/deployment/configuring-https.md
diff --git a/frappe/docs/user/guides/deployment/email-notifications-for-failed-background-jobs.md b/frappe/docs/user/en/guides/deployment/email-notifications-for-failed-background-jobs.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/deployment/email-notifications-for-failed-background-jobs.md
rename to frappe/docs/user/en/guides/deployment/email-notifications-for-failed-background-jobs.md
diff --git a/frappe/docs/user/guides/deployment/how-to-change-host-name-from-localhost.md b/frappe/docs/user/en/guides/deployment/how-to-change-host-name-from-localhost.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/deployment/how-to-change-host-name-from-localhost.md
rename to frappe/docs/user/en/guides/deployment/how-to-change-host-name-from-localhost.md
diff --git a/frappe/docs/user/guides/deployment/how-to-enable-social-logins.md b/frappe/docs/user/en/guides/deployment/how-to-enable-social-logins.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/deployment/how-to-enable-social-logins.md
rename to frappe/docs/user/en/guides/deployment/how-to-enable-social-logins.md
diff --git a/frappe/docs/user/guides/deployment/how-to-migrate-doctype-changes-to-production.md b/frappe/docs/user/en/guides/deployment/how-to-migrate-doctype-changes-to-production.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/deployment/how-to-migrate-doctype-changes-to-production.md
rename to frappe/docs/user/en/guides/deployment/how-to-migrate-doctype-changes-to-production.md
diff --git a/frappe/docs/user/guides/deployment/index.md b/frappe/docs/user/en/guides/deployment/index.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/deployment/index.md
rename to frappe/docs/user/en/guides/deployment/index.md
diff --git a/frappe/docs/user/guides/deployment/index.txt b/frappe/docs/user/en/guides/deployment/index.txt
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/deployment/index.txt
rename to frappe/docs/user/en/guides/deployment/index.txt
diff --git a/frappe/docs/user/guides/deployment/migrations.md b/frappe/docs/user/en/guides/deployment/migrations.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/deployment/migrations.md
rename to frappe/docs/user/en/guides/deployment/migrations.md
diff --git a/frappe/docs/user/guides/index.md b/frappe/docs/user/en/guides/index.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/index.md
rename to frappe/docs/user/en/guides/index.md
diff --git a/frappe/docs/user/guides/index.txt b/frappe/docs/user/en/guides/index.txt
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/index.txt
rename to frappe/docs/user/en/guides/index.txt
diff --git a/frappe/docs/user/guides/integration/index.md b/frappe/docs/user/en/guides/integration/index.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/integration/index.md
rename to frappe/docs/user/en/guides/integration/index.md
diff --git a/frappe/docs/user/guides/integration/index.txt b/frappe/docs/user/en/guides/integration/index.txt
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/integration/index.txt
rename to frappe/docs/user/en/guides/integration/index.txt
diff --git a/frappe/docs/user/guides/integration/rest_api.md b/frappe/docs/user/en/guides/integration/rest_api.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/integration/rest_api.md
rename to frappe/docs/user/en/guides/integration/rest_api.md
diff --git a/frappe/docs/user/guides/portal-development/.md b/frappe/docs/user/en/guides/portal-development/.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/portal-development/.md
rename to frappe/docs/user/en/guides/portal-development/.md
diff --git a/frappe/docs/user/guides/portal-development/adding-pages.md b/frappe/docs/user/en/guides/portal-development/adding-pages.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/portal-development/adding-pages.md
rename to frappe/docs/user/en/guides/portal-development/adding-pages.md
diff --git a/frappe/docs/user/guides/portal-development/building.md b/frappe/docs/user/en/guides/portal-development/building.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/portal-development/building.md
rename to frappe/docs/user/en/guides/portal-development/building.md
diff --git a/frappe/docs/user/guides/portal-development/contents.md b/frappe/docs/user/en/guides/portal-development/contents.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/portal-development/contents.md
rename to frappe/docs/user/en/guides/portal-development/contents.md
diff --git a/frappe/docs/user/guides/portal-development/context.md b/frappe/docs/user/en/guides/portal-development/context.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/portal-development/context.md
rename to frappe/docs/user/en/guides/portal-development/context.md
diff --git a/frappe/docs/user/guides/portal-development/index.md b/frappe/docs/user/en/guides/portal-development/index.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/portal-development/index.md
rename to frappe/docs/user/en/guides/portal-development/index.md
diff --git a/frappe/docs/user/guides/portal-development/index.txt b/frappe/docs/user/en/guides/portal-development/index.txt
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/portal-development/index.txt
rename to frappe/docs/user/en/guides/portal-development/index.txt
diff --git a/frappe/docs/user/guides/portal-development/ordering.md b/frappe/docs/user/en/guides/portal-development/ordering.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/portal-development/ordering.md
rename to frappe/docs/user/en/guides/portal-development/ordering.md
diff --git a/frappe/docs/user/guides/reports-and-printing/getting-information-from-another-document-in-print-format.md b/frappe/docs/user/en/guides/reports-and-printing/getting-information-from-another-document-in-print-format.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/reports-and-printing/getting-information-from-another-document-in-print-format.md
rename to frappe/docs/user/en/guides/reports-and-printing/getting-information-from-another-document-in-print-format.md
diff --git a/frappe/docs/user/guides/reports-and-printing/how-to-make-query-report.md b/frappe/docs/user/en/guides/reports-and-printing/how-to-make-query-report.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/reports-and-printing/how-to-make-query-report.md
rename to frappe/docs/user/en/guides/reports-and-printing/how-to-make-query-report.md
diff --git a/frappe/docs/user/guides/reports-and-printing/how-to-make-script-reports.md b/frappe/docs/user/en/guides/reports-and-printing/how-to-make-script-reports.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/reports-and-printing/how-to-make-script-reports.md
rename to frappe/docs/user/en/guides/reports-and-printing/how-to-make-script-reports.md
diff --git a/frappe/docs/user/guides/reports-and-printing/index.md b/frappe/docs/user/en/guides/reports-and-printing/index.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/reports-and-printing/index.md
rename to frappe/docs/user/en/guides/reports-and-printing/index.md
diff --git a/frappe/docs/user/guides/reports-and-printing/index.txt b/frappe/docs/user/en/guides/reports-and-printing/index.txt
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/reports-and-printing/index.txt
rename to frappe/docs/user/en/guides/reports-and-printing/index.txt
diff --git a/frappe/docs/user/guides/reports-and-printing/print-format-for-reports.md b/frappe/docs/user/en/guides/reports-and-printing/print-format-for-reports.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/reports-and-printing/print-format-for-reports.md
rename to frappe/docs/user/en/guides/reports-and-printing/print-format-for-reports.md
diff --git a/frappe/docs/user/guides/reports-and-printing/where-do-i-find-standard-print-formats.md b/frappe/docs/user/en/guides/reports-and-printing/where-do-i-find-standard-print-formats.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/guides/reports-and-printing/where-do-i-find-standard-print-formats.md
rename to frappe/docs/user/en/guides/reports-and-printing/where-do-i-find-standard-print-formats.md
diff --git a/frappe/docs/user/index.md b/frappe/docs/user/en/index.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/index.md
rename to frappe/docs/user/en/index.md
diff --git a/frappe/docs/user/index.txt b/frappe/docs/user/en/index.txt
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/index.txt
rename to frappe/docs/user/en/index.txt
diff --git a/frappe/docs/user/tutorial/app.md b/frappe/docs/user/en/tutorial/app.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/app.md
rename to frappe/docs/user/en/tutorial/app.md
diff --git a/frappe/docs/user/tutorial/before.md b/frappe/docs/user/en/tutorial/before.md
old mode 100644
new mode 100755
similarity index 98%
rename from frappe/docs/user/tutorial/before.md
rename to frappe/docs/user/en/tutorial/before.md
index ec29631faf..4c7c51c114
--- a/frappe/docs/user/tutorial/before.md
+++ b/frappe/docs/user/en/tutorial/before.md
@@ -44,5 +44,5 @@ If you are customizing Print templates, you need to learn the [Jinja Templating
---
-When you are ready, [try building a sample application on Frappe]({{ docs_base_url }}/user/tutorial/app)
+When you are ready, [try building a sample application on Frappe]({{ docs_base_url }}/user/en/tutorial/app)
diff --git a/frappe/docs/user/tutorial/bench.md b/frappe/docs/user/en/tutorial/bench.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/bench.md
rename to frappe/docs/user/en/tutorial/bench.md
diff --git a/frappe/docs/user/tutorial/conclusion.md b/frappe/docs/user/en/tutorial/conclusion.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/conclusion.md
rename to frappe/docs/user/en/tutorial/conclusion.md
diff --git a/frappe/docs/user/tutorial/controllers.md b/frappe/docs/user/en/tutorial/controllers.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/controllers.md
rename to frappe/docs/user/en/tutorial/controllers.md
diff --git a/frappe/docs/user/tutorial/doctype-directory-structure.md b/frappe/docs/user/en/tutorial/doctype-directory-structure.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/doctype-directory-structure.md
rename to frappe/docs/user/en/tutorial/doctype-directory-structure.md
diff --git a/frappe/docs/user/tutorial/doctypes.md b/frappe/docs/user/en/tutorial/doctypes.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/doctypes.md
rename to frappe/docs/user/en/tutorial/doctypes.md
diff --git a/frappe/docs/user/tutorial/form-client-scripting.md b/frappe/docs/user/en/tutorial/form-client-scripting.md
old mode 100644
new mode 100755
similarity index 97%
rename from frappe/docs/user/tutorial/form-client-scripting.md
rename to frappe/docs/user/en/tutorial/form-client-scripting.md
index 70e2edb520..a70b8475ff
--- a/frappe/docs/user/tutorial/form-client-scripting.md
+++ b/frappe/docs/user/en/tutorial/form-client-scripting.md
@@ -29,7 +29,7 @@ To start the script, in the `library_management/doctype/library_transaction` fol
});
1. **frappe.ui.form.on(*doctype*, *fieldname*, *handler*)** is used to bind a handler to the event when the property library_member is set.
-1. In the handler, we trigger an AJAX call to `frappe.client.get`. In response we get the requested object as JSON. [Learn more about the API](/frappe/user/guides/integration/rest_api).
+1. In the handler, we trigger an AJAX call to `frappe.client.get`. In response we get the requested object as JSON. [Learn more about the API](/frappe/user/en/guides/integration/rest_api).
1. Using **frappe.model.set_value(*doctype*, *name*, *fieldname*, *value*)** we set the value in the form.
**Note:** To check if your script works, remember to 'reload' the page before testing your script. Client script changes are not automatically picked up when you are in developer mode.
diff --git a/frappe/docs/user/tutorial/index.md b/frappe/docs/user/en/tutorial/index.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/index.md
rename to frappe/docs/user/en/tutorial/index.md
diff --git a/frappe/docs/user/tutorial/index.txt b/frappe/docs/user/en/tutorial/index.txt
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/index.txt
rename to frappe/docs/user/en/tutorial/index.txt
diff --git a/frappe/docs/user/tutorial/models.md b/frappe/docs/user/en/tutorial/models.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/models.md
rename to frappe/docs/user/en/tutorial/models.md
diff --git a/frappe/docs/user/tutorial/naming-and-linking.md b/frappe/docs/user/en/tutorial/naming-and-linking.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/naming-and-linking.md
rename to frappe/docs/user/en/tutorial/naming-and-linking.md
diff --git a/frappe/docs/user/tutorial/new-app.md b/frappe/docs/user/en/tutorial/new-app.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/new-app.md
rename to frappe/docs/user/en/tutorial/new-app.md
diff --git a/frappe/docs/user/tutorial/reports.md b/frappe/docs/user/en/tutorial/reports.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/reports.md
rename to frappe/docs/user/en/tutorial/reports.md
diff --git a/frappe/docs/user/tutorial/roles.md b/frappe/docs/user/en/tutorial/roles.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/roles.md
rename to frappe/docs/user/en/tutorial/roles.md
diff --git a/frappe/docs/user/tutorial/setting-up-the-site.md b/frappe/docs/user/en/tutorial/setting-up-the-site.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/setting-up-the-site.md
rename to frappe/docs/user/en/tutorial/setting-up-the-site.md
diff --git a/frappe/docs/user/tutorial/single-doctypes.md b/frappe/docs/user/en/tutorial/single-doctypes.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/single-doctypes.md
rename to frappe/docs/user/en/tutorial/single-doctypes.md
diff --git a/frappe/docs/user/tutorial/start.md b/frappe/docs/user/en/tutorial/start.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/start.md
rename to frappe/docs/user/en/tutorial/start.md
diff --git a/frappe/docs/user/tutorial/task-runner.md b/frappe/docs/user/en/tutorial/task-runner.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/task-runner.md
rename to frappe/docs/user/en/tutorial/task-runner.md
diff --git a/frappe/docs/user/tutorial/users-and-records.md b/frappe/docs/user/en/tutorial/users-and-records.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/users-and-records.md
rename to frappe/docs/user/en/tutorial/users-and-records.md
diff --git a/frappe/docs/user/tutorial/web-views.md b/frappe/docs/user/en/tutorial/web-views.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/tutorial/web-views.md
rename to frappe/docs/user/en/tutorial/web-views.md
diff --git a/frappe/docs/user/videos/index.md b/frappe/docs/user/en/videos/index.md
old mode 100644
new mode 100755
similarity index 100%
rename from frappe/docs/user/videos/index.md
rename to frappe/docs/user/en/videos/index.md
diff --git a/frappe/docs/user/fr/guides/.txt b/frappe/docs/user/fr/guides/.txt
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/frappe/docs/user/fr/guides/app-development/adding-module-icons-on-desktop.md b/frappe/docs/user/fr/guides/app-development/adding-module-icons-on-desktop.md
new file mode 100644
index 0000000000..e6e0156bf6
--- /dev/null
+++ b/frappe/docs/user/fr/guides/app-development/adding-module-icons-on-desktop.md
@@ -0,0 +1,34 @@
+To create a module icon for a Page, List or Module, you will have to edit the `config/desktop.py` file in your app.
+
+In this file you will have to write the `get_data` method that will return a dict object with the module icon parameters
+
+### Example 1: Module Icon
+
+ def get_data():
+ return {
+ "Accounts": {
+ "color": "#3498db",
+ "icon": "octicon octicon-repo",
+ "type": "module"
+ },
+ }
+
+### Example 2: List Icon
+
+ def get_data():
+ return {
+ "To Do": {
+ "color": "#f1c40f",
+ "icon": "icon-check",
+ "icon": "octicon octicon-check",
+ "label": _("To Do"),
+ "link": "List/ToDo",
+ "doctype": "ToDo",
+ "type": "list"
+ },
+ }
+
+
+Note: Module views are visible based on permissions.
+
+
\ No newline at end of file
diff --git a/frappe/docs/user/fr/guides/app-development/custom-module-icon.md b/frappe/docs/user/fr/guides/app-development/custom-module-icon.md
new file mode 100644
index 0000000000..609f7f3803
--- /dev/null
+++ b/frappe/docs/user/fr/guides/app-development/custom-module-icon.md
@@ -0,0 +1,21 @@
+If you want to create a custom icon for your module, you will have to create an SVG file for your module and set the path to this file in the `desktop/config.py` of your app.
+
+This icon is loaded via AJAX first time, then it will be rendered.
+
+Example:
+
+ from frappe import _
+
+ def get_data():
+ return {
+ "Frappe Apps": {
+ "color": "orange",
+ "icon": "assets/frappe/images/frappe.svg",
+ "label": _("Frappe.io Portal"),
+ "type": "module"
+ }
+ }
+
+> PS: A great place to buy SVG icons for a low cost is the awesome [Noun Project](http://thenounproject.com/)
+
+
\ No newline at end of file
diff --git a/frappe/docs/user/fr/guides/app-development/dialogs-types.md b/frappe/docs/user/fr/guides/app-development/dialogs-types.md
new file mode 100644
index 0000000000..6b17121dd0
--- /dev/null
+++ b/frappe/docs/user/fr/guides/app-development/dialogs-types.md
@@ -0,0 +1,118 @@
+Frappe provide a group of standard dialogs that are very usefull while coding.
+
+## Alert Dialog
+
+
+
+Is helpfull for show a non-obstrutive message.
+
+This dialog have 2 parameters `txt`that is the message and `seconds` that is the time that the message will be showed for the user, the standard is `3 seconds`.
+
+### Example
+
+ show_alert('Hi, do you have a new message', 5);
+
+---
+
+## Prompt Dialog
+
+
+
+Is helpful for ask a value for the user
+
+This dialog have 4 parameters, they are:
+
+- **fields:** a list with the fields objects
+- **callback:** the function that manage the received values
+- **title:** the title of the dialog
+- **primary_label:** the label of the primary button
+
+### Example
+
+ frappe.prompt([
+ {'fieldname': 'birth', 'fieldtype': 'Date', 'label': 'Birth Date', 'reqd': 1}
+ ],
+ function(values){
+ show_alert(values, 5);
+ },
+ 'Age verification',
+ 'Subscribe me'
+ )
+
+---
+## Confirm Dialog
+
+
+
+Usefull to get a confirmation from the user before do an action
+
+This dialog have 3 arguments, they are:
+
+- **mesage:** The message content
+- **onyes:** The callback on positive confirmation
+- **oncancel:** The callback on negative confirmation
+
+### Example
+
+ frappe.confirm(
+ 'Are you sure to leave this page?',
+ function(){
+ window.close();
+ },
+ function(){
+ show_alert('Thanks for continue here!')
+ }
+ )
+
+---
+
+## Message Print
+
+
+
+Is helpfull for show a informational dialog for the user;
+
+This dialog have 2 arguments, they are:
+
+- **message:** The message content, can be a HTML string too
+- **title:** The title of the dialog
+
+### Example
+
+ msgprint("Server Status"
+ + "
+
+1. Create another Custom Field **VAT Number** for *Purchase Order* document, but in this case with *Field Type* as **Read Only** or check **Read Only** checkbox. Set the **Options** as `supplier.vat_number`.
+
+
+1. Go to the user menu and click "Reload".
+1. Now, on selection of Supplier in a new Purchase Order, **VAT Number** will be fetched automatically from the selected Supplier.
+
diff --git a/frappe/docs/user/fr/guides/app-development/generating-docs.md b/frappe/docs/user/fr/guides/app-development/generating-docs.md
new file mode 100644
index 0000000000..ca3d92a61d
--- /dev/null
+++ b/frappe/docs/user/fr/guides/app-development/generating-docs.md
@@ -0,0 +1,110 @@
+# Generating Documentation Website for your App
+
+Frappe version 6.7 onwards includes a full-blown documentation generator so that you can easily create a website for your app that has both user docs and developers docs (auto-generated). These pages are generated as static HTML pages so that you can add them as GitHub pages.
+
+## Writing Docs
+
+### 1. Setting up docs
+
+#### 1.1. Setup `docs.py`
+
+The first step is to setup the docs folder. For that you must create a new file in your app `config/docs.py` if it is not auto-generated. In your `docs.py` file, add the following module properties.
+
+
+ source_link = "https://github.com/[orgname]/[reponame]"
+ docs_base_url = "https://[orgname].github.io/[reponame]"
+ headline = "This is what my app does"
+ sub_heading = "Slightly more details with key features"
+ long_description = """(long description in markdown)"""
+
+ def get_context(context):
+ # optional settings
+
+ # context.brand_html = 'Brand info on the top left'
+ # context.favicon = 'path to favicon'
+ #
+ # context.top_bar_items = [
+ # {"label": "About", "url": context.docs_base_url + "/about"},
+ # ]
+
+ pass
+
+#### 1.2. Generate `/docs`
+
+To generate the docs for the `current` version, go to the command line and write
+
+ bench --site sitename make-docs app_name current
+
+If you want to maintain versions of your docs, then you can add a version number instead of `current`
+
+This will create a `/docs` folder in your app.
+
+### 2. Add User Documentation
+
+To add user documentation, add folders and pages in your `/docs/user` folder in the same way you would build a website pages in the `www` folder.
+
+Some quick tips:
+
+1. Add your pages as `.md` or `.html` pages
+2. Optionally add `.css` files with the same name that will be automatically served
+3. Add index by adding `{index}`
+
+### 3. Linking
+
+While linking make sure you add `{{ docs_base_url }}` to all your links.
+
+
+ {% raw %}Link Description{% endraw %}
+
+
+### 4. Adding Images
+
+You can add images in the `/docs/assets` folder. You can add links to the images as follows:
+
+ {% raw %}Recalculate totals when a Journal Entry row has been added
+ + frappe.ui.form.on("Journal Entry Account", "accounts_add", function(frm){ + cur_frm.cscript.update_totals(frm.doc); + }); + + + +Recalculate totals when a Journal Entry row has been deleted
+ + frappe.ui.form.on("Journal Entry Account", "accounts_remove", function(frm){ + cur_frm.cscript.update_totals(frm.doc); + }); + + \ No newline at end of file diff --git a/frappe/docs/user/fr/guides/app-development/using-html-templates-in-javascript.md b/frappe/docs/user/fr/guides/app-development/using-html-templates-in-javascript.md new file mode 100644 index 0000000000..db0cd90b4c --- /dev/null +++ b/frappe/docs/user/fr/guides/app-development/using-html-templates-in-javascript.md @@ -0,0 +1,42 @@ +Often while building javascript interfaces, there is a need to render DOM as an HTML template. Frappe Framework uses John Resig's Microtemplate script to render HTML templates in the Desk application. + +> Note 1: In Frappe we use the Jinja-like `{%` tags to embed code rather than the standard `<%` + +> Note 2: Never use single quotes `'` inside the HTML template. + +To render a template, + +1. Create a template `html` file in your app. e.g. `address_list.html` +1. Add it to `build.json` for your app (you can include it in `frappe.min.js` or your own javascript file). +1. To render it in your app, use `frappe.render(frappe.templates.address_list, {[context]})` + +#### Example Template: + +From `erpnext/public/js/templates/address_list.js` + + + + {% for(var i=0, l=addr_list.length; i{%= addr_list[i].display %}
+{%= __("No address added yet.") %}
+ {% } %} + + + + + \ No newline at end of file diff --git a/frappe/docs/user/fr/guides/basics/apps.md b/frappe/docs/user/fr/guides/basics/apps.md new file mode 100644 index 0000000000..f79a9f4642 --- /dev/null +++ b/frappe/docs/user/fr/guides/basics/apps.md @@ -0,0 +1,109 @@ +# Frappe Apps + +Frappe Apps are Python packages which use the Frappe platform. They can live +anywhere on the [Python +path](https://docs.python.org/2/tutorial/modules.html#the-module-search-path) +and must have an entry in the `apps.txt` file. + + +### Creating an app + +Frappe ships with a boiler plate for a new app. The command `bench make-app +app-name` helps you start a new app by starting an interactive shell. + + + % bench make-app sample_app + App Name: sample_app + App Title: Sample App + App Description: This is a sample app. + App Publisher: Acme Inc. + App Icon: icon-linux + App Color: #6DAFC9 + App Email: info@example.com + App URL: http://example.com + App License: MIT + +The above command would create an app with the following directory structure. + + sample_app + ├── license.txt + ├── MANIFEST.in + ├── README.md + ├── sample_app + │ ├── __init__.py + │ ├── sample_app + │ │ └── __init__.py + │ ├── config + │ │ ├── desktop.py + │ │ └── __init__.py + │ ├── hooks.py + │ ├── modules.txt + │ ├── patches.txt + │ └── templates + │ ├── generators + │ │ └── __init__.py + │ ├── __init__.py + │ ├── pages + │ │ └── __init__.py + │ └── statics + └── setup.py + +Here, "App Icon" is a font awesome class that you can select from +[http://fortawesome.github.io/Font-Awesome/icons/](http://fortawesome.github.io/Font-Awesome/icons/). + +The boiler plate contains just enough files to show your app icon on the [Desk]. + +### Files in the app + +#### `hooks.py` + +The `hooks.py` file defines the metadata of your app and integration points +with other parts of Frappe or Frappe apps. Examples of such parts include task +scheduling or listening to updates to different documents in the system. For +now, it just contains the details you entered during app creation. + + + app_name = "sample-app" + app_title = "Sample App" + app_publisher = "Acme Inc." + app_description = "This is a sample app." + app_icon = "fa-linux" + app_color = "black" + app_email = "info@example.com" + app_url = "http://example.com" + app_version = 0.0.1 + +#### `modules.txt` + +Modules in Frappe help you organize Documents in Frappe and they are defined in +the `modules.txt` file in your app. It is necessary for every [DocType] to be +attached to a module. By default a module by the name of your app is added. +Also, each module gets an icon on the [Desk]. For example, the [ERPNext] app is +organized in the following modules. + + accounts + buying + home + hr + manufacturing + projects + selling + setup + stock + support + utilities + contacts + +### Adding app to a site + +Once you have an app, whether it's the one you just created or any other you +downloaded, you are required to do the following things. + +Download the app via git + + bench get-app https://github.com/org/app_name + +Install the app to your site + + bench --site app_name install-app app_name + diff --git a/frappe/docs/user/fr/guides/basics/hooks.md b/frappe/docs/user/fr/guides/basics/hooks.md new file mode 100644 index 0000000000..9bfaaeee3c --- /dev/null +++ b/frappe/docs/user/fr/guides/basics/hooks.md @@ -0,0 +1,273 @@ +# Hooks + + +Hooks are the duct tape of the Frappe system. Hooks allow you to "hook" in to +functionality and events of other parts of the Frappe system. Following are the +official hooks from Frappe. + +### Application Name and Details + +1. `app_name` - slugified name with underscores e.g. "shopping\_cart" +2. `app_title` - full title name e.g. "Frappe" +3. `app_publisher` +4. `app_description` +5. `app_version` +6. `app_icon` - font-awesome icon or image url +7. `app_color` - hex colour background of the app icon + +### Install Events + +1. `before_install` +2. `after_install` + +The above hooks are called before and after installation of the app they are in. +For example, [ERPNext](/apps/erpnext)'s hooks contains a line, + + after_install = "erpnext.setup.install.after_install" + +So, the function after\_install is imported and called after ERPNext is installed. + +Note, the `before_install` and `after_install` hooks are called with no arguments. + +### Boot Session + +After a successful login, the Frappe JS Client requests for a resource called +`bootinfo`. The `bootinfo` is available as a global in Javascript via +`frappe.boot`. By default, the `bootinfo` contains + +* System defaults +* Notification status +* Permissions +* List of icons on desktop +* User settings +* Language and timezone info + +If your app wants to modify bootinfo, it can declare a hook `boot_session`. The +value is assumed to be a dotted path to a function and is called with one +argument, bootinfo which it can modify and return. + +Eg, + + boot_session = "erpnext.startup.boot.boot_session" + +### Notification configurations + +The notification configuration hook is expected to return a Python dictionary. + + { + "for_doctype": { + "Issue": {"status":"Open"}, + "Customer Issue": {"status":"Open"}, + }, + "for_module_doctypes": { + "ToDo": "To Do", + "Event": "Calendar", + "Comment": "Messages" + }, + "for_module": { + "To Do": "frappe.core.notifications.get_things_todo", + "Calendar": "frappe.core.notifications.get_todays_events", + "Messages": "frappe.core.notifications.get_unread_messages" + } + } + + +The above configuration has three parts, + +1. `for_doctype` part of the above configuration marks any "Issue" + or "Customer Issue" as unread if its status is Open +2. `for_module_doctypes` maps doctypes to module's unread count. +3. `for_module` maps modules to functions to obtain its unread count. The + functions are called without any argument. + +### Javascript / CSS Assets + +The following hooks allow you to bundle built assets to your app for serving. +There are two types of assets, app and web. The app assets are loaded in the +Desk and web assets are loaded in the website. + +1. `app_include_js` +2. `app_include_css` +3. `web_include_js` +4. `web_include_css` + +Eg, + + app_include_js = "assets/js/erpnext.min.js" + web_include_js = "assets/js/erpnext-web.min.js" + +Note: to create an asset bundle (eg, assets/js/erpnext.min.js) the target file +should be in build.json of your app. + +### Configuring Reports + +In the report view, you can force filters as per doctype using `dump_report_map` +hook. The hook should be a dotted path to a Python function which will be called +without any arguments. Example of output of this function is below. + + + "Warehouse": { + "columns": ["name"], + "conditions": ["docstatus < 2"], + "order_by": "name" + } + +Here, for a report with Warehouse doctype, would include only those records that +are not cancelled (docstatus < 2) and will be ordered by name. + +### Modifying Website Context + +Context used in website pages can be modified by adding +a `update_website_context` hook. This hook should be a dotted path to a function +which will be called with a context (dictionary) argument. + +### Customizing Email footer + +By default, for every email, a footer with content, "Sent via Frappe" is sent. +You can customize this globally by adding a `mail_footer` hook. The hook should +be a dotted path to a variable. + +### Session Creation Hook + +You can attach custom logic to the event of a successful login using +`on_session_creation` hook. The hook should be a dotted path to a Python +function that takes login\_manager as an argument. + +Eg, + + def on_session_creation(login_manager): + """make feed""" + if frappe.session['user'] != 'Guest': + # log to timesheet + pass + +### Website Clear Cache + +If you cache values in your views, the `website_clear_cache` allows you to hook +methods that invalidate your caches when Frappe tries to clear cache for all +website related pages. + +### Document hooks + +#### Permissions + +#### Query Permissions +You can customize how permissions are resolved for a DocType by hooking custom +permission match conditions using the `permission_query_conditions` hook. This +match condition is expected to be fragment for a where clause in an sql query. +Structure for this hook is as follows. + + + permission_query_conditions = { + "{doctype}": "{dotted.path.to.function}", + } + +The output of the function should be a string with a match condition. +Example of such a function, + + + def get_permission_query_conditions(): + return "(tabevent.event_type='public' or tabevent.owner='{user}'".format(user=frappe.session.user) + +The above function returns a fragment that permits an event to listed if it's +public or owned by the current user. + +#### Document permissions +You can hook to `doc.has_permission` for any DocType and add special permission +checking logic using the `has_permission` hook. Structure for this hook is, + + has_permission = { + "{doctype}": "{dotted.path.to.function}", + } + +The function will be passed the concerned document as an argument. It should +True or a falsy value after running the required logic. + +For Example, + + def has_permission(doc): + if doc.event_type=="Public" or doc.owner==frappe.session.user: + return True + +The above function permits an event if it's public or owned by the current user. + +#### CRUD Events + +You can hook to various CRUD events of any doctype, the syntax for such a hook +is as follows, + + doc_events = { + "{doctype}": { + "{event}": "{dotted.path.to.function}", + } + } + +To hook to events of all doctypes, you can use the follwing syntax also, + + doc_events = { + "*": { + "on_update": "{dotted.path.to.function}", + } + } + +The hook function will be passed the doc in concern as the only argument. + +##### List of events + +* `validate` +* `before_save` +* `after_save` +* `before_insert` +* `after_insert` +* `before_submit` +* `before_cancel` +* `before_update_after_submit` +* `on_update` +* `on_submit` +* `on_cancel` +* `on_update_after_submit` + + +Eg, + + doc_events = { + "Cab Request": { + "after_insert": topcab.schedule_cab", + } + } + +### Scheduler Hooks + +Scheduler hooks are methods that are run periodically in background. Structure for such a hook is, + + scheduler_events = { + "{event_name}": [ + "{dotted.path.to.function}" + ], + } + +#### Events + +* `daily` +* `daily_long` +* `weekly` +* `weekly_long` +* `monthly` +* `monthly_long` +* `hourly` +* `all` + +The scheduler events require celery, celerybeat and redis (or a supported and +configured broker) to be running. The events with suffix '\_long' are for long +jobs. The `all` event is triggered everytime (as per the celerybeat interval). + +Example, + + scheduler_events = { + "{daily}": [ + "erpnext.accounts.doctype.sales_invoice.sales_invoice.manage_recurring_invoices" + ], + "{daily_long}": [ + "erpnext.setup.doctype.backup_manager.backup_manager.take_backups_daily" + ], + } diff --git a/frappe/docs/user/fr/guides/basics/index.md b/frappe/docs/user/fr/guides/basics/index.md new file mode 100644 index 0000000000..645bed29a7 --- /dev/null +++ b/frappe/docs/user/fr/guides/basics/index.md @@ -0,0 +1,3 @@ +# Basics + +{index} diff --git a/frappe/docs/user/fr/guides/basics/index.txt b/frappe/docs/user/fr/guides/basics/index.txt new file mode 100644 index 0000000000..910ba191d4 --- /dev/null +++ b/frappe/docs/user/fr/guides/basics/index.txt @@ -0,0 +1,7 @@ +install +apps +sites +site_config +hooks +translations +writing-tests diff --git a/frappe/docs/user/fr/guides/basics/install.md b/frappe/docs/user/fr/guides/basics/install.md new file mode 100644 index 0000000000..3afa43a37c --- /dev/null +++ b/frappe/docs/user/fr/guides/basics/install.md @@ -0,0 +1,10 @@ +# Installing Frappe + +## Frappe bench + +The following steps help you setup an isolated environment (bench) to run and +develop Frappe apps. A virtualenv is installed in the env directory. You can +activate it by running `source ./env/bin/activate` or use execute using +absolute/relative path (eg, `./env/bin/frappe`). + +For more info, see [Frappe Bench](https://github.com/frappe/bench/) diff --git a/frappe/docs/user/fr/guides/basics/site_config.md b/frappe/docs/user/fr/guides/basics/site_config.md new file mode 100644 index 0000000000..322cc1937c --- /dev/null +++ b/frappe/docs/user/fr/guides/basics/site_config.md @@ -0,0 +1,40 @@ +# Site Config + +Settings for `sites/[site]/site_config.json` + +`site_config.json` stores global settings for a particular site and is present in the site directory. Here is a list of properties you can set in `site_config.json`. + +Example: + + { + "db_name": "test_frappe", + "db_password": "test_frappe", + "admin_password": "admin", + } + +### Mandatory Settings + +- `db_name`: Database Name. +- `db_password`: Database password. + +### Optional Settings + +- `db_host`: Database host if not `localhost`. +- `admin_password`: Default Password for "Administrator". +- `mute_emails`: Stops email sending if true. +- `deny_multiple_logins`: Stop users from having more than one active session. +- `root_password`: MariaDB root password. + +### Defaut Outgoing Email Settings + +- `mail_server`: SMTP server hostname. +- `mail_port`: STMP port. +- `use_ssl`: Connect via SSL / TLS. +- `mail_login`: Login id for SMTP server. +- `mail_password`: Password for SMTP server. + +### Developer Settings + +- `developer_mode`: If developer mode is set, DocType changes are automatically updated in files. +- `disable_website_cache`: Don't cache website pages. +- `logging`: writes logs if **1**, writes queries also if set to **2**. diff --git a/frappe/docs/user/fr/guides/basics/sites.md b/frappe/docs/user/fr/guides/basics/sites.md new file mode 100644 index 0000000000..81f51aa599 --- /dev/null +++ b/frappe/docs/user/fr/guides/basics/sites.md @@ -0,0 +1,82 @@ +# Sites + +## Sites Directory + +Frappe is a multitenant platform and each tenant is called a site. Sites exist +in a directory called `sites_dir`, assumed as the current working directory when +running a frappe command or other services like Celery worker or a WSGI server. + +You can set `sites_dir` with an environment variable `SITES_DIR` or pass +`--sites_dir` option to the frappe command. + +Apart from the sites, the `sites_dir` should contain the following. + +#### apps.txt + +`apps.txt` contain a list of Python packages to treat as Frappe apps. Every +frappe app that you intend to use in you site should have an entry in this file. +Also, they should be in the `PYTHONPATH`. For more information, refer +[Frappe Apps](/help/apps). + +#### common\_site\_config.json + +`common_site_config.json` is an optional file. Configuration common to all sites +can be put in this file. + +#### assets + +Assets contain files that are required to be served for the browser client. +These generally include *.js, *.css, *.png files. This directory is auto +generated using the `bench build` command. + +#### languages.txt + +`languages.txt` is an autogenerated file which maps every language to it's code. + +## Site + +A site is a directory in `sites_dir` which represents a tenant in Frappe Platform. + + +### Directory Structure + + site + ├── locks + ├── private + │ └── backups + ├── public + │ └── files + │ └── testfile.txt + └── site_config.json + +* `locks` directory is used by the scheduler to synchronize various jobs using +the [file locking concept](http://en.wikipedia.org/wiki/File_locking). + +* `private` directory contains files that require authentication to access. +Presently, it is limited only to backups. + +* `public` directory contains files that can directly served. In the above + example, `testfile.txt` can be accessed by the URL, + http://site/files/testfile.txt + +* `site_config.json` contains site specific configuration + +### Site Config + +[See configuration options for `site_config.json`](/docs/user-guide/site_config.md) + +### Site Resolution + +While responding to an HTTP request, a site is automatically selected based on, + +* `Host` header in the HTTP request matches a site +* `X-Frappe-Site-Name` header in the HTTP request matches a site + +It is also possible to force the development server to serve a specific site by +starting it with the following command. + `bench --site SITENAME serve` + + +### Adding a new site + +`frappe new-site SITENAME` diff --git a/frappe/docs/user/fr/guides/basics/translations.md b/frappe/docs/user/fr/guides/basics/translations.md new file mode 100644 index 0000000000..e5ff22e9f2 --- /dev/null +++ b/frappe/docs/user/fr/guides/basics/translations.md @@ -0,0 +1,86 @@ + + + +This document shows how to translations are managed in ERPNext and how to add +a new language or update translations of an existing language. + +### 1. Source + +Translatable text exists in 3 main sources: + + 1. Javascript Code Files (both framework and application) + 2. Python Code Files + 3. DocTypes (names, labels and select options) + +#### Strings in Code Files + +Strings in code files are annotated using the `_` (underscore) method + + 1. In Python it is the `frappe._` method. Example: + +`frappe._("String {0} must be translated".format(txt))` + + 2. In Javascript it is the `__` method. Example: + +`__("String {0} must be translated", [txt])` + +**Note:** If you find translatable strings are not properly annotated using the `_` +method, you can add them in the code and rebuild the translations. + +### 2. How Translations Are Picked up During Execution + +Whenever a translation is called via the _ method, the entire translation +dictionaries from all apps are built and stored in memcache. + +Based on the user preferences or request preferences, the appropriate +translations are loaded at the time of request on the server side. Or if +metadata (DocType) is queried, then the appropriate translations are appended +when the DocType data is requested. + +The underscore `_` method will replace the strings based on the available +translations loaded at the time. + +### 3. Adding New Translations + +1. To find untranslated strings, run `bench get-untranslated [lang] [path]` +1. Add the translated strings in another file in the same order +1. run `bench update-translations [lang] [path of untranslated strings] [path of translated strings]` + +### 4. Improving Translations: + +For updating translations, please go to the to [the translation portal](https://frappe.io/translator). + +If you want to do it directly via code: + +To improve an existing translation, just edit the master translation files in +the `translations` of each app + +> Please contribute your translations back to ERPNext by sending us a Pull +Request. + +### 5. Bootstrapping a New Language + +If you want to add a new language it is similar to adding new translations. You need to first export all the translations strings in one file, get them translated via Google Translate Tool or Bing Translate Tool and then import the translations into individual apps. + +**Step 1: Export to a file** + + $ bench get-untranslated [lang] [path] + +**Step 2: Translate** + +Create another file with updated translations (in the same order as the source file). For this you can use the [Google Translator Toolkit](https://translate.google.com/toolkit) or [Bing Translator](http://www.bing.com/translator/). + +**Step 3: Import your translations** + + $ bench update-translations [lang] [source path] [translated path] + +**Step 4: Update `languages.txt`** + +Add your language in `apps/languages.txt` and also `frappe/data/languages.txt` (fore new bench installs) + +**Step 5: Commit each app and push** + +A new file will be added to the `translations` folder in each app. You need to add that file and push to your repo. Then send us a pull-request. + +--- + diff --git a/frappe/docs/user/fr/guides/basics/writing-tests.md b/frappe/docs/user/fr/guides/basics/writing-tests.md new file mode 100644 index 0000000000..f151416ccd --- /dev/null +++ b/frappe/docs/user/fr/guides/basics/writing-tests.md @@ -0,0 +1,109 @@ +# Writing Tests + +### Introduction + +Frappe provides some basic tooling to quickly write automated tests. There are some basic rules: + +1. Test can be anywhere in your repository but must begin with `test_` and should be a `.py` file. +1. Tests must run on a site that starts with `test_`. This is to prevent accidental loss of data. +1. Test stubs are automatically generated for new DocTypes. +1. Frappe test runner will automatically build test records for dependant DocTypes identified by the `Link` type field (Foreign Key) +1. Tests can be executed using `bench run-tests` +1. For non-DocType tests, you can write simple unittests and prefix your file names with `test_`. + +### Tests for a DocType + +#### Writing DocType Tests: + +1. Records that are used for testing are stored in a file `test_records.json` in the doctype folder. [For example see the Event Tests](https://github.com/frappe/frappe/blob/develop/frappe/core/doctype/event/test_records.json). +1. Test cases are in a file named `test_[doctype].py` +1. To provide the test records (and dependencies) call `test_records = frappe.get_test_records('Event')` in your test case file. + +#### Example (for `test_records.json`): + + [ + { + "doctype": "Event", + "subject":"_Test Event 1", + "starts_on": "2014-01-01", + "event_type": "Public" + }, + { + "doctype": "Event", + "starts_on": "2014-01-01", + "subject":"_Test Event 2", + "event_type": "Private" + }, + { + "doctype": "Event", + "starts_on": "2014-01-01", + "subject":"_Test Event 3", + "event_type": "Private", + "event_individuals": [{ + "person": "test1@example.com" + }] + } + ] + + +#### Example (for `test_event.py`): + + # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors + # MIT License. See license.txt + + import frappe + import frappe.defaults + import unittest + + # load test records and dependencies + test_records = frappe.get_test_records('Event') + + class TestEvent(unittest.TestCase): + def tearDown(self): + frappe.set_user("Administrator") + + def test_allowed_public(self): + frappe.set_user("test1@example.com") + doc = frappe.get_doc("Event", frappe.db.get_value("Event", {"subject":"_Test Event 1"})) + self.assertTrue(frappe.has_permission("Event", doc=doc)) + + def test_not_allowed_private(self): + frappe.set_user("test1@example.com") + doc = frappe.get_doc("Event", frappe.db.get_value("Event", {"subject":"_Test Event 2"})) + self.assertFalse(frappe.has_permission("Event", doc=doc)) + + def test_allowed_private_if_in_event_user(self): + frappe.set_user("test1@example.com") + doc = frappe.get_doc("Event", frappe.db.get_value("Event", {"subject":"_Test Event 3"})) + self.assertTrue(frappe.has_permission("Event", doc=doc)) + + def test_event_list(self): + frappe.set_user("test1@example.com") + res = frappe.get_list("Event", filters=[["Event", "subject", "like", "_Test Event%"]], fields=["name", "subject"]) + self.assertEquals(len(res), 2) + subjects = [r.subject for r in res] + self.assertTrue("_Test Event 1" in subjects) + self.assertTrue("_Test Event 3" in subjects) + self.assertFalse("_Test Event 2" in subjects) + +#### Running Tests + +To run a test for a doctype + + bench run-tests --doctype [doctype] + +This function will build all the test dependencies and run your tests. + +### Running All Tests + +To run all tests: + + bench run-tests + +--- + +## Client Side Testing (Using Selenium) + +> This feature is still under development. + +For an example see, [https://github.com/frappe/erpnext/blob/develop/erpnext/tests/sel_tests.py](https://github.com/frappe/erpnext/blob/develop/erpnext/tests/sel_tests.py) diff --git a/frappe/docs/user/fr/guides/data/import-large-csv-file.md b/frappe/docs/user/fr/guides/data/import-large-csv-file.md new file mode 100644 index 0000000000..5194ebd98d --- /dev/null +++ b/frappe/docs/user/fr/guides/data/import-large-csv-file.md @@ -0,0 +1,23 @@ +To import very large CSV files, you can use the bench utility `import-csv`. + +The benefit is that this is not subject to timeouts if you use the web interface. + +Here is an example: + + bench --site test.erpnext.com import-csv ~/Downloads/Activity_Type.csv + +### Help + + $ bench import-csv --help + Usage: bench import-csv [OPTIONS] PATH + + Import CSV using data import tool + + Options: + --only-insert Do not overwrite existing records + --submit-after-import Submit document after importing it + --ignore-encoding-errors Ignore encoding errors while coverting to unicode + --help Show this message and exit. + + + \ No newline at end of file diff --git a/frappe/docs/user/fr/guides/data/index.md b/frappe/docs/user/fr/guides/data/index.md new file mode 100644 index 0000000000..e6f341b236 --- /dev/null +++ b/frappe/docs/user/fr/guides/data/index.md @@ -0,0 +1,3 @@ +# Data Management + +{index} diff --git a/frappe/docs/user/fr/guides/data/index.txt b/frappe/docs/user/fr/guides/data/index.txt new file mode 100644 index 0000000000..4794a002bc --- /dev/null +++ b/frappe/docs/user/fr/guides/data/index.txt @@ -0,0 +1 @@ +import-large-csv-file diff --git a/frappe/docs/user/fr/guides/deployment/checking-problems-in-bench.md b/frappe/docs/user/fr/guides/deployment/checking-problems-in-bench.md new file mode 100644 index 0000000000..05fcd3d879 --- /dev/null +++ b/frappe/docs/user/fr/guides/deployment/checking-problems-in-bench.md @@ -0,0 +1,15 @@ + + +If you're experiencing delays in scheduled jobs or they don't seem to run, you run run the following command to diagnose the issue. + +`bench doctor` + +A desirable output is like below + + + Workers online: True + Pending tasks 0 + Timed out locks: + + +We'll be adding more health checks soon. diff --git a/frappe/docs/user/fr/guides/deployment/configuring-https.md b/frappe/docs/user/fr/guides/deployment/configuring-https.md new file mode 100644 index 0000000000..4fb90be226 --- /dev/null +++ b/frappe/docs/user/fr/guides/deployment/configuring-https.md @@ -0,0 +1,43 @@ + +### Get the required files + +You can buy a SSL certificate from a trusted Certificate Authority or generate your own. For self signed certificates the browser will show a warning that the certificate is not trusted. + +The files required are + +* Certificate (usually with extension .crt) +* Decrypted private key + +If you have multiple certificates (primary and intermediate), you will have to concatenate them. For example, + + cat your_certificate.crt CA.crt >> certificate_bundle.crt + +Also make sure that your private key is not world readable. Generally, it is owned and readable only by root + + chown root private.key + chmod 600 private.key + +### Move the two files to an appropriate location + + mkdir /etc/nginx/conf.d/ssl + mv private.key /etc/nginx/conf.d/ssl/private.key + mv certificate_bundle.crt /etc/nginx/conf.d/ssl/certificate_bundle.crt + +### Setup nginx config + +Set the paths to the certificate and private key for your site + + bench set-ssl-certificate site1.local /etc/nginx/ssl/certificate_bundle.crt + bench set-ssl-key site1.local /etc/nginx/ssl/private.key + +### Generate nginx config + + bench setup nginx + +### Reload nginx + + service nginx reload + +or + + systemctl reload nginx # for CentOS 7 \ No newline at end of file diff --git a/frappe/docs/user/fr/guides/deployment/email-notifications-for-failed-background-jobs.md b/frappe/docs/user/fr/guides/deployment/email-notifications-for-failed-background-jobs.md new file mode 100644 index 0000000000..3c582762ec --- /dev/null +++ b/frappe/docs/user/fr/guides/deployment/email-notifications-for-failed-background-jobs.md @@ -0,0 +1,23 @@ + + +Frappe handles failure of jobs in the following way,
1) If a job fails, (raises exception), it's logged in Scheduler Log and logs/worker.error.log.
2) Keeps a lock file and would not run anymore if lock file is there.
3) Raises LockTimeoutError in case the lock file is more than 10 minutes old.
You can configure email notification for scheduler errors. By writing a file, sites/common_site_config.json with content
{
+ "celery_error_emails": {
+ "ADMINS": [
+ [
+ "Person 1",
+ "person1@example.com"
+ ],
+ [
+ "Person2 ",
+ "person2@example.com"
+ ]
+ ],
+ "SERVER_EMAIL": "exceptions@example.com"
+ }
+}
+
+One limitation is that it'll use local mailserver on port 25 to send the emails.
\ No newline at end of file diff --git a/frappe/docs/user/fr/guides/deployment/how-to-change-host-name-from-localhost.md b/frappe/docs/user/fr/guides/deployment/how-to-change-host-name-from-localhost.md new file mode 100644 index 0000000000..39d0008ec8 --- /dev/null +++ b/frappe/docs/user/fr/guides/deployment/how-to-change-host-name-from-localhost.md @@ -0,0 +1,18 @@ +While using a virtual machine, links within emails will be point to your host, e.g. localhost, like **http://localhost/set-password** etc. + +Frappe will automatically extract the host name from the incoming request, or from the `host_name` property from `site_config`. + +### bench set-config + +To fix this, you can use **bench set-config** to set your public IP or domain name as the host name. + +#### Example: + + bench --site mysite.com set-config host_name mysite.com + +--- + +Or edit the `frappe-bench/sites/mysite.com/site_config.json` and add a `host_name` property. + + + \ No newline at end of file diff --git a/frappe/docs/user/fr/guides/deployment/how-to-enable-social-logins.md b/frappe/docs/user/fr/guides/deployment/how-to-enable-social-logins.md new file mode 100644 index 0000000000..847cf78ea3 --- /dev/null +++ b/frappe/docs/user/fr/guides/deployment/how-to-enable-social-logins.md @@ -0,0 +1,67 @@ +Use Facebook, Google or GitHub authentication to login to Frappe, and your users will be spared from remembering another password. + +The system uses the **Email ID** supplied by these services to **match with an existing user** in Frappe. If no such user is found, **a new user is created** of the default type **Website User**, if Signup is not disabled in Website Settings. Any System Manager can later change the user type from **Website User** to **System User**, so that the user can access the Desktop. + +
+ As there are not templates that are generated for standard Print Formats, you will have to create new templates from scratch using the Jinja Templating Language via
+Setup > Printing and Branding > Print Format + +
+Tip: You can import Standard Template macros for building your print formats. + +
+Example, adding the standard header:
+
+
{% raw %}{%- from "templates/print_formats/standard_macros.html" import add_header -%}
+{{ add_header() }}{% endraw %}
+
diff --git a/frappe/docs/user/fr/index.md b/frappe/docs/user/fr/index.md
new file mode 100644
index 0000000000..a25785e59e
--- /dev/null
+++ b/frappe/docs/user/fr/index.md
@@ -0,0 +1,3 @@
+# Develop Apps with Frappe
+
+{index}
diff --git a/frappe/docs/user/fr/index.txt b/frappe/docs/user/fr/index.txt
new file mode 100644
index 0000000000..dfc33261aa
--- /dev/null
+++ b/frappe/docs/user/fr/index.txt
@@ -0,0 +1,2 @@
+tutorial
+guides
diff --git a/frappe/docs/user/fr/tutorial/app.md b/frappe/docs/user/fr/tutorial/app.md
new file mode 100644
index 0000000000..b52d71e97c
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/app.md
@@ -0,0 +1,13 @@
+# Qu'est ce qu'une application ?
+
+Dans Frappe, une application est juste une application Python standard. Vous pouvez structurer une application Frappe de
+la même facon que vous structurez une application Python standard. Pour le déploiement, Frappe utilise Setuptools donc
+vous pouvez facilement déployer votre application sur n'importe quelle machine.
+
+Frappe fournit une interface WSGI et pendant vos développements vous pouvez utiliser le serveur Werkzeug embarqué. Pour le
+déploiemenent en production, nous recommandons d'utiliser nginx et gunicorn.
+
+Frappe, c'est aussune une architecture multi-tenant ce qui signifie que vous pouvez lancer plusieurs sites sur une meme
+configuration, chaque site utilisant ses propres applications et utilisateurs. La base de données de chaque site est indépendante.
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/before.md b/frappe/docs/user/fr/tutorial/before.md
new file mode 100644
index 0000000000..775c395c38
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/before.md
@@ -0,0 +1,52 @@
+# Avant de commencer
+
+Liste des outils, technologies utiles dans le développement d'applications avec Frappe.
+ +Il y a un grand nombres de tutoriels en ligne et nous recommandons [CodeAcademy](http://www.codecademy.com/) ou vous +trouverez beaucoup de ressources de qualité. +--- + +#### 1. Python + +La partie serveur de Frappe est codée en Python et c'est une bonne idée d'[apprendre rapidement Python](http://www.codecademy.com/tracks/python) +avant de commencer à comprendre Frappe. [Le tutoriel sur docs.python.org](https://docs.python.org/2.7/tutorial/index.html) +est aussi une excellente ressource pour apprendre Python. Notez que Frappe utilise Python 2.7. + +Pour produire une application de qualité, vous devez inclure des tests automatiques. Vous pouvez comprendre les bases +du développement par les tests [ici](http://code.tutsplus.com/tutorials/beginning-test-driven-development-in-python--net-30137). + +--- + +#### 2. MariaDB / MySQL + +Vous devez comprendre les notions essentielles des bases de données, comment installer, se connecter, créer de nouvelles bases, +et comment faire des requêtes. Voici [une rapide introduction à MySQL](https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial) ou dirigez vous vers [le site MariaDB pour des informations plus détaillées](https://mariadb.com/kb/en/mariadb/documentation/getting-started/) + +--- + +#### 3. HTML / CSS + +Pour construire des interfaces utilisateur, vous devez [apprendre les bases HTML / CSS](http://www.codecademy.com/tracks/web) et [connaître le framework CSS Boostrap](http://getbootstrap.com) + +--- + +#### 4. Construire des interfaces avec Javascript et JQuery + +Pour customiser les formulaires et créer des interfaces riches, le mieux est [d'apprendre Javascript](http://www.codecademy.com/tracks/javascript) et la [fameuse librairie JQuery](http://www.codecademy.com/tracks/jquery). + +--- + +#### 5. Modifier les affichages et les pages web avec le sysème de template Jinja + +Si vous voulez modifier les affichages, vous devez apprendre le [language de template Jinja](http://jinja.pocoo.org/). C'est un moyen rapide de construire des pages web dynamiques. + +--- + +#### 6. Git et GitHub + +[Apprenz à contrinuer à un projet open source en utilisant Git et GitHub](https://guides.github.com/activities/contributing-to-open-source/), deux outils fantastiques pour vous aider à gérer et partager votre code. + +--- + +Quand vous êtes prêts, [essayez de développer une simple applicationa avec Frappe]({{ docs_base_url }}/user/fr/tutorial/app) + diff --git a/frappe/docs/user/fr/tutorial/bench.md b/frappe/docs/user/fr/tutorial/bench.md new file mode 100644 index 0000000000..65a82f29a2 --- /dev/null +++ b/frappe/docs/user/fr/tutorial/bench.md @@ -0,0 +1,13 @@ +# Installer le bench de Frappe + +La facon la plus rapide d'installer Frappe sur un système Unix est d'utiliser frappe-bench. Lisez les instructions détaillées sur +comment installer et utiliser Frappe Bench. + +> [https://github.com/frappe/bench](https://github.com/frappe/bench) + +Avec Frappe Bench vous pourrez configurer et héberger de multiples applications et sites. Frappe Bench configure aussi un Virtualenv +Python donc vos applications seront isolées les unes des autres (et vous n'aurez pas de conflits avce d'autres environnements de developpement). + +La commande `bench` sera installé et vous aidera aidera dans le développement et la gestion des vos applications. + +{suite} diff --git a/frappe/docs/user/fr/tutorial/conclusion.md b/frappe/docs/user/fr/tutorial/conclusion.md new file mode 100644 index 0000000000..44590555f1 --- /dev/null +++ b/frappe/docs/user/fr/tutorial/conclusion.md @@ -0,0 +1,10 @@ +# Conclusion + + +Nous espérons vous avoir donné un apercu de comment les applications sont développées avec Frappe. L'ojectif était de vous +montrer brievement, les différents aspects du développement d'une application en vous donnant un apércu général. Pour aller plus +loin dans les explications, consultez l'API. + +Pour obtenir de l'aider, rejoingnez la communauté sur le[chat sur Gitter](https://gitter.im/frappe/erpnext) ou sur le +[forum des développeurs](https://discuss.erpnext.com) + diff --git a/frappe/docs/user/fr/tutorial/controllers.md b/frappe/docs/user/fr/tutorial/controllers.md new file mode 100644 index 0000000000..963feec9e9 --- /dev/null +++ b/frappe/docs/user/fr/tutorial/controllers.md @@ -0,0 +1,61 @@ +# Les controleurs + +La prochaine étape est d'ajouter quelques méthodes et évéements à nos modèles. Dans l'application, nous devons nous +assurer que si une opération est faite, l'article concerné doit être disponible en stock et que le membre qui souhaite +faire le prêt à un abonnement valide. + +Pour cela, nous pouvons écrire une règle de validation au moment de la sauvegarde du prêt. Ouvrez le template `library_management/doctype/library_transaction/library_transaction.py`. + +Ce fichier est le controleur qui gère les opérations de la librairie, vous pouvez y écrire des méthodes pour: + +1. `before_insert` +1. `validate` (avant l'insertion ou la mise à jour) +1. `on_update` (après la sauvegarde) +1. `on_submit` (quand le document est soumis) +1. `on_cancel` +1. `on_trash` (avant qu'il ne soit sur le point d'être supprimé) + +Vous pouvez écrire des méthodes pour ces événement et elles seront appelées par le framework au bon moment. + +Voici pour finir le controleur: + + from __future__ import unicode_literals + import frappe + from frappe import _ + from frappe.model.document import Document + + class LibraryTransaction(Document): + def validate(self): + last_transaction = frappe.get_list("Library Transaction", + fields=["transaction_type", "transaction_date"], + filters = { + "article": self.article, + "transaction_date": ("<=", self.transaction_date), + "name": ("!=", self.name) + }) + if self.transaction_type=="Issue": + msg = _("Article {0} {1} has not been recorded as returned since {2}") + if last_transaction and last_transaction[0].transaction_type=="Issue": + frappe.throw(msg.format(self.article, self.article_name, + last_transaction[0].transaction_date)) + else: + if not last_transaction or last_transaction[0].transaction_type!="Issue": + frappe.throw(_("Cannot return article not issued")) + +Dans ce scrit: + +1. Nous récuperons la dernière opération, avant la date de l'opération en cours en utilisant la méthode `frappe.get_list` +1. Si la dernière opération est quelque chose qui n'est pas attendu, alors nous levons une exception en utilisant `frappe.throw` +1. Nous utilisons la méthode `_("text")` pour identifier une chaine traduisible. + +Verifiez vos validations en créant de nouveux enregistrements. + +
+
+#### Debogage
+
+Pour debugger, gardez toujours votre console JS ouverte, vérifier les erreurs à la fois de Javascript mais aussi du serveur.
+
+Regardez aussi votre fenêtre de terminal pour les esceptions. Chaque **erreur 500 pour des problèmes internes** seront affichées dans le terminal du serveur en cours d'utilisation.
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/doctype-directory-structure.md b/frappe/docs/user/fr/tutorial/doctype-directory-structure.md
new file mode 100644
index 0000000000..2fbfcb4c30
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/doctype-directory-structure.md
@@ -0,0 +1,32 @@
+# Structure du repertoire d'un DocType
+
+Après avoir sauvegardé vos DocTypes, vérifiez que les modèles dans les fichiers `.json` et `.py` soient créés dans le module
+`apps/library_management/library_management`. La structure du repertoire devrait ressembler à:
+
+ .
+ ├── MANIFEST.in
+ ├── README.md
+ ├── library_management
+ ..
+ │ ├── library_management
+ │ │ ├── __init__.py
+ │ │ └── doctype
+ │ │ ├── __init__.py
+ │ │ ├── article
+ │ │ │ ├── __init__.py
+ │ │ │ ├── article.json
+ │ │ │ └── article.py
+ │ │ ├── library_member
+ │ │ │ ├── __init__.py
+ │ │ │ ├── library_member.json
+ │ │ │ └── library_member.py
+ │ │ ├── library_membership
+ │ │ │ ├── __init__.py
+ │ │ │ ├── library_membership.json
+ │ │ │ └── library_membership.py
+ │ │ └── library_transaction
+ │ │ ├── __init__.py
+ │ │ ├── library_transaction.json
+ │ │ └── library_transaction.py
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/doctypes.md b/frappe/docs/user/fr/tutorial/doctypes.md
new file mode 100644
index 0000000000..199fa92f7c
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/doctypes.md
@@ -0,0 +1,105 @@
+# DocType
+
+Après avoir créé les ^oles, créons des **DocTypes**
+
+Pour créer un nouveau **DocType**, rendez-vous sur:
+
+> Developer > Documents > Doctype > New
+
+
+
+Dans un premier temps, saisissez le module, dans notre cas, **Library Managment**
+
+#### Ajouter des champs
+
+Dans le tableau des champs, vous pouvez ajouter des champs (propriétés) du **DocType** (Article).
+
+Les champs sont bien plus que des colonnes d'une base de données, ils peuvent être:
+
+1. Des colonnes d'une base de données
+1. Des aides pour la mise en page (section / saut de lignes)
+1. Des tableaux enfants (Champs de type tableau)
+1. HTML
+1. Des actions (button)
+1. Des pièces jointes ou des images
+
+Ajoutons des champs pour l'article.
+
+
+
+Quand vous ajoutez des champs, vous devez entrer le **Type**. Le **Label** est optionnel pour les retours de sections et de colonnes.
+Le **Name** (`fieldname`) ets le nom de la colonne dans la base de données et aussi la propriété du controleur. Les définitions
+doivent être *code friendly*, (par exemple insérer des underscores (_) à la place de espaces. Si vous laissez le champs `fieldname`
+vide, il sera automatiquement complété à la sauvegarde.
+
+Vous pouvez aussi définir d'autres propriétés comme par exemple prciser que le champs est requis ou en lecture seule etc.
+
+Nous pouvons ajouter les champs suivants:
+
+1. Article Name (Data)
+2. Author (Data)
+3. Description
+4. ISBN
+5. Status (Select): Pour les champs de type select, vous devez compléter les options. entrer **Issued** et **Available**
+sur chacune des lignes comme ci-dessous
+6. Publisher (Data)
+7. Language (Data)
+8. Image (Attach Image)
+
+
+#### Ajouter des permissins
+
+Après avoir ajouté les champs, validez et ajoutez un nouveau rôle dans la section des règles de permissions. Pour le moment
+ajoutons les droits le lecture, ecriture, création et suppression au modèle **Librarian**. Frappe à une gestion fine des
+permissions sur les modèles. Vous pouvez aussi changer les permissions plus tard en utilisant le gestionnaire de permissions
+dans la configuration.
+
+
+
+#### Sauvegarde
+
+Cliquez sur le bouton **Save**. Quand le bouton est cliqué, une popup vous demandera le nom. Donnez le nom **Article** et
+sauvegardez le **DocType**.
+
+Maintenant, connectez vous à MySQL et vérifiez la base de données créée:
+
+ $ bench mysql
+ Welcome to the MariaDB monitor. Commands end with ; or \g.
+ Your MariaDB connection id is 3931
+ Server version: 5.5.36-MariaDB-log Homebrew
+
+ Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.
+
+ Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
+
+ MariaDB [library]> DESC tabArticle;
+ +--------------+--------------+------+-----+---------+-------+
+ | Field | Type | Null | Key | Default | Extra |
+ +--------------+--------------+------+-----+---------+-------+
+ | name | varchar(255) | NO | PRI | NULL | |
+ | creation | datetime(6) | YES | | NULL | |
+ | modified | datetime(6) | YES | | NULL | |
+ | modified_by | varchar(40) | YES | | NULL | |
+ | owner | varchar(60) | YES | | NULL | |
+ | docstatus | int(1) | YES | | 0 | |
+ | parent | varchar(255) | YES | MUL | NULL | |
+ | parentfield | varchar(255) | YES | | NULL | |
+ | parenttype | varchar(255) | YES | | NULL | |
+ | idx | int(8) | YES | | NULL | |
+ | article_name | varchar(255) | YES | | NULL | |
+ | status | varchar(255) | YES | | NULL | |
+ | description | text | YES | | NULL | |
+ | image | varchar(255) | YES | | NULL | |
+ | publisher | varchar(255) | YES | | NULL | |
+ | isbn | varchar(255) | YES | | NULL | |
+ | language | varchar(255) | YES | | NULL | |
+ | author | varchar(255) | YES | | NULL | |
+ +--------------+--------------+------+-----+---------+-------+
+ 18 rows in set (0.00 sec)
+
+
+Comme vous pouvez le voir, en plus de nos **DocFields**, d'autres colonnes ont été ajoutées dans notre table. Notez les
+changement, la clé primaire sur, `name`, `owner`(l'utilisateur quia créer l'enregistrement), `creation` et `modified` (des timestamps pour enregistrer les dates de creation et de modification).
+
+{suite}
+
diff --git a/frappe/docs/user/fr/tutorial/form-client-scripting.md b/frappe/docs/user/fr/tutorial/form-client-scripting.md
new file mode 100644
index 0000000000..28786d1e39
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/form-client-scripting.md
@@ -0,0 +1,46 @@
+## Codes des formulaires
+
+Jusqu'a maintenant, nous avons développé un système basique qui fonctionne parfaitement sans avoir eu besoin d'écrire une
+ seule ligne de code. Ajoutons donc quelques scripts pour rendre l'applications plus professionnelle et ajoutons des validations
+ pour éviter que les utilisateurs n'enregistrent des données invalides.
+
+
+### Les scripts coté client
+
+Dans le **DocType** **Library Transaction**, nous n'avons qu'un seul champ `Member Name`. Nous n'avons pas fait 2 champs.
+Ca pourrait être bien d'avoir deux champs, mais juste pour l'exemple, considérons que nous avons à implémenter cela. Pour ce
+faire, nous allons devoir écrire un gestionnaire d'évenements pour lorsque l'utilisateur sélectionne le champs `library_member` et accède aux données de l'utilisateur depuis le serveur en utilisant une API REST, remplisse les données dans le formaulaire.
+
+Pour commencer ce script, dans le repertoire `library_management/doctype/library_transaction`, créez un nouveau fichier
+`library_transaction.js`. Ce fichier sera automatiquement executé lorsque le modèle `Library Transaction` est appelé par l'utilisateur.
+Donc, dans ce fichier nous pouvons lier des actions à des événemenents mais aussi écrire d'autres fonctiones.
+
+#### library_transaction.js
+
+ frappe.ui.form.on("Library Transaction", "library_member",
+ function(frm) {
+ frappe.call({
+ "method": "frappe.client.get",
+ args: {
+ doctype: "Library Member",
+ name: frm.doc.library_member
+ },
+ callback: function (data) {
+ frappe.model.set_value(frm.doctype,
+ frm.docname, "member_name",
+ data.message.first_name
+ + (data.message.last_name ?
+ (" " + data.message.last_name) : ""))
+ }
+ })
+ });
+
+1. **frappe.ui.form.on(*doctype*, *fieldname*, *handler*)** est utilisé pour lier un évenement au gestionnaire d'évenements
+ quand la propriété `library_member` est complétée.
+1. Dans le gestionnaire, nous déclenchons un appel AJAX vers `frappe.client.get`. En réponse, nous avons l'ojet demandé sous forme d'une JSON. [En savoir plus sur l'API](/frappe/user/fr/guides/integration/rest_api).
+1. En utilisant **frappe.model.set_value(*doctype*, *name*, *fieldname*, *value*)** nous définissons la valeur dans le formulaire.
+
+**Note:** Pour vérifier que votre script fonctionne, n'oubliez pas de recharger votre page avant de tester.
+Les changements dans les scripts côté client ne sont pas automatiquement pris en compte quand vous êtes en mode développeur.
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/index.md b/frappe/docs/user/fr/tutorial/index.md
new file mode 100644
index 0000000000..a0bd012fb0
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/index.md
@@ -0,0 +1,41 @@
+# Tutoriel Frappe
+
+Dans ce guide nous allons vous montrer comment créer une application de A à Z en utilisant **Frappe**. Avec un
+exemple de gestion d'une librairie, nous allons aborder les sujets suivants:
+
+1. Installation
+1. Créer une nouvelle application
+1. Créer des modèles
+1. Créer des utilisateurs et des enregristrements
+1. Créer des contrôleurs
+1. Créer des vues web
+1. Configurer des Hooks et des tâches
+
+## A qui s'adresse ce tutoriel ?
+
+Ce guide est à destination des développeurs familiers avec la création d'applications web. Le framework Frappe est développé
+avec Python, utilise le système de base de données MariaDB et database and HTML/CSS/Javascript pour le rendu des pages.
+Il est donc necessaire d'être familier avec ces technologies. Si vous n'avez jamais utilisé Python auparavant, vous devriez
+suivre un tutoriel rapide avant de suivre ce guide.
+
+Frappe utilise le système de gestion de version git sur Github. Il est donc imporant que vous connaissiez les basiques de
+l'utilisation de git et que vous ayez un compte sur Github pour gérer vos applications.
+
+## Exemple
+
+Dans ce guide, nous allons développer une simple application de **gestion de librairie**. Dans cette applications nous aurons
+les modèles suivants:
+
+1. Article (un livre ou tout autre produit qui peut être emprunté)
+1. Library Member (membre de la librairie)
+1. Library Transaction (prêt ou retour d'un article)
+1. Library Membership (Periode pendant laquelle un membre peut emprunter)
+1. Library Management Setting (configuration générale)
+
+L'interace utilisateur (UI) pour le libraire sera **Frappe Desk**, un système de rendu d'interface où les formulaires sont
+automatiquement générés depuis les modèles en appliquant rôles et permissions.
+
+Nous allons aussi créer des vues pour la lirairie afin que les utilisateurs puissent parcourir les articles depuis un site
+internet.
+
+{index}
diff --git a/frappe/docs/user/fr/tutorial/index.txt b/frappe/docs/user/fr/tutorial/index.txt
new file mode 100644
index 0000000000..1fed6aed93
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/index.txt
@@ -0,0 +1,19 @@
+before
+app
+bench
+new-app
+setting-up-the-site
+start
+models
+roles
+doctypes
+naming-and-linking
+doctype-directory-structure
+users-and-records
+form-client-scripting
+controllers
+reports
+web-views
+single-doctypes
+task-runner
+conclusion
diff --git a/frappe/docs/user/fr/tutorial/models.md b/frappe/docs/user/fr/tutorial/models.md
new file mode 100644
index 0000000000..7f49a254a1
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/models.md
@@ -0,0 +1,26 @@
+# Définir des modèles
+
+La prochaine étape est de définir les modèles que nous avons présenté en introduction. Dans Frappe, les modèles sont appelés
+des **DocTypes**. Vous pouvez définir de nouveaux **DocTypes** depuis l'interface. Les **DocTypes** sont faits de **DocField**
+et de permissions appelées **DocPerms**.
+
+Quand un DocType est sauvegardé, une nouvelle table est créee dans la base de données. Cette table est nommée `tab[doctype]`.
+
+Quand vous créez un **DocType**, un nouveau repertoire est créé dans le **Module**, un fichier JSON définissant le modèles
+ainsin qu'un template de controleur sont automatiquement créés.
+Qaund vous mettez à jour un **DocType**, le modèle JSON est mis à jour et lorsque la commande `bench migrate` est exécutée,
+c'est synchronisé avec la base de données. Cela facilite a mise à jour et la migrations des schemas.
+
+### Le mode développeur
+
+Pour créer des modèles, vous devez définir la valeur de `developer_mode` à 1 dans le fichier `site_config.json` situé dans
+le repertoire /sites/library et executer la commande `bench clear-cache` ou utiliser l'interface et cliquer sur "Recharger"
+pour appliquer les changements. Vous devriez maintenant voir l'application "Developer" sur le bureau.
+
+ {
+ "db_name": "bcad64afbf",
+ "db_password": "v3qHDeVKvWVi7s97",
+ "developer_mode": 1
+ }
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/naming-and-linking.md b/frappe/docs/user/fr/tutorial/naming-and-linking.md
new file mode 100644
index 0000000000..cf4be0af57
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/naming-and-linking.md
@@ -0,0 +1,79 @@
+# Nommage et relation entre DocType
+
+Définissons un nouveau **DocType**:
+
+1. Library Member (First Name, Last Name, Email ID, Phone, Address)
+
+
+
+
+#### Le nommage des DocTypes
+
+Les **DocTypes** peuvent être nommés de différentes facons:
+
+1. Sur la base d'un champ
+1. Sur la base d'une série
+1. Par le controlleur (code)
+1. Par la console
+
+Cela peut être configuré par le champs **Autoname**. Pour le controlerur, laissez vide.
+
+> **Search Fields**: Un **DocType** peut être nommé sur la base d'une serie mais nous devons toujours pouvoir le chercher par un nom.
+Dans notre cas, l'arcicle peut etre cherché par un titre ou par l'auteur. Remplissons donc le champs **Search Fields**.
+
+
+
+#### Relation et champs select
+
+Les clés étrangères sont, dans Frappe, traduits par un champs de type **Link**. Le **DocType** ciblé doit être mentionné
+ dans le champs **Options**.
+
+Dans notre exemple, pour le **doctype** `Library Transaction`, nous avons un lien vers `Library Member` et vers `Article`.
+
+**Note:** Souvenez vous que les champs **Link** ne sont pas automatiquement enregistré comme clé étrangère afin d'éviter
+d'indexer la colonne. Cela pourrait ne pas être optimum, c'est pour cela que la validation de la clé étrangère est faite
+par le framework.
+
+
+
+Pour les champs **select**, comme mentionné plus tôt, ajoutez chacune des options dans le champs **Options**, chaque
+option sur une nouvelle ligne.
+
+
+
+faites de même pour les autres modèles.
+
+#### Valeurs liées
+
+Un modèle standard c'est lorsque vous selectionnez un ID, admettons **Library Member** dans **Library Membership**, alors,
+les noms et prénoms du membre doivent être copiés dans le champs adequat lors d'enregistrements dans `Library Membership Transaction`.
+
+Pour cela, nous pouvons utiliser des champs en lecture seules et, dans les options, nous pouvons définir le nom du lien
+et le nom du champs de la propriété que nous voulons parcourir. Dans cet exemple, dans **Member First Name** nous pouvons
+définir `library_member.first_name`
+
+
+
+### Completeter les Modeles
+
+De la même facon, vous pouvez compléter les autres modèles pour qu'au final le résultat soit:
+
+#### Article
+
+
+
+#### Library Member
+
+
+
+#### Library Membership
+
+
+
+#### Library Transaction
+
+
+
+> Vérifiez que le modèles **Librarian** ait les permissions sur chaque **DocType**.
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/new-app.md b/frappe/docs/user/fr/tutorial/new-app.md
new file mode 100644
index 0000000000..d3ae222f46
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/new-app.md
@@ -0,0 +1,56 @@
+# Créer une nouvelle application
+
+Une fois que Bench est installé, vous apercevrez deux répertoires, `apps` and `sites`. Toutes les applications seront
+installées dans `apps`.
+
+Pour créer une nouvelle application, allez dans votre répertoire et lancer la commande, `bench new-app {app_name}` et
+remplissez les informations à propos de votre application. Cela va créer un template d'application pour vous.
+
+ $ bench new-app library_management
+ App Title (defaut: Lib Mgt): Library Management
+ App Description: App for managing Articles, Members, Memberships and Transactions for Libraries
+ App Publisher: Frappe
+ App Email: info@frappe.io
+ App Icon (default 'octicon octicon-file-directory'): octicon octicon-book
+ App Color (default 'grey'): #589494
+ App License (default 'MIT'): GNU General Public License
+
+### Structure d'une application
+
+L'application sera créée dans un répertoire appelé `library_management` et aura la structure suivante:
+
+ .
+ ├── MANIFEST.in
+ ├── README.md
+ ├── library_management
+ │ ├── __init__.py
+ │ ├── config
+ │ │ ├── __init__.py
+ │ │ └── desktop.py
+ │ ├── hooks.py
+ │ ├── library_management
+ │ │ └── __init__.py
+ │ ├── modules.txt
+ │ ├── patches.txt
+ │ └── templates
+ │ ├── __init__.py
+ │ ├── generators
+ │ │ └── __init__.py
+ │ ├── pages
+ │ │ └── __init__.py
+ │ └── statics
+ ├── license.txt
+ ├── requirements.txt
+ └── setup.py
+
+1. `config` configuration de l'applicationfolder contains application configuration info
+1. `desktop.py` est l'endroit ou les icones peuvent être ajoutées au bureau
+1. `hooks.py` contient les définitions de la facon dont l'intégration avec l'environnement et les autres applications est faite.
+1. `library_management` (interne) est un **module** bootstrappé. Dans Frappe, un **module** est l'endroit ou sont les controlleurs et les modeles.
+1. `modules.txt` contient la liste des **modules** dans l'application. Quand vous créez un nouveau module, c'est obligatoire de l'ajouter dans ce fichier.
+1. `patches.txt` contient les patchs de migration. Ce sont des références Python utilisant la notation par point.
+1. `templates` est le repertoire qui contient les templates des vues. Les templates pour **Login** et autres pages par défaut sont déjà contenus dans Frappe.
+1. `generators` est l'endroit ou sont stockés les templates des modèles. Chaque instance du modèle a une route web comme par exemple les **articles de blog** ou chaque article a une adresse unique. Dans Frappe, Jinj2 est utilisé pour les templates.
+1. `pages` contient les routes uniques pour les templates. Par exemple "/blog" ou "/article"
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/reports.md b/frappe/docs/user/fr/tutorial/reports.md
new file mode 100644
index 0000000000..ee93a0eb14
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/reports.md
@@ -0,0 +1,7 @@
+# Rapports
+
+Vous pouvez aussi cliquer sur le texte "Rapports" dans la barre latérale de gauche pour voir vos données dans un tableau.
+
+
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/roles.md b/frappe/docs/user/fr/tutorial/roles.md
new file mode 100644
index 0000000000..8ea3498166
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/roles.md
@@ -0,0 +1,15 @@
+# Créer des rôles
+
+Avant de créer des modèles, nous devons auparavant créer des rôles qui auront des permissions sur le modèles. Nous allons
+créer deux rôles:
+
+1. Librarian pour définir le libraire
+1. Library Member pour définir un membre
+
+Pour créer un nouveau rôle, se rendre sur:
+
+> Setup > Users > Role > New
+
+
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/setting-up-the-site.md b/frappe/docs/user/fr/tutorial/setting-up-the-site.md
new file mode 100644
index 0000000000..9c595e2974
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/setting-up-the-site.md
@@ -0,0 +1,56 @@
+# Configurer le site
+
+Créons un site et appelons le `library`.
+
+Vous pouvez installer un nouveau site avec la commande `bench new-site library`
+
+Cette commande va créer une nouvelle base de données, un repertoire et installer `frappe` (qui est aussi une application!)
+dans le nouveau site. L'application `frappe` a deux modules par défaut, **Core** et **Website**. Le module **Core**
+contient les modèles basiques pour l'application. En effet, Frappe contient des modèles par défaut qui sont appelés **DocTypes**
+mais nous en reparlerons plus tard.
+
+ $ bench new-site library
+ MySQL root password:
+ Installing frappe...
+ Updating frappe : [========================================]
+ Updating country info : [========================================]
+ Set Administrator password:
+ Re-enter Administrator password:
+ Installing fixtures...
+ *** Scheduler is disabled ***
+
+### Structure du site
+
+Un nouveau repertoires appelé `library` sera créé dans le repertoire `sites`. Voici la structure standard pour un site.
+
+ .
+ ├── locks
+ ├── private
+ │ └── backups
+ ├── public
+ │ └── files
+ └── site_config.json
+
+1. `public/files` contient les fichiers uploadés.
+1. `private/backups` contient les backups.
+1. `site_config.json` contient la configuration du site.
+
+### COnfiguration par défaut
+
+Dans le cas ou vous avez plusieurs sites, utilisez la commande `bench use [site_name]` pour définir le site par défaut.
+
+Exemple:
+
+ $ bench use library
+
+### Installer une application
+
+Maintenant installons notre application `library_management` dans notre site `library`
+
+1. Installer library_management avec la commande: `bench --site [site_name] install-app [app_name]`
+
+Exemple:
+
+ $ bench --site library install-app library_management
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/single-doctypes.md b/frappe/docs/user/fr/tutorial/single-doctypes.md
new file mode 100644
index 0000000000..e3b10a0523
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/single-doctypes.md
@@ -0,0 +1,12 @@
+# Les DocTypes de type Single
+
+Une application aura en générale une seule page de configuration. Dans notre application nous pouvons donc définir une page
+ou nous définierons la période prêt. Nous avons aussi besoin de sauvegarder cette propriété. Dans Frappe, ceci est possible
+en utilisant un un Doctype de type **Single**. Un DocType **Single** est comme le pattern Singleton, une instance unique
+d'une classe. Appelons le **Library Managment Settings**.
+
+Pour créer un DocType de type **Single** cochez la case **Is Single**.
+
+
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/start.md b/frappe/docs/user/fr/tutorial/start.md
new file mode 100644
index 0000000000..bc71edd27e
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/start.md
@@ -0,0 +1,32 @@
+# Demarrer avec Bench
+
+Maintenant, nous pouvons nous connecter et vérifier que tout fonctionne normalement.
+
+Pour démarrer le serveur de développement, lancez la commande `bench start`
+
+ $ bench start
+ 13:58:51 web.1 | started with pid 22135
+ 13:58:51 worker.1 | started with pid 22136
+ 13:58:51 workerbeat.1 | started with pid 22137
+ 13:58:52 web.1 | * Running on http://0.0.0.0:8000/
+ 13:58:52 web.1 | * Restarting with reloader
+ 13:58:52 workerbeat.1 | [2014-09-17 13:58:52,343: INFO/MainProcess] beat: Starting...
+
+Vous pouvez maintenant ouvrir votre navigateur et vous rendre sur `http://localhost:8000`. Si tout se passe bien vous devriez voir:
+
+
+
+Maintenant, connectez vous avec les identifiants suivants:
+
+Login ID: **Administrator**
+
+Mot de passe: **Le mot de passe que vous avez définis pendant l'installation**
+
+Une fois connecté, vous devriez voir le `Desk`, c'est à dire la page d'accueil
+
+
+
+Comme vous pouvez le voir, Frappe fournit quelques applications comme un To Do, un gestionnaire de fichiers etc. Ces applications
+peuvent être intégrées par la suite.
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/task-runner.md b/frappe/docs/user/fr/tutorial/task-runner.md
new file mode 100644
index 0000000000..9bc2d4aa42
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/task-runner.md
@@ -0,0 +1,82 @@
+# Les tâches planifiées
+
+Finalement, une application a aussi à envoyer des emails de notifications ou d'autres taches planifiées. Dans Frappe, si
+ vous avez configuré le **bench**, la tâche / planificateur est configuré via Celery en utilisant les queues Redis.
+
+Pour ajouter un nouveau gestionnaire de tâches, ouvrez le fichier `hooks.py` et ajoutez un nouveau gestionnaire. Les gestionnaire
+ par defaut sont `all`, `daily`, `weekly`, `monthly`. Le gestionanire `all` est appelé toutes les 3 minutes par defaut.
+
+ # Scheduled Tasks
+ # ---------------
+
+ scheduler_events = {
+ "daily": [
+ "library_management.tasks.daily"
+ ],
+ }
+
+Ici, nous pointons sur une fonction en Python et cette fonction sera appelée tous les jours. Voyons à quoi cette fonction
+ressemble:
+
+ # Copyright (c) 2013, Frappe
+ # For license information, please see license.txt
+
+ from __future__ import unicode_literals
+ import frappe
+ from frappe.utils import datediff, nowdate, format_date, add_days
+
+ def daily():
+ loan_period = frappe.db.get_value("Library Management Settings",
+ None, "loan_period")
+
+ overdue = get_overdue(loan_period)
+
+ for member, items in overdue.iteritems():
+ content = """Please return them as soon as possible
+
+Maintenant deconnectez-vous puis connectez vous avec l'utilisateur que vous venez de créer.
+
+### 4.2 Créer des enregistrements
+
+Vous allez désormais voirs une icones pour notre module de gestion de librairie. Cliquez sur cette icone et vous apercevrez
+la page du module:
+
+
+
+Vous pouvez donc voir les **DocTypes** que nous avons créés pour l'application. Créons quelques enregistrements.
+
+Définissons un nouvel Article:
+
+
+
+Le **DocType** que vous avons déinis est transformé en formulaire. Les règles de valdiation seront appliquées selons nos
+définitions. Remplissons le formulaire pour créer notre premier article.
+
+
+
+Vous pouvez aussi ajouter une image.
+
+
+
+Maintenant créons un nouveau membre.
+
+
+
+Après cela, définissons un nouvel abonnement pour ce membre.
+
+Ici, si vous vous souvenez, nous avons définis que les noms et prénoms doivent automatiquement être renseignés dès que nous
+avons selectionné l'ID du membre.
+
+
+
+Comme vous pouvez le voir, la date est formattée en années-mois-jour qui est le format du système. Pour configurer / changer
+le format de la date et de l'heure, rendez-vous sur:
+
+> Setup > Settings > System Settings
+
+
+
+{suite}
diff --git a/frappe/docs/user/fr/tutorial/web-views.md b/frappe/docs/user/fr/tutorial/web-views.md
new file mode 100644
index 0000000000..ed5409d800
--- /dev/null
+++ b/frappe/docs/user/fr/tutorial/web-views.md
@@ -0,0 +1,72 @@
+# es vues web
+
+Frappe a deux principaux environnements, le **bureau** et **le web**. Le **bureau** est un environnement riche AJAX alors
+que **le web** est une collection plus traditionnelle de fichers HTML pour la consultation publique. Les vues web peuvent
+aussi être générées pour créer des vues plus controllées pour les utilisateurs qui peuvent se connecter mais qui n'ont pas
+accès au desk.
+
+Dans Frappe, les vues sont gérées par des templates et sont tout naturellement placés dans le repertoire `templates`. Il
+y a 2 principaux types de templates.
+
+1. Pages: Ce sont des templates Jinja ou une vue unique existe pour une route (exemple:`/blog`).
+2. Générateurs: Ce sont des templates ou chaque instance représente un **DocType** réprésenté par une url unique. (exemple:`/blog/a-blog`, `blog/b-blog` etc.)
+3. Les listes et les vues: Ce sont des listes standards et des vues avec l'url `[doctype]/[name]` et sont affichées en fonction des permissions.
+
+### Les vues web standards
+
+> Cette fonctionnalité est encore en développement.
+
+Jettons un oeuil aux vues standards:
+
+Si vous êtes connecté avec votre utilisateur de test, rendez-vous sur`/article` et vous devriez voir la liste des articles:
+
+
+
+Cliquez sur un article et vous devriez voir une vue par défaut.
+
+
+
+Maintenant, si vous voulez une meilleur liste pour vos articles, créez un fichier appelé `list_item.html` dans le
+repertoire `library_management/doctype/article`. Voici un exemple du contenu de ce fichier:
+
+ {{ doc.author }}
+{{ (doc.description[:200] + "...") + if doc.description|length > 200 else doc.description }}
+Publisher: {{ doc.publisher }}
+Oops, your automated backup to %s failed.
-Error message: %s
+Error message:
+
%s
+
Please contact your system manager for more information.
""" % (service_name, error_status) @@ -87,7 +91,6 @@ def get_dropbox_authorize_url(): @frappe.whitelist(allow_guest=True) def dropbox_callback(oauth_token=None, not_approved=False): - from dropbox import client if not not_approved: if frappe.db.get_value("Dropbox Backup", None, "dropbox_access_key")==oauth_token: allowed = 1 @@ -127,23 +130,15 @@ def dropbox_callback(oauth_token=None, not_approved=False): frappe.response['page_name'] = 'message.html' def backup_to_dropbox(): - from dropbox import client, session - from frappe.utils.backups import new_backup - from frappe.utils import get_files_path, get_backups_path if not frappe.db: frappe.connect() - sess = session.DropboxSession(frappe.conf.dropbox_access_key, frappe.conf.dropbox_secret_key, "app_folder") - - sess.set_token(frappe.db.get_value("Dropbox Backup", None, "dropbox_access_key"), - frappe.db.get_value("Dropbox Backup", None, "dropbox_access_secret")) - - dropbox_client = client.DropboxClient(sess) + dropbox_client = get_dropbox_client() # upload database backup = new_backup(ignore_files=True) filename = os.path.join(get_backups_path(), os.path.basename(backup.backup_path_db)) - upload_file_to_dropbox(filename, "/database", dropbox_client) + dropbox_client = upload_file_to_dropbox(filename, "/database", dropbox_client) frappe.db.close() @@ -151,12 +146,33 @@ def backup_to_dropbox(): did_not_upload = [] error_log = [] - upload_from_folder(get_files_path(), "/files", dropbox_client, did_not_upload, error_log) - upload_from_folder(get_files_path(is_private=1), "/private/files", dropbox_client, did_not_upload, error_log) + dropbox_client = upload_from_folder(get_files_path(), "/files", dropbox_client, did_not_upload, error_log) + dropbox_client = upload_from_folder(get_files_path(is_private=1), "/private/files", dropbox_client, did_not_upload, error_log) frappe.connect() return did_not_upload, list(set(error_log)) +def get_dropbox_client(previous_dropbox_client=None): + from dropbox import client + + sess = get_dropbox_session() + + sess.set_token(frappe.db.get_value("Dropbox Backup", None, "dropbox_access_key"), + frappe.db.get_value("Dropbox Backup", None, "dropbox_access_secret")) + + dropbox_client = client.DropboxClient(sess) + + # upgrade to oauth2 + token = dropbox_client.create_oauth2_access_token() + dropbox_client = client.DropboxClient(token) + + if previous_dropbox_client: + dropbox_client.connection_reset_count = previous_dropbox_client.connection_reset_count + 1 + else: + dropbox_client.connection_reset_count = 0 + + return dropbox_client + def upload_from_folder(path, dropbox_folder, dropbox_client, did_not_upload, error_log): import dropbox.rest @@ -187,11 +203,13 @@ def upload_from_folder(path, dropbox_folder, dropbox_client, did_not_upload, err if not found: try: - upload_file_to_dropbox(filepath, dropbox_folder, dropbox_client) + dropbox_client = upload_file_to_dropbox(filepath, dropbox_folder, dropbox_client) except Exception: did_not_upload.append(filename) error_log.append(frappe.get_traceback()) + return dropbox_client + def get_dropbox_session(): try: from dropbox import session @@ -218,10 +236,26 @@ def upload_file_to_dropbox(filename, folder, dropbox_client): try: uploader.upload_chunked() uploader.finish(folder + "/" + os.path.basename(filename), overwrite=True) - except rest.ErrorResponse: - pass + + except rest.ErrorResponse, e: + # if "[401] u'Access token not found.'", + # it means that the user needs to again allow dropbox backup from the UI + # so re-raise + + if (e.startswith("[401]") + and dropbox_client.connection_reset_count < 10 + and e != "[401] u'Access token not found.'"): + + # session expired, so get a new connection! + # [401] u"The given OAuth 2 access token doesn't exist or has expired." + dropbox_client = get_dropbox_client(dropbox_client) + + else: + raise else: dropbox_client.put_file(folder + "/" + os.path.basename(filename), f, overwrite=True) + return dropbox_client + if __name__=="__main__": backup_to_dropbox() diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index a94030cd64..f98b7e997c 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -4,7 +4,8 @@ from __future__ import unicode_literals import frappe, sys from frappe import _ -from frappe.utils import cint, flt, now, cstr, strip_html, getdate, get_datetime, to_timedelta +from frappe.utils import (cint, flt, now, cstr, strip_html, getdate, get_datetime, to_timedelta, + sanitize_html, sanitize_email) from frappe.model import default_fields from frappe.model.naming import set_new_name from frappe.modules import load_doctype_module @@ -177,7 +178,7 @@ class BaseDocument(object): d = frappe._dict() for fieldname in self.meta.get_valid_columns(): d[fieldname] = self.get(fieldname) - + # if no need for sanitization and value is None, continue if not sanitize and d[fieldname] is None: continue @@ -188,7 +189,7 @@ class BaseDocument(object): d[fieldname] = cint(d[fieldname]) elif df.fieldtype in ("Currency", "Float", "Percent") and not isinstance(d[fieldname], float): - + d[fieldname] = flt(d[fieldname]) elif df.fieldtype in ("Datetime", "Date") and d[fieldname]=="": @@ -505,6 +506,42 @@ class BaseDocument(object): frappe.throw(_("Not allowed to change {0} after submission").format(df.label), frappe.UpdateAfterSubmitError) + def _sanitize_content(self): + """Sanitize HTML and Email in field values. Used to prevent XSS. + + - Ignore if 'Ignore XSS Filter' is checked or fieldtype is 'Code' + """ + if frappe.flags.in_install: + return + + for fieldname, value in self.get_valid_dict().items(): + if not value or not isinstance(value, basestring): + continue + + elif ("<" not in value and ">" not in value): + # doesn't look like html so no need + continue + + elif "" in value and not ("' + escaped_xss = xss.replace('<', '<').replace('>', '>') + d.subject += xss + d.save() + d.load_from_db() + + self.assertTrue(xss not in d.subject) + self.assertTrue(escaped_xss in d.subject) + + # onload + xss = '