* [feature] document versioning #2469 * [minor] remove on_update from WebsiteGenerator * [fix] delete shares when deleting user * [test] don't run delete in background if test * [fix] test_db * [added] Deleted Document * [fix] added track_changes in all documents * [fix] add to deleted only if exists * [fix] in_install flag in deleted documents * [minor] name will always be resetversion-14
@@ -1115,16 +1115,6 @@ def get_value(*args, **kwargs): | |||
""" | |||
return db.get_value(*args, **kwargs) | |||
def add_version(doc): | |||
"""Insert a new **Version** of the given document. | |||
A **Version** is a JSON dump of the current document state.""" | |||
get_doc({ | |||
"doctype": "Version", | |||
"ref_doctype": doc.doctype, | |||
"docname": doc.name, | |||
"doclist_json": as_json(doc.as_dict()) | |||
}).insert(ignore_permissions=True) | |||
def as_json(obj, indent=1): | |||
from frappe.utils.response import json_handler | |||
return json.dumps(obj, indent=indent, sort_keys=True, default=json_handler) | |||
@@ -1254,6 +1244,21 @@ def local_cache(namespace, key, generator, regenerate_if_none=False): | |||
return local.cache[namespace][key] | |||
def enqueue(*args, **kwargs): | |||
''' | |||
Enqueue method to be executed using a background worker | |||
:param method: method string or method object | |||
:param queue: (optional) should be either long, default or short | |||
:param timeout: (optional) should be set according to the functions | |||
:param event: this is passed to enable clearing of jobs from queues | |||
:param async: (optional) if async=False, the method is executed immediately, else via a worker | |||
:param job_name: (optional) can be used to name an enqueue call, which can be used to prevent duplicate calls | |||
:param kwargs: keyword arguments to be passed to the method | |||
''' | |||
import frappe.utils.background_jobs | |||
frappe.utils.background_jobs.enqueue(*args, **kwargs) | |||
def get_doctype_app(doctype): | |||
def _get_doctype_app(): | |||
doctype_module = local.db.get_value("DocType", doctype, "module") | |||
@@ -5,7 +5,7 @@ frappe.ui.form.on("Communication", "refresh", function(frm) { | |||
if(frm.doc.reference_doctype && frm.doc.reference_name) { | |||
frm.add_custom_button(__(frm.doc.reference_name), function() { | |||
frappe.set_route("Form", frm.doc.reference_doctype, frm.doc.reference_name); | |||
}, __("View")); | |||
}); | |||
} else { | |||
// if an unlinked communication, set email field | |||
if (frm.doc.sent_or_received==="Received") { | |||
@@ -19,12 +19,12 @@ frappe.ui.form.on("Communication", "refresh", function(frm) { | |||
frm.add_custom_button(__("Close"), function() { | |||
frm.set_value("status", "Closed"); | |||
frm.save(); | |||
}, __("Status")); | |||
}); | |||
} else if (frm.doc.status !== "Linked") { | |||
frm.add_custom_button(__("Reopen"), function() { | |||
frm.set_value("status", "Open"); | |||
frm.save(); | |||
}, __("Status")); | |||
}); | |||
} | |||
}); | |||
@@ -1051,8 +1051,8 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 1, | |||
"in_filter": 0, | |||
"in_standard_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Message ID", | |||
"length": 995, | |||
"no_copy": 0, | |||
@@ -1107,7 +1107,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-14 16:02:10.145975", | |||
"modified": "2016-12-29 14:39:53.460122", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Communication", | |||
@@ -1162,5 +1162,6 @@ | |||
"search_fields": "subject", | |||
"sort_order": "DESC", | |||
"title_field": "subject", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -0,0 +1,22 @@ | |||
// Copyright (c) 2016, Frappe Technologies and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Deleted Document', { | |||
refresh: function(frm) { | |||
if(frm.doc.restored) { | |||
frm.add_custom_button(__('Open'), function() { | |||
frappe.set_route('Form', frm.doc.deleted_doctype, frm.doc.new_name); | |||
}); | |||
} else { | |||
frm.add_custom_button(__('Restore'), function() { | |||
frappe.call({ | |||
method: 'frappe.core.doctype.deleted_document.deleted_document.restore', | |||
args: {name: frm.doc.name}, | |||
callback: function(r) { | |||
// | |||
} | |||
}); | |||
}); | |||
} | |||
} | |||
}); |
@@ -0,0 +1,256 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"beta": 0, | |||
"creation": "2016-12-29 12:59:48.638970", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "", | |||
"editable_grid": 1, | |||
"engine": "InnoDB", | |||
"fields": [ | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "deleted_name", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Deleted Name", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "deleted_doctype", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Deleted DocType", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "column_break_3", | |||
"fieldtype": "Column Break", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "restored", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Restored", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "new_name", | |||
"fieldtype": "Read Only", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "New Name", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "section_break_6", | |||
"fieldtype": "Section Break", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "data", | |||
"fieldtype": "Code", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Data", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
} | |||
], | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 1, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-29 14:39:45.724494", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Deleted Document", | |||
"name_case": "", | |||
"owner": "Administrator", | |||
"permissions": [ | |||
{ | |||
"amend": 0, | |||
"apply_user_permissions": 0, | |||
"cancel": 0, | |||
"create": 0, | |||
"delete": 1, | |||
"email": 0, | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 0, | |||
"read": 1, | |||
"report": 0, | |||
"role": "System Manager", | |||
"set_user_permissions": 0, | |||
"share": 0, | |||
"submit": 0, | |||
"write": 0 | |||
} | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"title_field": "deleted_name", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -0,0 +1,25 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2015, Frappe Technologies and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
import frappe, json | |||
from frappe.model.document import Document | |||
from frappe import _ | |||
class DeletedDocument(Document): | |||
pass | |||
@frappe.whitelist() | |||
def restore(name): | |||
deleted = frappe.get_doc('Deleted Document', name) | |||
doc = frappe.get_doc(json.loads(deleted.data)) | |||
doc.insert() | |||
doc.add_comment('Edit', _('restored {0} as {1}').format(deleted.deleted_name, doc.name)) | |||
deleted.new_name = doc.name | |||
deleted.restored = 1 | |||
deleted.save() | |||
frappe.msgprint('Document Restored') |
@@ -0,0 +1,12 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2015, Frappe Technologies and Contributors | |||
# See license.txt | |||
from __future__ import unicode_literals | |||
import frappe | |||
import unittest | |||
# test_records = frappe.get_test_records('Deleted Document') | |||
class TestDeletedDocument(unittest.TestCase): | |||
pass |
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2016, Frappe Technologies and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('DocShare', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -3,23 +3,28 @@ | |||
"allow_import": 1, | |||
"allow_rename": 0, | |||
"autoname": "hash", | |||
"beta": 0, | |||
"creation": "2015-02-04 04:33:36.330477", | |||
"custom": 0, | |||
"description": "Internal record of document shares", | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "System", | |||
"editable_grid": 0, | |||
"fields": [ | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "user", | |||
"fieldtype": "Link", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "User", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -27,7 +32,9 @@ | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 1, | |||
@@ -38,12 +45,15 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "share_doctype", | |||
"fieldtype": "Link", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Document Type", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -51,7 +61,9 @@ | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 1, | |||
@@ -62,12 +74,15 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "share_name", | |||
"fieldtype": "Dynamic Link", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Document Name", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -75,7 +90,9 @@ | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 1, | |||
@@ -86,20 +103,25 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"default": "0", | |||
"fieldname": "read", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Read", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -110,20 +132,25 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"default": "0", | |||
"fieldname": "write", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Write", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -134,20 +161,25 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"default": "0", | |||
"fieldname": "share", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Share", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -158,19 +190,24 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "everyone", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Everyone", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -180,13 +217,15 @@ | |||
], | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 1, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2015-11-16 06:29:45.569747", | |||
"modified": "2016-12-29 14:40:40.284335", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "DocShare", | |||
@@ -203,6 +242,7 @@ | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 1, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 0, | |||
"read": 1, | |||
@@ -214,8 +254,11 @@ | |||
"write": 1 | |||
} | |||
], | |||
"quick_entry": 0, | |||
"read_only": 1, | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC" | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -101,6 +101,37 @@ | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"depends_on": "eval:!doc.istable", | |||
"description": "Single Types have only one record no tables associated. Values are stored in tabSingles", | |||
"fieldname": "issingle", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 1, | |||
"label": "Is Single", | |||
"length": 0, | |||
"no_copy": 0, | |||
"oldfieldname": "issingle", | |||
"oldfieldtype": "Check", | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 1, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
@@ -136,21 +167,21 @@ | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "Single Types have only one record no tables associated. Values are stored in tabSingles", | |||
"fieldname": "issingle", | |||
"default": "1", | |||
"depends_on": "eval:!doc.istable && !doc.issingle", | |||
"fieldname": "quick_entry", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 1, | |||
"label": "Is Single", | |||
"in_standard_filter": 0, | |||
"label": "Quick Entry", | |||
"length": 0, | |||
"no_copy": 0, | |||
"oldfieldname": "issingle", | |||
"oldfieldtype": "Check", | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
@@ -158,7 +189,37 @@ | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 1, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"default": "1", | |||
"depends_on": "eval:!doc.istable", | |||
"fieldname": "track_changes", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Track Changes", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
@@ -1220,35 +1281,6 @@ | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"default": "1", | |||
"fieldname": "quick_entry", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Quick Entry", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
@@ -1347,7 +1379,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-08 01:17:33.593456", | |||
"modified": "2016-12-29 14:39:46.191331", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "DocType", | |||
@@ -1402,5 +1434,6 @@ | |||
"search_fields": "module", | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -26,6 +26,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Seen", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -34,6 +35,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -52,6 +54,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Title", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -59,6 +62,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -77,6 +81,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Error", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -84,6 +89,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -102,7 +108,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-10-06 03:29:47.810715", | |||
"modified": "2016-12-29 14:40:30.878856", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Error Log", | |||
@@ -134,5 +140,6 @@ | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_order": "ASC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -2,16 +2,19 @@ | |||
"allow_copy": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"beta": 0, | |||
"creation": "2015-11-28 00:57:39.766888", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "System", | |||
"editable_grid": 0, | |||
"fields": [ | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "view", | |||
"fieldtype": "HTML", | |||
"hidden": 0, | |||
@@ -19,6 +22,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Snapshot View", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -27,6 +31,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -37,6 +42,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "seen", | |||
"fieldtype": "Check", | |||
"hidden": 1, | |||
@@ -44,6 +50,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 1, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Seen", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -52,6 +59,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -62,6 +70,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "evalue", | |||
"fieldtype": "Code", | |||
"hidden": 1, | |||
@@ -69,6 +78,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Friendly Title", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -77,6 +87,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -87,6 +98,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "timestamp", | |||
"fieldtype": "Datetime", | |||
"hidden": 1, | |||
@@ -94,6 +106,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Timestamp", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -102,6 +115,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -112,6 +126,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"default": "1", | |||
"fieldname": "relapses", | |||
"fieldtype": "Int", | |||
@@ -120,6 +135,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Relapses", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -128,6 +144,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -138,6 +155,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "etype", | |||
"fieldtype": "Data", | |||
"hidden": 1, | |||
@@ -145,6 +163,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Exception Type", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -153,6 +172,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -163,6 +183,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "traceback", | |||
"fieldtype": "Code", | |||
"hidden": 1, | |||
@@ -170,6 +191,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Traceback", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -178,6 +200,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -188,6 +211,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "parent_error_snapshot", | |||
"fieldtype": "Data", | |||
"hidden": 1, | |||
@@ -195,6 +219,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Parent Error Snapshot", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -204,6 +229,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -214,6 +240,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "pyver", | |||
"fieldtype": "Code", | |||
"hidden": 1, | |||
@@ -221,6 +248,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Pyver", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -229,6 +257,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -239,6 +268,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "exception", | |||
"fieldtype": "Code", | |||
"hidden": 1, | |||
@@ -246,6 +276,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Exception", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -254,6 +285,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -264,6 +296,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "locals", | |||
"fieldtype": "Code", | |||
"hidden": 1, | |||
@@ -271,6 +304,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Locals", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -279,6 +313,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -289,6 +324,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "frames", | |||
"fieldtype": "Code", | |||
"hidden": 1, | |||
@@ -296,6 +332,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Frames", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -304,6 +341,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -314,13 +352,14 @@ | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 1, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-02-22 09:23:46.208471", | |||
"modified": "2016-12-29 14:40:38.619106", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Error Snapshot", | |||
@@ -337,6 +376,7 @@ | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -348,9 +388,12 @@ | |||
"write": 1 | |||
} | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_field": "timestamp", | |||
"sort_order": "DESC", | |||
"title_field": "evalue" | |||
"title_field": "evalue", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -609,7 +609,7 @@ | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"menu_index": 0, | |||
"modified": "2016-11-07 05:52:55.387721", | |||
"modified": "2016-12-29 14:40:12.519235", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "File", | |||
@@ -663,5 +663,6 @@ | |||
"read_only_onload": 0, | |||
"sort_order": "ASC", | |||
"title_field": "file_name", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -1,160 +1,174 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_import": 0, | |||
"allow_rename": 1, | |||
"autoname": "field:language_code", | |||
"beta": 0, | |||
"creation": "2014-08-22 16:12:17.249590", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Setup", | |||
"editable_grid": 0, | |||
"allow_copy": 0, | |||
"allow_import": 0, | |||
"allow_rename": 1, | |||
"autoname": "field:language_code", | |||
"beta": 0, | |||
"creation": "2014-08-22 16:12:17.249590", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Setup", | |||
"editable_grid": 0, | |||
"fields": [ | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"fieldname": "language_code", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"label": "Language Code", | |||
"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, | |||
"columns": 0, | |||
"fieldname": "language_code", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Language Code", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"fieldname": "language_name", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"label": "Language Name", | |||
"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, | |||
"columns": 0, | |||
"fieldname": "language_name", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Language Name", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"fieldname": "flag", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"label": "Flag", | |||
"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, | |||
"columns": 0, | |||
"fieldname": "flag", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Flag", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"fieldname": "based_on", | |||
"fieldtype": "Link", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"label": "Based On", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Language", | |||
"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, | |||
"columns": 0, | |||
"fieldname": "based_on", | |||
"fieldtype": "Link", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Based On", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Language", | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
} | |||
], | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"icon": "fa fa-globe", | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-08-23 15:06:32.827148", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Language", | |||
"name_case": "", | |||
"owner": "Administrator", | |||
], | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"icon": "fa fa-globe", | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-29 14:40:33.210645", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Language", | |||
"name_case": "", | |||
"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": 0, | |||
"role": "System Manager", | |||
"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": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 0, | |||
"read": 1, | |||
"report": 0, | |||
"role": "System Manager", | |||
"set_user_permissions": 0, | |||
"share": 0, | |||
"submit": 0, | |||
"write": 1 | |||
} | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"search_fields": "language_name", | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"title_field": "language_name", | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"search_fields": "language_name", | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"title_field": "language_name", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -79,7 +79,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 05:54:42.688231", | |||
"modified": "2016-12-29 14:40:10.236430", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Module Def", | |||
@@ -131,5 +131,6 @@ | |||
"quick_entry": 1, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2016, Frappe Technologies and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Page', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -276,7 +276,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 05:55:29.162083", | |||
"modified": "2016-12-29 14:40:09.047100", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Page", | |||
@@ -328,5 +328,6 @@ | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -16,6 +16,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "patch", | |||
"fieldtype": "Code", | |||
"hidden": 0, | |||
@@ -23,6 +24,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Patch", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -30,6 +32,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -48,7 +51,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-07-25 05:24:24.847433", | |||
"modified": "2016-12-29 14:40:35.048570", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Patch Log", | |||
@@ -64,6 +67,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -78,5 +82,6 @@ | |||
"quick_entry": 1, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -413,7 +413,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-20 16:25:45.427854", | |||
"modified": "2016-12-29 14:39:48.337818", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Report", | |||
@@ -509,5 +509,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -22,6 +22,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Role Name", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -31,6 +32,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -50,6 +52,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Disabled", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -58,6 +61,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -77,6 +81,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Desk Access", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -85,6 +90,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -103,7 +109,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-09-23 05:38:14.727541", | |||
"modified": "2016-12-29 14:40:31.826103", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Role", | |||
@@ -119,6 +125,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -139,6 +146,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -159,6 +167,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 0, | |||
"read": 1, | |||
@@ -174,5 +183,6 @@ | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_order": "ASC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -3,16 +3,19 @@ | |||
"allow_import": 1, | |||
"allow_rename": 0, | |||
"autoname": "field:category_name", | |||
"beta": 0, | |||
"creation": "2016-05-25 09:49:07.125394", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "", | |||
"editable_grid": 0, | |||
"fields": [ | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "category_name", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
@@ -20,6 +23,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Category Name", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -28,6 +32,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -38,6 +43,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "tags", | |||
"fieldtype": "Table", | |||
"hidden": 0, | |||
@@ -45,6 +51,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Tags", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -54,6 +61,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -64,6 +72,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "tagdocs", | |||
"fieldtype": "Table", | |||
"hidden": 0, | |||
@@ -71,6 +80,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Doctypes", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -80,6 +90,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -90,13 +101,14 @@ | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-05-30 15:02:54.357007", | |||
"modified": "2016-12-29 14:40:37.489085", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Tag Category", | |||
@@ -113,6 +125,7 @@ | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 1, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 0, | |||
"read": 1, | |||
@@ -124,8 +137,11 @@ | |||
"write": 1 | |||
} | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC" | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -1,202 +1,203 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_import": 1, | |||
"allow_rename": 0, | |||
"autoname": "hash", | |||
"beta": 0, | |||
"creation": "2016-02-17 12:21:16.175465", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Setup", | |||
"editable_grid": 0, | |||
"engine": "InnoDB", | |||
"allow_copy": 0, | |||
"allow_import": 1, | |||
"allow_rename": 0, | |||
"autoname": "hash", | |||
"beta": 0, | |||
"creation": "2016-02-17 12:21:16.175465", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Setup", | |||
"editable_grid": 0, | |||
"engine": "InnoDB", | |||
"fields": [ | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "language", | |||
"fieldtype": "Link", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 1, | |||
"label": "Language", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Language", | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 1, | |||
"set_only_once": 0, | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "language", | |||
"fieldtype": "Link", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 1, | |||
"label": "Language", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Language", | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 1, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "section_break_4", | |||
"fieldtype": "Section Break", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "section_break_4", | |||
"fieldtype": "Section Break", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "If your data is in HTML, please copy paste the exact HTML code with the tags.", | |||
"fieldname": "source_name", | |||
"fieldtype": "Code", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Source Text", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "If your data is in HTML, please copy paste the exact HTML code with the tags.", | |||
"fieldname": "source_name", | |||
"fieldtype": "Code", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Source Text", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "column_break_6", | |||
"fieldtype": "Column Break", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "column_break_6", | |||
"fieldtype": "Column Break", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "target_name", | |||
"fieldtype": "Code", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Translated Text", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "target_name", | |||
"fieldtype": "Code", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Translated Text", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
} | |||
], | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-20 16:02:00.277025", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Translation", | |||
"name_case": "", | |||
"owner": "Administrator", | |||
], | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-29 14:39:48.571006", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Translation", | |||
"name_case": "", | |||
"owner": "Administrator", | |||
"permissions": [ | |||
{ | |||
"amend": 0, | |||
"apply_user_permissions": 0, | |||
"cancel": 0, | |||
"create": 1, | |||
"delete": 1, | |||
"email": 1, | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"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": 1, | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
"report": 1, | |||
"role": "System Manager", | |||
"set_user_permissions": 0, | |||
"share": 1, | |||
"submit": 0, | |||
"write": 1 | |||
} | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"title_field": "source_name", | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"title_field": "source_name", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -1755,7 +1755,7 @@ | |||
"istable": 0, | |||
"max_attachments": 5, | |||
"menu_index": 0, | |||
"modified": "2016-11-07 18:53:28.155954", | |||
"modified": "2016-12-29 14:40:03.428429", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "User", | |||
@@ -1810,5 +1810,6 @@ | |||
"search_fields": "full_name", | |||
"sort_order": "DESC", | |||
"title_field": "full_name", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -321,6 +321,9 @@ class User(Document): | |||
frappe.db.sql("""delete from `tabEvent` where owner=%s | |||
and event_type='Private'""", (self.name,)) | |||
# delete shares | |||
frappe.db.sql("""delete from `tabDocShare` where user=%s""", self.name) | |||
# delete messages | |||
frappe.db.sql("""delete from `tabCommunication` | |||
where communication_type in ('Chat', 'Notification') | |||
@@ -328,6 +331,7 @@ class User(Document): | |||
and (reference_name=%s or owner=%s)""", (self.name, self.name)) | |||
def before_rename(self, old_name, new_name, merge=False): | |||
self.check_demo() | |||
frappe.clear_cache(user=old_name) | |||
self.validate_rename(old_name, new_name) | |||
@@ -0,0 +1,17 @@ | |||
.version-info pre { | |||
border: 0px; | |||
margin: 0px; | |||
background-color: inherit; | |||
} | |||
.version-info .table { | |||
background-color: inherit; | |||
} | |||
.version-info .success { | |||
background-color: #dff0d8 !important; | |||
} | |||
.version-info .danger { | |||
background-color: #f2dede !important; | |||
} |
@@ -1,15 +1,9 @@ | |||
frappe.ui.form.on("Version", "refresh", function(frm) { | |||
frm.add_custom_button("Restore", function() { | |||
frappe.call({ | |||
method:"frappe.core.doctype.version.version.restore", | |||
args: { | |||
version: frm.doc.name | |||
}, | |||
callback: function(r) { | |||
if(!r.exc) { | |||
msgprint(__("Version restored")); | |||
} | |||
} | |||
}) | |||
$(frappe.render_template('version_view', {doc:frm.doc, data:JSON.parse(frm.doc.data)})) | |||
.appendTo(frm.fields_dict.table_html.$wrapper.empty()); | |||
frm.add_custom_button(__('Show all Versions'), function() { | |||
frappe.set_route('List', 'Version', | |||
{ref_doctype: frm.doc.ref_doctype, docname: frm.doc.docname}); | |||
}); | |||
}) | |||
}); |
@@ -2,7 +2,7 @@ | |||
"allow_copy": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"autoname": "_VER.######", | |||
"autoname": "hash", | |||
"beta": 0, | |||
"creation": "2014-02-20 17:22:37", | |||
"custom": 0, | |||
@@ -25,7 +25,7 @@ | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 1, | |||
"label": "Ref DocType", | |||
"label": "DocType", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "DocType", | |||
@@ -40,6 +40,33 @@ | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "column_break_3", | |||
"fieldtype": "Column Break", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
@@ -53,7 +80,7 @@ | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Docname", | |||
"label": "Document Name", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
@@ -72,24 +99,79 @@ | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "doclist_json", | |||
"fieldname": "data", | |||
"fieldtype": "Code", | |||
"hidden": 1, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Data", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "section_break_4", | |||
"fieldtype": "Section Break", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Doclist JSON", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "table_html", | |||
"fieldtype": "HTML", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Table HTML", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
@@ -100,13 +182,13 @@ | |||
"icon": "fa fa-copy", | |||
"idx": 1, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"in_create": 1, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 05:28:22.062452", | |||
"modified": "2016-12-29 14:39:45.926836", | |||
"modified_by": "Administrator", | |||
"module": "Core", | |||
"name": "Version", | |||
@@ -132,11 +214,34 @@ | |||
"share": 0, | |||
"submit": 0, | |||
"write": 0 | |||
}, | |||
{ | |||
"amend": 0, | |||
"apply_user_permissions": 0, | |||
"cancel": 0, | |||
"create": 0, | |||
"delete": 1, | |||
"email": 0, | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 0, | |||
"read": 1, | |||
"report": 0, | |||
"role": "Administrator", | |||
"set_user_permissions": 0, | |||
"share": 0, | |||
"submit": 0, | |||
"write": 0 | |||
} | |||
], | |||
"quick_entry": 1, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_order": "ASC", | |||
"title_field": "docname", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -7,23 +7,79 @@ from __future__ import unicode_literals | |||
import frappe, json | |||
from frappe.model.document import Document | |||
from frappe.model import no_value_fields | |||
class Version(Document): | |||
pass | |||
@frappe.whitelist() | |||
def restore(version): | |||
if not "System Manager" in frappe.get_roles(): | |||
raise frappe.PermissionError | |||
version = frappe.get_doc("Version", version) | |||
docdict = json.loads(version.doclist_json) | |||
# check if renamed | |||
if docdict.get("name") != version.docname: | |||
docdict["name"] = version.docname | |||
docdict["modified"] = frappe.db.get_value(version.ref_doctype, version.docname, "modified") | |||
# overwrite | |||
frappe.get_doc(docdict).save() | |||
def set_diff(self, old, new): | |||
'''Set the data property with the diff of the docs if present''' | |||
diff = get_diff(old, new) | |||
if diff: | |||
self.ref_doctype = new.doctype | |||
self.docname = new.name | |||
self.data = frappe.as_json(diff) | |||
return True | |||
else: | |||
return False | |||
def get_data(self): | |||
return json.loads(self.data) | |||
def get_diff(old, new, for_child=False): | |||
'''Get diff between 2 document objects | |||
If there is a change, then returns a dict like: | |||
{ | |||
"changed" : [[fieldname1, old, new], [fieldname2, old, new]], | |||
"added" : [[table_fieldname1, {dict}], ], | |||
"removed" : [[table_fieldname1, {dict}], ], | |||
"row_changed": [[table_fieldname1, row_name1, row_index, | |||
[[child_fieldname1, old, new], | |||
[child_fieldname2, old, new]], ] | |||
], | |||
}''' | |||
out = frappe._dict(changed = [], added = [], removed = [], row_changed = []) | |||
for df in new.meta.fields: | |||
if df.fieldtype in no_value_fields and df.fieldtype != 'Table': | |||
continue | |||
old_value, new_value = old.get(df.fieldname), new.get(df.fieldname) | |||
if df.fieldtype=='Table': | |||
# make maps | |||
old_row_by_name, new_row_by_name = {}, {} | |||
for d in old_value: | |||
old_row_by_name[d.name] = d | |||
for d in new_value: | |||
new_row_by_name[d.name] = d | |||
# check rows for additions, changes | |||
for i, d in enumerate(new_value): | |||
if d.name in old_row_by_name: | |||
diff = get_diff(old_row_by_name[d.name], d, for_child=True) | |||
if diff and diff.changed: | |||
out.row_changed.append((df.fieldname, i, d.name, diff.changed)) | |||
else: | |||
out.added.append([df.fieldname, d.as_dict()]) | |||
# check for deletions | |||
for d in old_value: | |||
if not d.name in new_row_by_name: | |||
out.removed.append([df.fieldname, d.as_dict()]) | |||
elif (old_value != new_value | |||
and old.get_formatted(df.fieldname) != new.get_formatted(df.fieldname)): | |||
out.changed.append((df.fieldname, old.get_formatted(df.fieldname), | |||
new.get_formatted(df.fieldname))) | |||
# docstatus | |||
if not for_child and old.docstatus != new.docstatus: | |||
out.changed.append(['docstatus', old.docstatus, new.docstatus]) | |||
if any((out.changed, out.added, out.removed, out.row_changed)): | |||
return out | |||
else: | |||
return None |
@@ -0,0 +1,96 @@ | |||
<div class="version-info"> | |||
{% if data.comment %} | |||
<h4>{{ __("Comment") + " (" + data.comment_type }})</h4> | |||
<p>{{ data.comment }}</p> | |||
{% endif %} | |||
{% if data.changed && data.changed.length %} | |||
<h4>{{ __("Values Changed") }}</h4> | |||
<table class="table table-bordered"> | |||
<thead> | |||
<tr> | |||
<td style="width: 33%">{{ __("Property") }}</td> | |||
<td style="width: 33%">{{ __("Original Value") }}</td> | |||
<td style="width: 33%">{{ __("New Value") }}</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
{% for item in data.changed %} | |||
<tr> | |||
<td>{{ frappe.meta.get_label(doc.ref_doctype, item[0]) }}</td> | |||
<td class="danger">{{ item[1] }}</td> | |||
<td class="success">{{ item[2] }}</td> | |||
</tr> | |||
{% endif %} | |||
</tbody> | |||
</table> | |||
{% endif %} | |||
{% var _keys = ["added", "removed"]; %} | |||
{% for key in _keys %} | |||
{% if data[key] && data[key].length %} | |||
{% var title = key==="added" ? __("Rows Added") : __("Rows Removed"); %} | |||
<h3>{{ title }}</h3> | |||
<table class="table table-bordered"> | |||
<thead> | |||
<tr> | |||
<td style="width: 33%">{{ __("Property") }}</td> | |||
<td style="width: 67%">{{ title }}</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
{% var values = data[key]; %} | |||
{% for item in values %} | |||
<tr> | |||
<td>{{ frappe.meta.get_label(doc.ref_doctype, item[0]) }}</td> | |||
<td class="{{ | |||
key==="added" ? __("success") : __("danger") }}"> | |||
{% var item_keys = keys(item[1]).sort(); %} | |||
<table class="table table-bordered"> | |||
<tbody> | |||
{% for row_key in item_keys %} | |||
<tr> | |||
<td class="small">{{ row_key }}</td> | |||
<td class="small">{{ item[1][row_key] }}</td> | |||
</tr> | |||
{% endfor %} | |||
</tbody> | |||
</table> | |||
</td> | |||
</tr> | |||
{% endif %} | |||
</tbody> | |||
</table> | |||
{% endif %} | |||
{% endfor %} | |||
{% if data.row_changed && data.row_changed.length %} | |||
<h4>{{ __("Row Values Changed") }}</h4> | |||
<table class="table table-bordered"> | |||
<thead> | |||
<tr> | |||
<td style="width: 25%">{{ __("Table Field") }}</td> | |||
<td style="width: 9%">{{ __("Row #") }}</td> | |||
<td style="width: 22%">{{ __("Property") }}</td> | |||
<td style="width: 22%">{{ __("Original Value") }}</td> | |||
<td style="width: 22%">{{ __("New Value") }}</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
{% var values = data.row_changed; %} | |||
{% for table_info in values %} | |||
{% var _changed = table_info[3]; %} | |||
{% for item in _changed %} | |||
<tr> | |||
<td>{{ frappe.meta.get_label(doc.ref_doctype, table_info[0]) }}</td> | |||
<td>{{ table_info[1] }}</td> | |||
<td>{{ item[0] }}</td> | |||
<td class="danger">{{ item[1] }}</td> | |||
<td class="success">{{ item[2] }}</td> | |||
</tr> | |||
{% endfor %} | |||
{% endfor %} | |||
</tbody> | |||
{% endif %} | |||
</div> |
@@ -1028,7 +1028,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 05:23:16.370928", | |||
"modified": "2016-12-29 14:40:24.954077", | |||
"modified_by": "Administrator", | |||
"module": "Custom", | |||
"name": "Custom Field", | |||
@@ -1082,5 +1082,6 @@ | |||
"read_only_onload": 0, | |||
"search_fields": "dt,label,fieldtype,options", | |||
"sort_order": "ASC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -144,7 +144,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 05:24:05.590423", | |||
"modified": "2016-12-29 14:40:24.037012", | |||
"modified_by": "Administrator", | |||
"module": "Custom", | |||
"name": "Custom Script", | |||
@@ -197,5 +197,6 @@ | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_order": "ASC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -23,6 +23,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Enter Form Type", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -31,6 +32,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -50,6 +52,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -57,6 +60,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -75,6 +79,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Change Label (via Custom Translation)", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -83,6 +88,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -101,6 +107,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Default Print Format", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -109,6 +116,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -128,6 +136,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Max Attachments", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -135,6 +144,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -153,6 +163,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Hide Copy", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -160,6 +171,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -178,6 +190,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Is Table", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -186,6 +199,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -205,6 +219,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Editable Grid", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -213,6 +228,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -232,6 +248,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Quick Entry", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -240,6 +257,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -259,6 +277,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Image View", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -267,6 +286,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -285,6 +305,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
@@ -292,6 +313,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -311,6 +333,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Title Field", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -319,6 +342,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -338,6 +362,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Image Field", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -346,6 +371,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -365,6 +391,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Search Fields", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -372,6 +399,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -391,6 +419,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
@@ -398,6 +427,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -416,6 +446,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Sort Field", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -423,6 +454,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -441,6 +473,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
@@ -448,6 +481,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -466,6 +500,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Sort Order", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -474,6 +509,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -494,6 +530,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Fields", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -501,6 +538,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -519,6 +557,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Fields", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -527,6 +566,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -545,7 +585,7 @@ | |||
"issingle": 1, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-09-16 02:36:09.171273", | |||
"modified": "2016-12-29 14:40:32.113132", | |||
"modified_by": "Administrator", | |||
"module": "Custom", | |||
"name": "Customize Form", | |||
@@ -561,6 +601,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -577,5 +618,6 @@ | |||
"read_only_onload": 0, | |||
"search_fields": "doc_type", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -299,7 +299,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-15 14:55:45.761422", | |||
"modified": "2016-12-29 14:39:50.172883", | |||
"modified_by": "Administrator", | |||
"module": "Custom", | |||
"name": "Property Setter", | |||
@@ -353,5 +353,6 @@ | |||
"read_only_onload": 0, | |||
"search_fields": "doc_type,property", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -116,6 +116,7 @@ CREATE TABLE `tabDocType` ( | |||
`issingle` int(1) NOT NULL DEFAULT 0, | |||
`istable` int(1) NOT NULL DEFAULT 0, | |||
`editable_grid` int(1) NOT NULL DEFAULT 1, | |||
`track_changes` int(1) NOT NULL DEFAULT 0, | |||
`module` varchar(255) DEFAULT NULL, | |||
`app` varchar(255) DEFAULT NULL, | |||
`autoname` varchar(255) DEFAULT NULL, | |||
@@ -408,7 +408,8 @@ class Database: | |||
frappe.db.get_value("System Settings", None, "date_format") | |||
""" | |||
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug, order_by, cache=cache) | |||
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug, | |||
order_by, cache=cache) | |||
return ((len(ret[0]) > 1 or as_dict) and ret[0] or ret[0][0]) if ret else None | |||
@@ -437,6 +438,8 @@ class Database: | |||
(doctype, filters, fieldname) in self.value_cache: | |||
return self.value_cache[(doctype, filters, fieldname)] | |||
if not order_by: order_by = 'modified desc' | |||
if isinstance(filters, list): | |||
out = self._get_value_for_many_names(doctype, filters, fieldname, debug=debug) | |||
@@ -22,6 +22,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Document Type", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -31,6 +32,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -49,6 +51,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Field", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -57,6 +60,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -75,6 +79,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Update Value", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -83,6 +88,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -102,6 +108,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Condition", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -110,6 +117,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -130,6 +138,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Limit", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -138,6 +147,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -155,7 +165,7 @@ | |||
"issingle": 1, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-09-23 05:10:19.377701", | |||
"modified": "2016-12-29 14:40:31.929701", | |||
"modified_by": "Administrator", | |||
"module": "Desk", | |||
"name": "Bulk Update", | |||
@@ -172,6 +182,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -188,5 +199,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -525,7 +525,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 05:31:01.259347", | |||
"modified": "2016-12-29 14:40:19.444916", | |||
"modified_by": "Administrator", | |||
"module": "Desk", | |||
"name": "Desktop Icon", | |||
@@ -560,5 +560,6 @@ | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"title_field": "module_name", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -809,7 +809,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 05:31:17.333435", | |||
"modified": "2016-12-29 14:40:19.097127", | |||
"modified_by": "Administrator", | |||
"module": "Desk", | |||
"name": "Event", | |||
@@ -863,5 +863,6 @@ | |||
"read_only_onload": 0, | |||
"sort_order": "DESC", | |||
"title_field": "subject", | |||
"track_changes": 1, | |||
"track_seen": 1 | |||
} |
@@ -23,6 +23,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Title", | |||
"length": 0, | |||
"no_copy": 1, | |||
@@ -30,6 +31,7 @@ | |||
"print_hide": 1, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -49,6 +51,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Public", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -56,6 +59,7 @@ | |||
"print_hide": 1, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -75,6 +79,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Notify users with a popup when they log in", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -83,6 +88,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -102,6 +108,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Expire Notification On", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -110,6 +117,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 1, | |||
@@ -129,6 +137,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Content", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -136,6 +145,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -154,6 +164,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Seen By", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -162,6 +173,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -180,6 +192,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Seen By Table", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -189,6 +202,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -207,7 +221,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-08-30 00:28:57.094889", | |||
"modified": "2016-12-29 14:39:46.072073", | |||
"modified_by": "Administrator", | |||
"module": "Desk", | |||
"name": "Note", | |||
@@ -223,6 +237,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -238,5 +253,6 @@ | |||
"read_only": 0, | |||
"read_only_onload": 1, | |||
"sort_order": "ASC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -26,7 +26,7 @@ def mark_as_seen(note): | |||
note = frappe.get_doc('Note', note) | |||
if frappe.session.user not in [d.user for d in note.seen_by]: | |||
note.append('seen_by', {'user': frappe.session.user}) | |||
note.save() | |||
note.save(ignore_version=True) | |||
def get_permission_query_conditions(user): | |||
if not user: user = frappe.session.user | |||
@@ -7,4 +7,69 @@ import unittest | |||
test_records = frappe.get_test_records('Note') | |||
class TestNote(unittest.TestCase): | |||
pass | |||
def insert_note(self): | |||
frappe.db.sql('delete from tabVersion') | |||
frappe.db.sql('delete from tabNote') | |||
frappe.db.sql('delete from `tabNote Seen By`') | |||
return frappe.get_doc(dict(doctype='Note', title='test note', | |||
content='test note content')).insert() | |||
def test_version(self): | |||
note = self.insert_note() | |||
note.title = 'test note 1' | |||
note.content = '1' | |||
note.save() | |||
version = frappe.get_doc('Version', dict(docname=note.name)) | |||
data = version.get_data() | |||
self.assertTrue(('title', 'test note', 'test note 1'), data['changed']) | |||
self.assertTrue(('content', 'test note content', '1'), data['changed']) | |||
def test_rows(self): | |||
note = self.insert_note() | |||
# test add | |||
note.append('seen_by', {'user': 'Administrator'}) | |||
note.save() | |||
version = frappe.get_doc('Version', dict(docname=note.name)) | |||
data = version.get_data() | |||
self.assertEquals(len(data.get('added')), 1) | |||
self.assertEquals(len(data.get('removed')), 0) | |||
self.assertEquals(len(data.get('changed')), 0) | |||
for row in data.get('added'): | |||
self.assertEquals(row[0], 'seen_by') | |||
self.assertEquals(row[1]['user'], 'Administrator') | |||
# test row change | |||
note.seen_by[0].user = 'Guest' | |||
note.save() | |||
version = frappe.get_doc('Version', dict(docname=note.name)) | |||
data = version.get_data() | |||
self.assertEquals(len(data.get('row_changed')), 1) | |||
for row in data.get('row_changed'): | |||
self.assertEquals(row[0], 'seen_by') | |||
self.assertEquals(row[1], 0) | |||
self.assertEquals(row[2], note.seen_by[0].name) | |||
self.assertEquals(row[3], [['user', 'Administrator', 'Guest']]) | |||
# test remove | |||
note.seen_by = [] | |||
note.save() | |||
version = frappe.get_doc('Version', dict(docname=note.name)) | |||
data = version.get_data() | |||
self.assertEquals(len(data.get('removed')), 1) | |||
for row in data.get('removed'): | |||
self.assertEquals(row[0], 'seen_by') | |||
self.assertEquals(row[1]['user'], 'Guest') | |||
# self.assertTrue(('title', 'test note', 'test note 1'), data['changed']) | |||
# self.assertTrue(('content', 'test note content', '1'), data['changed']) |
@@ -9,6 +9,16 @@ import unittest | |||
# test_records = frappe.get_test_records('ToDo') | |||
class TestToDo(unittest.TestCase): | |||
def test_delete(self): | |||
todo = frappe.get_doc(dict(doctype='ToDo', description='test todo', | |||
assigned_by='Administrator')).insert() | |||
frappe.db.sql('delete from `tabDeleted Document`') | |||
todo.delete() | |||
deleted = frappe.get_doc('Deleted Document', dict(deleted_doctype=todo.doctype, deleted_name=todo.name)) | |||
self.assertEquals(todo.as_json(), deleted.data) | |||
def test_fetch(self): | |||
todo = frappe.get_doc(dict(doctype='ToDo', description='test todo', | |||
assigned_by='Administrator')).insert() | |||
@@ -481,7 +481,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-15 14:56:07.115129", | |||
"modified": "2016-12-29 14:39:47.020629", | |||
"modified_by": "Administrator", | |||
"module": "Desk", | |||
"name": "ToDo", | |||
@@ -536,5 +536,6 @@ | |||
"search_fields": "description, reference_type, reference_name", | |||
"sort_order": "DESC", | |||
"title_field": "description", | |||
"track_changes": 1, | |||
"track_seen": 1 | |||
} |
@@ -46,8 +46,7 @@ class ToDo(Document): | |||
if not (self.reference_type and self.reference_name): | |||
return | |||
frappe.get_doc(self.reference_type, self.reference_name).add_comment(comment_type, text, | |||
link_doctype=self.doctype, link_name=self.name) | |||
frappe.get_doc(self.reference_type, self.reference_name).add_comment(comment_type, text) | |||
def update_in_reference(self): | |||
if not (self.reference_type and self.reference_name): | |||
@@ -94,6 +94,7 @@ def get_docinfo(doc=None, doctype=None, name=None): | |||
frappe.response["docinfo"] = { | |||
"attachments": get_attachments(doc.doctype, doc.name), | |||
"communications": _get_communications(doc.doctype, doc.name), | |||
'versions': get_versions(doc), | |||
"assignments": get_assignments(doc.doctype, doc.name), | |||
"permissions": get_doc_permissions(doc), | |||
"shared": frappe.share.get_users(doc.doctype, doc.name) | |||
@@ -113,6 +114,10 @@ def get_attachments(dt, dn): | |||
return frappe.get_all("File", fields=["name", "file_name", "file_url", "is_private"], | |||
filters = {"attached_to_name": dn, "attached_to_doctype": dt}) | |||
def get_versions(doc): | |||
return frappe.get_all('Version', filters=dict(ref_doctype=doc.doctype, docname=doc.name), | |||
fields=['name', 'owner', 'creation', 'data'], limit=10, order_by='creation desc') | |||
@frappe.whitelist() | |||
def get_communications(doctype, name, start=0, limit=20): | |||
doc = frappe.get_doc(doctype, name) | |||
@@ -153,7 +158,7 @@ def get_communication_data(doctype, name, start=0, limit=20, after=None, fields= | |||
and ( | |||
(reference_doctype=%(doctype)s and reference_name=%(name)s) | |||
or ( | |||
(timeline_doctype=%(doctype)s and timeline_name=%(name)s) | |||
(timeline_doctype=%(doctype)s and timeline_name=%(name)s) | |||
and ( | |||
communication_type="Communication" | |||
or ( | |||
@@ -1042,7 +1042,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-06 01:34:36.359836", | |||
"modified": "2016-12-29 14:39:56.456917", | |||
"modified_by": "Administrator", | |||
"module": "Email", | |||
"name": "Email Account", | |||
@@ -1076,5 +1076,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -671,7 +671,7 @@ | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"menu_index": 0, | |||
"modified": "2016-11-07 05:21:43.253739", | |||
"modified": "2016-12-29 14:40:25.782293", | |||
"modified_by": "Administrator", | |||
"module": "Email", | |||
"name": "Email Alert", | |||
@@ -706,5 +706,6 @@ | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"title_field": "subject", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -5,7 +5,7 @@ frappe.ui.form.on("Email Group", "refresh", function(frm) { | |||
if(!frm.is_new()) { | |||
frm.add_custom_button(__("View Subscribers"), function() { | |||
frappe.route_options = {"email_group": frm.doc.name}; | |||
frappe.set_route("Report", "Email Group Member"); | |||
frappe.set_route("List", "Email Group Member"); | |||
}, __("View")); | |||
frm.add_custom_button(__("Import Subscribers"), function() { | |||
@@ -15,6 +15,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "title", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
@@ -22,6 +23,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Title", | |||
"length": 0, | |||
"no_copy": 1, | |||
@@ -30,6 +32,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -40,6 +43,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"default": "0", | |||
"fieldname": "total_subscribers", | |||
"fieldtype": "Int", | |||
@@ -48,6 +52,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Total Subscribers", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -56,6 +61,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -73,7 +79,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-07-25 05:24:23.855996", | |||
"modified": "2016-12-29 14:40:35.253956", | |||
"modified_by": "Administrator", | |||
"module": "Email", | |||
"name": "Email Group", | |||
@@ -90,6 +96,7 @@ | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 1, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -106,5 +113,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -108,7 +108,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 05:28:25.001760", | |||
"modified": "2016-12-29 14:40:21.545713", | |||
"modified_by": "Administrator", | |||
"module": "Email", | |||
"name": "Email Group Member", | |||
@@ -143,5 +143,6 @@ | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"title_field": "email", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -24,7 +24,6 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_global_search": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Sender", | |||
@@ -53,7 +52,6 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_global_search": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Recipient", | |||
@@ -110,7 +108,6 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_global_search": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Message", | |||
@@ -139,7 +136,6 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_global_search": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 1, | |||
"label": "Status", | |||
@@ -168,7 +164,6 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_global_search": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Error", | |||
@@ -196,7 +191,6 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_global_search": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Message ID", | |||
@@ -225,7 +219,6 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_global_search": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Reference DocType", | |||
@@ -254,7 +247,6 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_global_search": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Reference DocName", | |||
@@ -282,7 +274,6 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_global_search": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Communication", | |||
@@ -312,7 +303,6 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_global_search": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Send After", | |||
@@ -342,7 +332,6 @@ | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_global_search": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Priority", | |||
@@ -364,6 +353,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "unsubscribe_param", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
@@ -371,6 +361,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Unsubscribe Param", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -379,6 +370,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -389,6 +381,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "unsubscribe_method", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
@@ -396,6 +389,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Unsubscribe Method", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -404,6 +398,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -414,6 +409,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "expose_recipients", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
@@ -421,6 +417,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Expose Recipients", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -429,6 +426,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -447,7 +445,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-13 20:43:56.976928", | |||
"modified": "2016-12-29 14:39:54.544166", | |||
"modified_by": "Administrator", | |||
"module": "Email", | |||
"name": "Email Queue", | |||
@@ -479,5 +477,6 @@ | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -136,7 +136,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 05:28:14.622378", | |||
"modified": "2016-12-29 14:40:21.633193", | |||
"modified_by": "Administrator", | |||
"module": "Email", | |||
"name": "Email Unsubscribe", | |||
@@ -170,5 +170,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -275,7 +275,7 @@ | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"menu_index": 0, | |||
"modified": "2016-11-07 05:54:45.790992", | |||
"modified": "2016-12-29 14:40:10.027720", | |||
"modified_by": "Administrator", | |||
"module": "Email", | |||
"name": "Newsletter", | |||
@@ -308,5 +308,6 @@ | |||
"read_only_onload": 0, | |||
"sort_order": "ASC", | |||
"title_field": "subject", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -163,7 +163,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-09 08:06:13.965074", | |||
"modified": "2016-12-29 14:40:02.827994", | |||
"modified_by": "Administrator", | |||
"module": "Email", | |||
"name": "Standard Reply", | |||
@@ -218,5 +218,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -15,6 +15,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "country_name", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
@@ -22,6 +23,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Country Name", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -31,6 +33,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -41,6 +44,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "date_format", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
@@ -48,6 +52,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Date Format", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -55,6 +60,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -65,6 +71,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "time_zones", | |||
"fieldtype": "Text", | |||
"hidden": 0, | |||
@@ -72,6 +79,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Time Zones", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -79,6 +87,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -89,6 +98,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "code", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
@@ -96,6 +106,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Code", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -103,6 +114,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -122,7 +134,7 @@ | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"menu_index": 0, | |||
"modified": "2016-07-25 05:24:25.180255", | |||
"modified": "2016-12-29 14:40:34.951894", | |||
"modified_by": "Administrator", | |||
"module": "Geo", | |||
"name": "Country", | |||
@@ -138,6 +150,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -158,6 +171,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -174,5 +188,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "country_name", | |||
"sort_order": "ASC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -3,23 +3,28 @@ | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"autoname": "field:currency_name", | |||
"beta": 0, | |||
"creation": "2013-01-28 10:06:02", | |||
"custom": 0, | |||
"description": "**Currency** Master", | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Setup", | |||
"editable_grid": 0, | |||
"fields": [ | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "currency_name", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Currency Name", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -29,6 +34,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -39,12 +45,15 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "enabled", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Enabled", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -52,6 +61,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -62,13 +72,16 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "Sub-currency. For e.g. \"Cent\"", | |||
"fieldname": "fraction", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Fraction", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -76,6 +89,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -86,13 +100,16 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "1 Currency = [?] Fraction\nFor e.g. 1 USD = 100 Cent", | |||
"fieldname": "fraction_units", | |||
"fieldtype": "Int", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Fraction Units", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -100,6 +117,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -110,13 +128,16 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "Smallest circulating fraction unit (coin). For e.g. 1 cent for USD and it should be entered as 0.01", | |||
"fieldname": "smallest_currency_fraction_value", | |||
"fieldtype": "Currency", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Smallest Currency Fraction Value", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -125,6 +146,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -135,13 +157,16 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "A symbol for this currency. For e.g. $", | |||
"fieldname": "symbol", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Symbol", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -149,6 +174,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -159,13 +185,16 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "How should this currency be formatted? If not set, will use system defaults", | |||
"fieldname": "number_format", | |||
"fieldtype": "Select", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Number Format", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -174,6 +203,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -185,13 +215,14 @@ | |||
"hide_toolbar": 0, | |||
"icon": "fa fa-bitcoin", | |||
"idx": 1, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-01-18 15:36:23.026524", | |||
"modified": "2016-12-29 14:40:39.187557", | |||
"modified_by": "Administrator", | |||
"module": "Geo", | |||
"name": "Currency", | |||
@@ -207,6 +238,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -227,6 +259,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 0, | |||
"read": 1, | |||
@@ -247,6 +280,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 0, | |||
"read": 1, | |||
@@ -267,6 +301,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 0, | |||
"read": 1, | |||
@@ -278,7 +313,10 @@ | |||
"write": 0 | |||
} | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_order": "DESC" | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -252,7 +252,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-10 18:04:27.500673", | |||
"modified": "2016-12-29 14:40:00.783063", | |||
"modified_by": "Administrator", | |||
"module": "Integration Broker", | |||
"name": "Integration Request", | |||
@@ -287,5 +287,6 @@ | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"title_field": "integration_request_service", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -23,6 +23,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Service", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -32,6 +33,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -51,6 +53,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Enabled", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -59,6 +62,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -77,6 +81,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
@@ -84,6 +89,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -102,6 +108,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -111,6 +118,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -129,6 +137,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Background Events", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -137,6 +146,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -155,6 +165,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
@@ -162,6 +173,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -179,7 +191,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-10-06 06:14:48.271314", | |||
"modified": "2016-12-29 14:40:30.774208", | |||
"modified_by": "Administrator", | |||
"module": "Integration Broker", | |||
"name": "Integration Service", | |||
@@ -213,5 +225,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -217,7 +217,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 18:31:54.470173", | |||
"modified": "2016-12-29 14:40:04.113884", | |||
"modified_by": "Administrator", | |||
"module": "Integration Broker", | |||
"name": "OAuth Authorization Code", | |||
@@ -251,5 +251,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -244,7 +244,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 18:31:32.243853", | |||
"modified": "2016-12-29 14:40:04.209039", | |||
"modified_by": "Administrator", | |||
"module": "Integration Broker", | |||
"name": "OAuth Bearer Token", | |||
@@ -278,5 +278,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -446,7 +446,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 18:53:59.549740", | |||
"modified": "2016-12-29 14:40:03.031779", | |||
"modified_by": "Administrator", | |||
"module": "Integration Broker", | |||
"name": "OAuth Client", | |||
@@ -481,5 +481,6 @@ | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"title_field": "app_name", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -248,7 +248,7 @@ | |||
"issingle": 1, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-19 02:10:05.231510", | |||
"modified": "2016-12-29 14:39:48.832630", | |||
"modified_by": "Administrator", | |||
"module": "Integrations", | |||
"name": "Dropbox Settings", | |||
@@ -282,5 +282,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -22,6 +22,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "LDAP Server Url", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -30,6 +31,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -48,6 +50,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Organizational Unit", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -56,6 +59,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -74,6 +78,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Base Distinguished Name (DN)", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -82,6 +87,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -100,6 +106,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Password for Base DN", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -108,6 +115,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -125,7 +133,7 @@ | |||
"issingle": 1, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-09-22 04:31:42.998441", | |||
"modified": "2016-12-29 14:40:32.018140", | |||
"modified_by": "Administrator", | |||
"module": "Integrations", | |||
"name": "LDAP Settings", | |||
@@ -142,6 +150,7 @@ | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -158,5 +167,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -23,6 +23,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Skip Authorization", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -32,6 +33,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -49,7 +51,7 @@ | |||
"issingle": 1, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-10-20 00:13:21.988739", | |||
"modified": "2016-12-29 14:40:30.718685", | |||
"modified_by": "Administrator", | |||
"module": "Integrations", | |||
"name": "OAuth Provider Settings", | |||
@@ -83,5 +85,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -22,6 +22,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "API Username", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -30,6 +31,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -48,6 +50,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "API Password", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -56,6 +59,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -74,6 +78,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Signature", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -82,6 +87,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -101,6 +107,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Use Sandbox", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -109,6 +116,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -128,6 +136,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Redirect To", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -136,6 +145,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -153,7 +163,7 @@ | |||
"issingle": 1, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-09-26 02:00:45.145155", | |||
"modified": "2016-12-29 14:40:31.574789", | |||
"modified_by": "Administrator", | |||
"module": "Integrations", | |||
"name": "PayPal Settings", | |||
@@ -170,6 +180,7 @@ | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -186,5 +197,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -22,6 +22,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "API Key", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -30,6 +31,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -48,6 +50,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "API Secret", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -56,6 +59,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -75,6 +79,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Redirect To", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -83,6 +88,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -100,7 +106,7 @@ | |||
"issingle": 1, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-09-26 02:00:03.604912", | |||
"modified": "2016-12-29 14:40:31.658270", | |||
"modified_by": "Administrator", | |||
"module": "Integrations", | |||
"name": "Razorpay Settings", | |||
@@ -117,6 +123,7 @@ | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -133,5 +140,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2016, Frappe Technologies and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Social Login Keys', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -30,6 +30,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -56,6 +57,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -82,6 +84,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -108,6 +111,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -134,6 +138,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -160,6 +165,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -186,6 +192,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -212,6 +219,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -238,6 +246,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -265,6 +274,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -292,6 +302,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -319,6 +330,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -346,6 +358,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -364,7 +377,7 @@ | |||
"issingle": 1, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-10-29 13:36:35.121599", | |||
"modified": "2016-12-29 14:40:30.397643", | |||
"modified_by": "Administrator", | |||
"module": "Integrations", | |||
"name": "Social Login Keys", | |||
@@ -396,5 +409,6 @@ | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_order": "ASC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -7,7 +7,8 @@ import frappe | |||
import json | |||
no_value_fields = ('Section Break', 'Column Break', 'HTML', 'Table', 'Button', 'Image', 'Fold', 'Heading') | |||
no_value_fields = ('Section Break', 'Column Break', 'HTML', 'Table', 'Button', 'Image', | |||
'Fold', 'Heading') | |||
display_fieldtypes = ('Section Break', 'Column Break', 'HTML', 'Button', 'Image', 'Fold', 'Heading') | |||
default_fields = ('doctype','name','owner','creation','modified','modified_by', | |||
'parent','parentfield','parenttype','idx','docstatus') | |||
@@ -72,18 +72,8 @@ def delete_doc(doctype=None, name=None, force=0, ignore_doctypes=None, for_reloa | |||
doc.run_method("on_trash") | |||
doc.run_method('on_change') | |||
dynamic_linked_doctypes = [df.parent for df in get_dynamic_link_map().get(doc.doctype, [])] | |||
if "ToDo" in dynamic_linked_doctypes: | |||
delete_linked_todos(doc) | |||
if "Communication" in dynamic_linked_doctypes: | |||
delete_linked_communications(doc) | |||
if "DocShare" in dynamic_linked_doctypes: | |||
delete_shared(doc) | |||
if "Email Unsubscribe" in dynamic_linked_doctypes: | |||
delete_email_subscribe(doc) | |||
frappe.enqueue('frappe.model.delete_doc.delete_dynamic_links', doctype=doc.doctype, name=doc.name, | |||
async=False if frappe.flags.in_test else True) | |||
# check if links exist | |||
if not force: | |||
@@ -104,9 +94,22 @@ def delete_doc(doctype=None, name=None, force=0, ignore_doctypes=None, for_reloa | |||
except ImportError: | |||
pass | |||
if doc: | |||
add_to_deleted_document(doc) | |||
# delete user_permissions | |||
frappe.defaults.clear_default(parenttype="User Permission", key=doctype, value=name) | |||
def add_to_deleted_document(doc): | |||
'''Add this document to Deleted Document table. Called after delete''' | |||
if doc.doctype != 'Deleted Document' and frappe.flags.in_install != 'frappe': | |||
frappe.get_doc(dict( | |||
doctype='Deleted Document', | |||
deleted_doctype=doc.doctype, | |||
deleted_name=doc.name, | |||
data=doc.as_json() | |||
)).db_insert() | |||
def update_naming_series(doc): | |||
if doc.meta.autoname: | |||
if doc.meta.autoname.startswith("naming_series:") \ | |||
@@ -182,7 +185,7 @@ def check_if_doc_is_linked(doc, method="Delete"): | |||
def check_if_doc_is_dynamically_linked(doc, method="Delete"): | |||
'''Raise `frappe.LinkExistsError` if the document is dynamically linked''' | |||
for df in get_dynamic_link_map().get(doc.doctype, []): | |||
if df.parent in ("Communication", "ToDo", "DocShare", "Email Unsubscribe", 'File'): | |||
if df.parent in ("Communication", "ToDo", "DocShare", "Email Unsubscribe", 'File', 'Version'): | |||
# don't check for communication and todo! | |||
continue | |||
@@ -214,38 +217,45 @@ def check_if_doc_is_dynamically_linked(doc, method="Delete"): | |||
.format(doc.doctype, doc.name, refdoc.parenttype if meta.istable else df.parent, | |||
refdoc.parent if meta.istable else refdoc.name,"Row: {0}".format(refdoc.idx) if meta.istable else ""), frappe.LinkExistsError) | |||
def delete_linked_todos(doc): | |||
def delete_dynamic_links(doctype, name): | |||
delete_doc("ToDo", frappe.db.sql_list("""select name from `tabToDo` | |||
where reference_type=%s and reference_name=%s""", (doc.doctype, doc.name)), | |||
ignore_permissions=True) | |||
where reference_type=%s and reference_name=%s""", (doctype, name)), | |||
ignore_permissions=True, force=True) | |||
def delete_email_subscribe(doc): | |||
frappe.db.sql('''delete from `tabEmail Unsubscribe` | |||
where reference_doctype=%s and reference_name=%s''', (doc.doctype, doc.name)) | |||
where reference_doctype=%s and reference_name=%s''', (doctype, name)) | |||
def delete_linked_communications(doc): | |||
# delete comments | |||
frappe.db.sql("""delete from `tabCommunication` | |||
where | |||
communication_type = 'Comment' | |||
and reference_doctype=%s and reference_name=%s""", (doc.doctype, doc.name)) | |||
and reference_doctype=%s and reference_name=%s""", (doctype, name)) | |||
# make communications orphans | |||
# unlink communications | |||
frappe.db.sql("""update `tabCommunication` | |||
set reference_doctype=null, reference_name=null | |||
where | |||
communication_type = 'Communication' | |||
and reference_doctype=%s | |||
and reference_name=%s""", (doc.doctype, doc.name)) | |||
and reference_name=%s""", (doctype, name)) | |||
# make secondary references orphans | |||
# unlink secondary references | |||
frappe.db.sql("""update `tabCommunication` | |||
set link_doctype=null, link_name=null | |||
where link_doctype=%s and link_name=%s""", (doc.doctype, doc.name)) | |||
where link_doctype=%s and link_name=%s""", (doctype, name)) | |||
# unlink feed | |||
frappe.db.sql("""update `tabCommunication` | |||
set timeline_doctype=null, timeline_name=null | |||
where timeline_doctype=%s and timeline_name=%s""", (doc.doctype, doc.name)) | |||
where timeline_doctype=%s and timeline_name=%s""", (doctype, name)) | |||
# delete shares | |||
delete_doc("DocShare", frappe.db.sql_list("""select name from `tabDocShare` | |||
where share_doctype=%s and share_name=%s""", (doctype, name)), | |||
ignore_on_trash=True, force=True) | |||
# delete versions | |||
frappe.db.sql('delete from tabVersion where ref_doctype=%s and docname=%s', (doctype, name)) | |||
def insert_feed(doc): | |||
from frappe.utils import get_fullname | |||
@@ -262,6 +272,3 @@ def insert_feed(doc): | |||
"full_name": get_fullname(doc.owner) | |||
}).insert(ignore_permissions=True) | |||
def delete_shared(doc): | |||
delete_doc("DocShare", frappe.db.sql_list("""select name from `tabDocShare` | |||
where share_doctype=%s and share_name=%s""", (doc.doctype, doc.name)), ignore_on_trash=True) |
@@ -222,14 +222,15 @@ class Document(BaseDocument): | |||
"""Wrapper for _save""" | |||
return self._save(*args, **kwargs) | |||
def _save(self, ignore_permissions=None): | |||
def _save(self, ignore_permissions=None, ignore_version=None): | |||
"""Save the current document in the database in the **DocType**'s table or | |||
`tabSingles` (for single types). | |||
This will check for user permissions and execute | |||
`validate` before updating, `on_update` after updating triggers. | |||
:param ignore_permissions: Do not check permissions if True.""" | |||
:param ignore_permissions: Do not check permissions if True. | |||
:param ignore_version: Do not save version if True.""" | |||
if self.flags.in_print: | |||
return | |||
@@ -238,6 +239,9 @@ class Document(BaseDocument): | |||
if ignore_permissions!=None: | |||
self.flags.ignore_permissions = ignore_permissions | |||
if ignore_version!=None: | |||
self.flags.ignore_version = ignore_version | |||
if self.get("__islocal") or not self.get("name"): | |||
self.insert() | |||
return | |||
@@ -743,6 +747,10 @@ class Document(BaseDocument): | |||
self.set_title_field() | |||
self.reset_seen() | |||
self._doc_before_save = None | |||
if not self.is_new() and getattr(self.meta, 'track_changes', False): | |||
self._doc_before_save = frappe.get_doc(self.doctype, self.name) | |||
if self.flags.ignore_validate: | |||
return | |||
@@ -769,13 +777,9 @@ class Document(BaseDocument): | |||
elif self._action=="submit": | |||
self.run_method("on_update") | |||
self.run_method("on_submit") | |||
if not self.flags.ignore_submit_comment: | |||
self.add_comment("Submitted") | |||
elif self._action=="cancel": | |||
self.run_method("on_cancel") | |||
self.check_no_back_links_exist() | |||
if not self.flags.ignore_submit_comment: | |||
self.add_comment("Cancelled") | |||
elif self._action=="update_after_submit": | |||
self.run_method("on_update_after_submit") | |||
@@ -785,6 +789,9 @@ class Document(BaseDocument): | |||
self.clear_cache() | |||
self.notify_update() | |||
if self._doc_before_save and not self.flags.ignore_version: | |||
self.save_version() | |||
if (self.doctype, self.name) in frappe.flags.currently_saving: | |||
frappe.flags.currently_saving.remove((self.doctype, self.name)) | |||
@@ -815,6 +822,12 @@ class Document(BaseDocument): | |||
check_if_doc_is_linked(self, method="Cancel") | |||
check_if_doc_is_dynamically_linked(self, method="Cancel") | |||
def save_version(self): | |||
'''Save version info''' | |||
version = frappe.new_doc('Version') | |||
if version.set_diff(self._doc_before_save, self): | |||
version.insert(ignore_permissions=True) | |||
@staticmethod | |||
def whitelist(f): | |||
"""Decorator: Whitelist method to be called remotely via REST API.""" | |||
@@ -921,18 +934,29 @@ class Document(BaseDocument): | |||
:param comment_type: e.g. `Comment`. See Communication for more info.""" | |||
comment = frappe.get_doc({ | |||
"doctype":"Communication", | |||
"communication_type": "Comment", | |||
"sender": comment_by or frappe.session.user, | |||
"comment_type": comment_type, | |||
"reference_doctype": self.doctype, | |||
"reference_name": self.name, | |||
"content": text or comment_type, | |||
"link_doctype": link_doctype, | |||
"link_name": link_name | |||
}).insert(ignore_permissions=True) | |||
return comment | |||
if comment_type=='Comment': | |||
out = frappe.get_doc({ | |||
"doctype":"Communication", | |||
"communication_type": "Comment", | |||
"sender": comment_by or frappe.session.user, | |||
"comment_type": comment_type, | |||
"reference_doctype": self.doctype, | |||
"reference_name": self.name, | |||
"content": text or comment_type, | |||
"link_doctype": link_doctype, | |||
"link_name": link_name | |||
}).insert(ignore_permissions=True) | |||
else: | |||
out = frappe.get_doc(dict( | |||
doctype='Version', | |||
ref_doctype= self.doctype, | |||
docname= self.name, | |||
data = frappe.as_json(dict(comment_type=comment_type, comment=text)) | |||
)) | |||
if comment_by: | |||
out.owner = comment_by | |||
out.insert(ignore_permissions=True) | |||
return out | |||
def add_seen(self, user=None): | |||
'''add the given/current user to list of users who have seen this document (_seen)''' | |||
@@ -66,6 +66,11 @@ def rename_doc(doctype, old, new, force=False, merge=False, ignore_permissions=F | |||
and defkey=%s and defvalue=%s""", (new, doctype, old)) | |||
frappe.clear_cache() | |||
if merge: | |||
new_doc.add_comment('Edit', _("merged {0} into {1}").format(frappe.bold(old), frappe.bold(new))) | |||
else: | |||
new_doc.add_comment('Edit', _("renamed from {0} to {1}").format(frappe.bold(old), frappe.bold(new))) | |||
return new | |||
def update_attachments(doctype, old, new): | |||
@@ -328,7 +333,8 @@ def rename_dynamic_links(doctype, old, new): | |||
# because the table hasn't been renamed yet! | |||
parent = df.parent if df.parent != new else old | |||
frappe.db.sql("""update `tab{parent}` set {fieldname}=%s | |||
where {options}=%s and {fieldname}=%s""".format(**df), (new, doctype, old)) | |||
where {options}=%s and {fieldname}=%s""".format(parent = parent, | |||
fieldname=df.fieldname, options=df.options), (new, doctype, old)) | |||
def bulk_rename(doctype, rows=None, via_console = False): | |||
"""Bulk rename documents | |||
@@ -41,7 +41,7 @@ def sync_for(app_name, force=0, sync_everything = False, verbose=False): | |||
l = len(files) | |||
if l: | |||
for i, doc_path in enumerate(files): | |||
import_file_by_path(doc_path, force=force) | |||
import_file_by_path(doc_path, force=force, ignore_version=True) | |||
#print module_name + ' | ' + doctype + ' | ' + name | |||
frappe.db.commit() | |||
@@ -30,7 +30,7 @@ def get_file_path(module, dt, dn): | |||
return path | |||
def import_file_by_path(path, force=False, data_import=False, pre_process=None): | |||
def import_file_by_path(path, force=False, data_import=False, pre_process=None, ignore_version=None): | |||
frappe.flags.in_import = True | |||
try: | |||
docs = read_doc_from_file(path) | |||
@@ -51,7 +51,8 @@ def import_file_by_path(path, force=False, data_import=False, pre_process=None): | |||
original_modified = doc.get("modified") | |||
import_doc(doc, force=force, data_import=data_import, pre_process=pre_process) | |||
import_doc(doc, force=force, data_import=data_import, pre_process=pre_process, | |||
ignore_version=ignore_version) | |||
if original_modified: | |||
# since there is a new timestamp on the file, update timestamp in | |||
@@ -87,10 +88,11 @@ ignore_values = { | |||
ignore_doctypes = ["Page Role", "DocPerm"] | |||
def import_doc(docdict, force=False, data_import=False, pre_process=None): | |||
def import_doc(docdict, force=False, data_import=False, pre_process=None, ignore_version=None): | |||
frappe.flags.in_import = True | |||
docdict["__islocal"] = 1 | |||
doc = frappe.get_doc(docdict) | |||
doc.flags.ignore_version = ignore_version | |||
if pre_process: | |||
pre_process(doc) | |||
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2016, Frappe Technologies and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Letter Head', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -3,15 +3,18 @@ | |||
"allow_import": 0, | |||
"allow_rename": 1, | |||
"autoname": "field:letter_head_name", | |||
"beta": 0, | |||
"creation": "2012-11-22 17:45:46", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"editable_grid": 0, | |||
"fields": [ | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "letter_head_name", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
@@ -19,6 +22,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Letter Head Name", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -28,6 +32,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -38,6 +43,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"depends_on": "letter_head_name", | |||
"fieldname": "disabled", | |||
"fieldtype": "Check", | |||
@@ -46,6 +52,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Disabled", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -55,6 +62,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -65,6 +73,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"depends_on": "letter_head_name", | |||
"description": "Check this to make this the default letter head in all prints", | |||
"fieldname": "is_default", | |||
@@ -74,6 +83,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Is Default", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -83,6 +93,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 1, | |||
@@ -93,6 +104,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"depends_on": "letter_head_name", | |||
"description": "Letter Head in HTML", | |||
"fieldname": "content", | |||
@@ -102,6 +114,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Content", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -111,6 +124,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -121,6 +135,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"depends_on": "letter_head_name", | |||
"fieldname": "footer", | |||
"fieldtype": "Text Editor", | |||
@@ -129,6 +144,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Footer", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -137,6 +153,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -148,13 +165,14 @@ | |||
"hide_toolbar": 0, | |||
"icon": "fa fa-font", | |||
"idx": 1, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 3, | |||
"modified": "2016-03-22 15:18:09.648844", | |||
"modified": "2016-12-29 14:40:38.250640", | |||
"modified_by": "Administrator", | |||
"module": "Print", | |||
"name": "Letter Head", | |||
@@ -170,6 +188,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -190,6 +209,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 0, | |||
"read": 1, | |||
@@ -201,7 +221,10 @@ | |||
"write": 0 | |||
} | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_order": "ASC" | |||
"sort_order": "ASC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -653,7 +653,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-11-07 05:23:46.983533", | |||
"modified": "2016-12-29 14:40:24.569123", | |||
"modified_by": "Administrator", | |||
"module": "Print", | |||
"name": "Print Format", | |||
@@ -686,5 +686,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -9,7 +9,6 @@ | |||
"doctype": "DocType", | |||
"document_type": "System", | |||
"editable_grid": 0, | |||
"engine": "InnoDB", | |||
"fields": [ | |||
{ | |||
"allow_on_submit": 0, | |||
@@ -23,6 +22,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "PDF Settings", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -51,6 +51,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Send Print as PDF", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -78,6 +79,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Repeat Header and Footer in PDF", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -105,6 +107,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
@@ -132,6 +135,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "PDF Page Size", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -159,6 +163,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
@@ -187,6 +192,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Send document web view link in email", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -214,6 +220,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Print Style", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -241,6 +248,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Print Style", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -269,6 +277,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Font", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -298,6 +307,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Font Size", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -324,6 +334,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
@@ -351,6 +362,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Print with letterhead", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -379,6 +391,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Allow Print for Draft", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -407,6 +420,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Always add \"Draft\" Heading for printing draft documents", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -435,6 +449,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Allow Print for Cancelled", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -450,34 +465,6 @@ | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"default": "0", | |||
"fieldname": "allow_page_break_inside_tables", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"label": "Allow Page break inside tables", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"precision": "", | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"unique": 0 | |||
}, | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
@@ -490,6 +477,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
@@ -515,6 +503,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Print Style Preview", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -541,7 +530,7 @@ | |||
"issingle": 1, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-12-26 14:20:34.710677", | |||
"modified": "2016-12-29 14:40:32.410139", | |||
"modified_by": "Administrator", | |||
"module": "Print", | |||
"name": "Print Settings", | |||
@@ -575,5 +564,6 @@ | |||
"read_only_onload": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} | |||
} |
@@ -226,6 +226,9 @@ h6.uppercase, | |||
.timeline-item { | |||
margin-top: 0px; | |||
} | |||
.timeline-item b { | |||
color: #36414C !important; | |||
} | |||
.timeline-item blockquote { | |||
font-size: inherit; | |||
} | |||
@@ -323,6 +326,12 @@ h6.uppercase, | |||
.timeline-item.notification-content .fa-fw { | |||
margin-left: 36px; | |||
} | |||
.timeline-item.notification-content div.small { | |||
padding-left: 40px; | |||
} | |||
.timeline-item.notification-content div.small .fa-fw { | |||
margin-left: 0px; | |||
} | |||
.timeline-item.notification-content .octicon-heart { | |||
color: #ff5858 !important; | |||
} | |||
@@ -172,6 +172,15 @@ frappe.dom = { | |||
} | |||
} | |||
frappe.ellipsis = function(text, max) { | |||
if(!max) max = 20; | |||
text = cstr(text); | |||
if(text.length > max) { | |||
text = text.substr(0, max) + '...'; | |||
} | |||
return text; | |||
} | |||
frappe.get_modal = function(title, content) { | |||
return $(frappe.render_template("modal", {title:title, content:content})).appendTo(document.body); | |||
}; | |||
@@ -84,9 +84,7 @@ frappe.ui.form.Timeline = Class.extend({ | |||
this.wrapper.toggle(true); | |||
this.list.empty(); | |||
// var communications = [].concat(this.get_communications()); | |||
var communications = this.get_communications(); | |||
var communications = this.get_communications(true); | |||
$.each(communications.sort(function(a, b) { return a.creation > b.creation ? -1 : 1 }), | |||
function(i, c) { | |||
@@ -108,8 +106,14 @@ frappe.ui.form.Timeline = Class.extend({ | |||
} | |||
// created | |||
me.render_timeline_item({"content": __("Created"), "comment_type": "Created", "communication_type": "Comment", | |||
"sender": this.frm.doc.owner, "creation": this.frm.doc.creation, "frm": this.frm}); | |||
me.render_timeline_item({ | |||
content: __("created"), | |||
comment_type: "Created", | |||
communication_type: "Comment", | |||
sender: this.frm.doc.owner, | |||
creation: this.frm.doc.creation, | |||
frm: this.frm | |||
}); | |||
this.wrapper.find(".is-email").prop("checked", this.last_type==="Email").change(); | |||
@@ -256,7 +260,8 @@ frappe.ui.form.Timeline = Class.extend({ | |||
"Attachment Removed": "octicon octicon-trashcan", | |||
"Shared": "octicon octicon-eye", | |||
"Unshared": "octicon octicon-circle-slash", | |||
"Like": "octicon octicon-heart" | |||
"Like": "octicon octicon-heart", | |||
"Edit": "octicon octicon-pencil" | |||
}[c.comment_type || c.communication_medium] | |||
c.color = { | |||
@@ -284,8 +289,88 @@ frappe.ui.form.Timeline = Class.extend({ | |||
c.icon_fg = "#fff"; | |||
}, | |||
get_communications: function() { | |||
return this.frm.get_docinfo().communications; | |||
get_communications: function(with_versions) { | |||
var docinfo = this.frm.get_docinfo(), | |||
me = this, | |||
out = [].concat(docinfo.communications); | |||
if(with_versions) { | |||
var add_comment = function(version, text, comment_type) { | |||
if(!comment_type) { | |||
text = '<a href="#Form/Version/'+version.name+'">' + text + '</a>'; | |||
} | |||
out.push({ | |||
comment_type: comment_type || 'Edit', | |||
creation: version.creation, | |||
owner: version.owner, | |||
version_name: version.name, | |||
content: text | |||
}); | |||
} | |||
docinfo.versions.forEach(function(version) { | |||
var data = JSON.parse(version.data); | |||
// comment | |||
if(data.comment) { | |||
add_comment(version, data.comment, data.comment_type); | |||
return; | |||
} | |||
// value changed in parent | |||
if(data.changed && data.changed.length) { | |||
var parts = []; | |||
data.changed.slice(0, 3).forEach(function(p) { | |||
if(p[0]==='docstatus') { | |||
if(p[2]==1) { | |||
add_comment(version, __('submitted this document')); | |||
} else if (p[2]==2) { | |||
add_comment(version, __('cancelled this document')); | |||
} | |||
} else { | |||
parts.push(__('{0} from {1} to {2}', [ | |||
frappe.meta.get_label(me.frm.doctype, p[0]), | |||
(frappe.ellipsis(p[1], 40) || '""').bold(), | |||
(frappe.ellipsis(p[2], 40) || '""').bold() | |||
])); | |||
} | |||
}); | |||
add_comment(version, __("changed value of {0}", [parts.join(', ')])); | |||
} | |||
// value changed in table field | |||
if(data.row_changed && data.row_changed.length) { | |||
var parts = [], count = 0; | |||
data.row_changed.every(function(row) { | |||
row[3].every(function(p) { | |||
parts.push(__('{0} from {1} to {2} in row #{3}', [ | |||
frappe.meta.get_label(me.frm.fields_dict[row[0]].grid.doctype, | |||
p[0]), | |||
(frappe.ellipsis(p[1], 40) || '""').bold(), | |||
(frappe.ellipsis(p[2], 40) || '""').bold(), | |||
row[1] | |||
])); | |||
return parts.length < 3; | |||
}); | |||
return parts.length < 3; | |||
}); | |||
add_comment(version, __("changed values for {0}", | |||
[parts.join(', ')])); | |||
} | |||
// rows added / removed | |||
// __('added'), __('removed') # for translation, don't remove | |||
['added', 'removed'].forEach(function(key) { | |||
if(data[key] && data[key].length) { | |||
parts = (data[key] || []).map(function(p) { | |||
return frappe.meta.get_label(me.frm.doctype, p[0]) }); | |||
add_comment(version, __("{0} rows for {1}", | |||
[__(key), parts.join(', ')])); | |||
} | |||
}); | |||
}); | |||
} | |||
return out; | |||
}, | |||
add_comment: function(btn) { | |||
var txt = this.input.val(); | |||
@@ -17,24 +17,28 @@ | |||
{%= data.delete %} | |||
</span> | |||
</div> | |||
{% if(data.communication_type==="Communication" || (data.communication_type==="Comment" && data.comment_type==="Comment")) { %} | |||
{% if(data.communication_type==="Communication" | |||
|| (data.communication_type==="Comment" | |||
&& data.comment_type==="Comment")) { %} | |||
<div class="comment-header small"> | |||
<i class="{%= data.icon %} fa-fw"></i> | |||
<span title="{%= data.comment_by %}">{%= data.fullname %}</span> | |||
<i class="{%= data.icon %} fa-fw"></i> | |||
<span title="{%= data.comment_by %}">{%= data.fullname %}</span> | |||
<span> | |||
{% if (data.timeline_doctype===data.frm.doc.doctype && data.timeline_name===data.frm.doc.name) { %} | |||
{% if (data.timeline_doctype===data.frm.doc.doctype | |||
&& data.timeline_name===data.frm.doc.name) { %} | |||
– | |||
<a href="#Form/{%= data.reference_doctype %}/{%= data.reference_name %}" class="text-muted"> | |||
<strong>{{ __(data.reference_doctype) }}</strong> {{ data.reference_name }} | |||
<strong>{{ __(data.reference_doctype) }}</strong> | |||
{{ data.reference_name }} | |||
</a> | |||
{% } %} | |||
</span> | |||
<span class="text-muted" style="font-weight: normal;"> | |||
– {%= data.comment_on %}</span> | |||
{% if(data.communication_type==="Communication") { %} | |||
<span class="text-muted" style="font-weight: normal;"> | |||
– {%= data.comment_on %}</span> | |||
{% if(data.communication_type==="Communication") { %} | |||
{% if (frappe.model.can_read(\'Communication\')) { %} | |||
<a href="#Form/{%= data.doctype %}/{%= data.name %}" | |||
class="text-muted"> | |||
class="text-muted"> | |||
{% } %} | |||
{% if (data.delivery_status) { | |||
@@ -47,7 +51,8 @@ | |||
} | |||
%} | |||
<span class="text-muted">–</span> | |||
<span class="indicator-right {%= indicator_class %} delivery-status-indicator" | |||
<span class="indicator-right {%= indicator_class %} | |||
delivery-status-indicator" | |||
title="{%= data.delivery_status %}"> | |||
{%= data.delivery_status %}</span> | |||
@@ -64,74 +69,84 @@ | |||
{% if (data.communication_medium === "Email") { %} | |||
<a class="text-muted reply-link pull-right" | |||
data-name="{%= data.name %}">{%= __("Reply") %}</a> | |||
data-name="{%= data.name %}">{%= __("Reply") %}</a> | |||
{% } %} | |||
{% } %} | |||
<span class="comment-likes" data-liked-by=\'{{ JSON.stringify(data._liked_by) }}\'> | |||
{% } %} | |||
<span class="comment-likes" | |||
data-liked-by=\'{{ JSON.stringify(data._liked_by) }}\'> | |||
<i class="octicon octicon-heart like-action | |||
{% if (!data.liked_by_user) { %} | |||
text-extra-muted not-liked | |||
{% } %} " | |||
data-doctype="{%= data.doctype %}" | |||
data-name="{%= data.name %}"></i> | |||
<span class="likes-count text-muted">{{ (data._liked_by || []).length }}</span> | |||
<span class="likes-count text-muted"> | |||
{{ (data._liked_by || []).length }}</span> | |||
</span> | |||
</div> | |||
</div> | |||
<div class="reply" style="overflow-x: auto"> | |||
<div class="timeline-item-content"> | |||
{%= data.content_html %} | |||
</div> | |||
</div> | |||
{% } else if(in_list(["Assignment Completed", "Assigned", "Shared", "Unshared"], data.comment_type)) { %} | |||
<div class="small"> | |||
<i class="{%= data.icon %} fa-fw"></i> | |||
{% if (data.timeline_doctype===data.frm.doc.doctype && data.timeline_name===data.frm.doc.name) { %} | |||
<div class="timeline-item-content"> | |||
{%= data.content_html %} | |||
</div> | |||
</div> | |||
{% } else if(in_list(["Assignment Completed", "Assigned", "Shared", | |||
"Unshared"], data.comment_type)) { %} | |||
<div class="small"> | |||
<i class="{%= data.icon %} fa-fw"></i> | |||
{% if (data.timeline_doctype===data.frm.doc.doctype | |||
&& data.timeline_name===data.frm.doc.name) { %} | |||
<a href="#Form/{%= data.reference_doctype %}/{%= data.reference_name %}"> | |||
<strong>{{ __(data.reference_doctype) }}</strong> {{ data.reference_name }} | |||
<strong>{{ __(data.reference_doctype) }}</strong> | |||
{{ data.reference_name }} | |||
</a> | |||
– | |||
{% } %} | |||
{% if(data.link_doctype && data.link_name) { %} | |||
<a href="#Form/{%= data.link_doctype %}/{%= data.link_name %}"> | |||
{% } %} | |||
{%= __(data.content) %} | |||
{%= __(data.content) %} | |||
{% if(data.link_doctype && data.link_name) { %} | |||
</a> | |||
{% } %} | |||
<span class="text-muted" style="font-weight: normal;"> | |||
– {%= data.comment_on %}</span> | |||
</div> | |||
{% } else { %} | |||
<div class="small"> | |||
<i class="{%= data.icon %} fa-fw"></i> | |||
<span class="text-muted" style="font-weight: normal;"> | |||
– {%= data.comment_on %}</span> | |||
</div> | |||
{% } else { %} | |||
<div class="small"> | |||
<i class="{%= data.icon %} fa-fw"></i> | |||
{% if (data.comment_type == "Like") { %} | |||
<span title="{%= data.comment_by %}"> | |||
{% if (data.timeline_doctype===data.frm.doc.doctype && data.timeline_name===data.frm.doc.name) { %} | |||
{% if (data.timeline_doctype===data.frm.doc.doctype | |||
&& data.timeline_name===data.frm.doc.name) { %} | |||
<a href="#Form/{%= data.reference_doctype %}/{%= data.reference_name %}"> | |||
<strong>{{ __(data.reference_doctype) }}</strong> {{ data.reference_name }} | |||
<strong>{{ __(data.reference_doctype) }}</strong> | |||
{{ data.reference_name }} | |||
</a> – | |||
{% } %} | |||
{%= __("Liked by {0}", [data.fullname]) %} | |||
</span> | |||
{% } else { %} | |||
<span title="{%= data.comment_by %}">{%= data.fullname %}</span> | |||
<b title="{{ data.comment_by }}">{%= data.fullname %}</b> | |||
{%= __(data.content) %} | |||
{% if (data.timeline_doctype===data.frm.doc.doctype && data.timeline_name===data.frm.doc.name) { %} | |||
{% if (data.timeline_doctype===data.frm.doc.doctype | |||
&& data.timeline_name===data.frm.doc.name) { %} | |||
– | |||
<a href="#Form/{%= data.reference_doctype %}/{%= data.reference_name %}"> | |||
<strong>{{ __(data.reference_doctype) }}</strong> {{ data.reference_name }} | |||
<strong>{{ __(data.reference_doctype) }}</strong> | |||
{{ data.reference_name }} | |||
</a> | |||
{% } %} | |||
{% } %} | |||
<span class="text-muted" style="font-weight: normal;"> | |||
– {%= data.comment_on %}</span> | |||
</div> | |||
{% } %} | |||
<span class="text-muted" style="font-weight: normal;"> | |||
– {%= data.comment_on %}</span> | |||
</div> | |||
{% } %} | |||
{% if(data.attachments && data.attachments.length) { %} | |||
<div style="margin: 10px 0px"> | |||
{% $.each(data.attachments, function(i, a) { %} | |||
<div class="ellipsis"> | |||
<a href="{%= encodeURI(a.file_url).replace(/#/g, \'%23\') %}" class="text-muted small" target="_blank"> | |||
<a href="{%= encodeURI(a.file_url).replace(/#/g, \'%23\') %}" | |||
class="text-muted small" target="_blank"> | |||
<i class="fa fa-paperclip"></i> | |||
{%= a.file_url.split("/").slice(-1)[0] %} | |||
{% if (a.is_private) { %} | |||
@@ -59,7 +59,7 @@ frappe.form.formatters = { | |||
if(value) { | |||
return '<i class="octicon octicon-check" style="margin-right: 3px;"></i>'; | |||
} else { | |||
return '<i class="fa fa-ban-circle text-extra-muted" style="margin-right: 3px;"></i>'; | |||
return '<i class="fa fa-square-o text-extra-muted" style="margin-right: 3px;"></i>'; | |||
} | |||
}, | |||
Link: function(value, docfield, options, doc) { | |||
@@ -20,7 +20,8 @@ | |||
{%= frappe.render_template("header_select_all_like_filter", { _checkbox: _checkbox }) %} | |||
{% } %} | |||
<span class="list-value">{%= __(col.title) || __(col.label) || "" %}</span> | |||
<span class="list-value" {% if i==0 %}style="margin-left: -8px;"{% endif %}> | |||
{{ __(col.title) || __(col.label) || "" }}</span> | |||
</div> | |||
{% } %} | |||
{% } %} | |||
@@ -185,7 +185,7 @@ frappe.search = { | |||
} else { | |||
_item = item; | |||
} | |||
_item = __(_item).toLowerCase().replace(/-/g, " "); | |||
_item = __(_item || '').toLowerCase().replace(/-/g, " "); | |||
if(txt===_item || _item.indexOf(txt) !== -1) { | |||
var option = process(item); | |||
@@ -28,7 +28,7 @@ frappe.template.compile = function(str, name) { | |||
return "{% for (var "+i+"=0, "+len+"="+p2+".length; "+i+"<"+len+"; "+i+"++) { var " | |||
+p1+" = "+p2+"["+i+"]; "+p1+"._index = "+i+"; %}"; | |||
} | |||
str = str.replace(/{%\s?for\s([a-z]+)\sin\s([a-z._]+)\s?%}/g, replacer); | |||
str = str.replace(/{%\s?for\s([a-z._]+)\sin\s([a-z._]+)\s?%}/g, replacer); | |||
// {% endfor %} --> {% } %} | |||
str = str.replace(/{%\s?endif\s?%}/g, "{% }; %}"); | |||
@@ -294,6 +294,10 @@ h6.uppercase, .h6.uppercase { | |||
.timeline-item { | |||
margin-top: 0px; | |||
b { | |||
color: @text-color !important; | |||
} | |||
blockquote { | |||
font-size: inherit; | |||
} | |||
@@ -412,6 +416,14 @@ h6.uppercase, .h6.uppercase { | |||
margin-left: 36px; | |||
} | |||
div.small { | |||
padding-left: 40px; | |||
.fa-fw { | |||
margin-left: 0px; | |||
} | |||
} | |||
.octicon-heart { | |||
color: @heart-color !important; | |||
} | |||
@@ -15,10 +15,10 @@ class TestDB(unittest.TestCase): | |||
self.assertEquals(frappe.db.get_value("User", {"name": ["<", "B"]}), "Administrator") | |||
self.assertEquals(frappe.db.get_value("User", {"name": ["<=", "Administrator"]}), "Administrator") | |||
self.assertEquals(frappe.db.sql("""select name from `tabUser` where name > "s" """)[0][0], | |||
self.assertEquals(frappe.db.sql("""select name from `tabUser` where name > "s" order by modified desc""")[0][0], | |||
frappe.db.get_value("User", {"name": [">", "s"]})) | |||
self.assertEquals(frappe.db.sql("""select name from `tabUser` where name >= "t" """)[0][0], | |||
self.assertEquals(frappe.db.sql("""select name from `tabUser` where name >= "t" order by modified desc""")[0][0], | |||
frappe.db.get_value("User", {"name": [">=", "t"]})) | |||
def test_escape(self): | |||
@@ -40,7 +40,7 @@ def upload(): | |||
comment = {} | |||
if dt and dn: | |||
comment = frappe.get_doc(dt, dn).add_comment("Attachment", | |||
_("Added {0}").format("<a href='{file_url}' target='_blank'>{file_name}</a>{icon}".format(**{ | |||
_("added {0}").format("<a href='{file_url}' target='_blank'>{file_name}</a>{icon}".format(**{ | |||
"icon": ' <i class="fa fa-lock text-warning"></i>' if filedata.is_private else "", | |||
"file_url": filedata.file_url.replace("#", "%23") if filedata.file_name else filedata.file_url, | |||
"file_name": filedata.file_name or filedata.file_url | |||
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2016, Frappe Technologies and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('About Us Settings', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -2,29 +2,37 @@ | |||
"allow_copy": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"beta": 0, | |||
"creation": "2013-03-19 12:02:15", | |||
"custom": 0, | |||
"description": "Settings for the About Us Page", | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Other", | |||
"editable_grid": 0, | |||
"fields": [ | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "help", | |||
"fieldtype": "HTML", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Help", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "<div class=\"alert\">Link for About Us Page is \"/about\"</div>", | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -35,18 +43,24 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "Introduce your company to the website visitor.", | |||
"fieldname": "company_introduction", | |||
"fieldtype": "Text Editor", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Company Introduction", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -57,17 +71,23 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "sb0", | |||
"fieldtype": "Section Break", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Org History", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -78,18 +98,24 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "\"Company History\"", | |||
"fieldname": "company_history_heading", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Org History Heading", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -100,18 +126,24 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "company_history", | |||
"fieldtype": "Table", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Org History", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Company History", | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -122,17 +154,23 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "sb1", | |||
"fieldtype": "Section Break", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Team Members", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -143,18 +181,24 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "\"Team Members\" or \"Management\"", | |||
"fieldname": "team_members_heading", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Team Members Heading", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -165,18 +209,24 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "team_members", | |||
"fieldtype": "Table", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Team Members", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "About Us Team Member", | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -187,18 +237,24 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"description": "More content for the bottom of the page.", | |||
"fieldname": "footer", | |||
"fieldtype": "Text Editor", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Footer", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -210,12 +266,14 @@ | |||
"hide_toolbar": 0, | |||
"icon": "fa fa-group", | |||
"idx": 1, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 1, | |||
"istable": 0, | |||
"modified": "2015-02-05 05:11:33.993407", | |||
"max_attachments": 0, | |||
"modified": "2016-12-29 14:40:41.692119", | |||
"modified_by": "Administrator", | |||
"module": "Website", | |||
"name": "About Us Settings", | |||
@@ -231,6 +289,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -242,6 +301,9 @@ | |||
"write": 1 | |||
} | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0 | |||
"read_only_onload": 0, | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -15,6 +15,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "category_name", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
@@ -22,6 +23,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Category Name", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -29,6 +31,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -39,6 +42,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "title", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
@@ -46,6 +50,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Title", | |||
"length": 0, | |||
"no_copy": 1, | |||
@@ -53,6 +58,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 1, | |||
"search_index": 0, | |||
@@ -63,6 +69,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "published", | |||
"fieldtype": "Check", | |||
"hidden": 0, | |||
@@ -70,6 +77,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 1, | |||
"in_standard_filter": 0, | |||
"label": "Published", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -77,6 +85,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -87,6 +96,7 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"depends_on": "published", | |||
"fieldname": "route", | |||
"fieldtype": "Data", | |||
@@ -95,6 +105,7 @@ | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Route", | |||
"length": 0, | |||
"no_copy": 0, | |||
@@ -103,6 +114,7 @@ | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -121,7 +133,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2016-07-25 05:24:23.923106", | |||
"modified": "2016-12-29 14:40:35.127314", | |||
"modified_by": "Administrator", | |||
"module": "Website", | |||
"name": "Blog Category", | |||
@@ -137,6 +149,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -157,6 +170,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -172,5 +186,6 @@ | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"sort_order": "DESC", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -11,7 +11,6 @@ class BlogCategory(WebsiteGenerator): | |||
self.name = self.category_name | |||
def on_update(self): | |||
WebsiteGenerator.on_update(self) | |||
clear_cache() | |||
def validate(self): | |||
@@ -322,7 +322,7 @@ | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 5, | |||
"modified": "2016-11-07 05:29:40.986597", | |||
"modified": "2016-12-29 14:40:20.508849", | |||
"modified_by": "Administrator", | |||
"module": "Website", | |||
"name": "Blog Post", | |||
@@ -376,5 +376,6 @@ | |||
"read_only_onload": 0, | |||
"sort_order": "ASC", | |||
"title_field": "title", | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |
@@ -11,7 +11,6 @@ from frappe.utils import today, cint, global_date_format, get_fullname, strip_ht | |||
from frappe.website.utils import find_first_image, get_comment_list | |||
class BlogPost(WebsiteGenerator): | |||
save_versions = True | |||
website = frappe._dict( | |||
condition_field = "published", | |||
template = "templates/generators/blog_post.html", | |||
@@ -46,7 +45,6 @@ class BlogPost(WebsiteGenerator): | |||
where name=%s""", (self.blogger,)) | |||
def on_update(self): | |||
WebsiteGenerator.on_update(self) | |||
clear_cache("writers") | |||
def get_context(self, context): | |||
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2016, Frappe Technologies and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Blog Settings', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -2,27 +2,35 @@ | |||
"allow_copy": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"beta": 0, | |||
"creation": "2013-03-11 17:48:16", | |||
"custom": 0, | |||
"description": "Blog Settings", | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"editable_grid": 0, | |||
"fields": [ | |||
{ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "blog_title", | |||
"fieldtype": "Data", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Blog Title", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -33,17 +41,23 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "blog_introduction", | |||
"fieldtype": "Small Text", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Blog Introduction", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -54,17 +68,23 @@ | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "writers_introduction", | |||
"fieldtype": "Small Text", | |||
"hidden": 0, | |||
"ignore_user_permissions": 0, | |||
"ignore_xss_filter": 0, | |||
"in_filter": 0, | |||
"in_list_view": 0, | |||
"in_standard_filter": 0, | |||
"label": "Writers Introduction", | |||
"length": 0, | |||
"no_copy": 0, | |||
"permlevel": 0, | |||
"print_hide": 0, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 0, | |||
"remember_last_selected_value": 0, | |||
"report_hide": 0, | |||
"reqd": 0, | |||
"search_index": 0, | |||
@@ -76,12 +96,14 @@ | |||
"hide_toolbar": 0, | |||
"icon": "fa fa-cog", | |||
"idx": 1, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"in_dialog": 0, | |||
"is_submittable": 0, | |||
"issingle": 1, | |||
"istable": 0, | |||
"modified": "2015-02-05 05:11:34.999631", | |||
"max_attachments": 0, | |||
"modified": "2016-12-29 14:40:41.629468", | |||
"modified_by": "Administrator", | |||
"module": "Website", | |||
"name": "Blog Settings", | |||
@@ -97,6 +119,7 @@ | |||
"export": 0, | |||
"if_owner": 0, | |||
"import": 0, | |||
"is_custom": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
@@ -108,6 +131,9 @@ | |||
"write": 1 | |||
} | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0 | |||
"read_only_onload": 0, | |||
"track_changes": 1, | |||
"track_seen": 0 | |||
} |