diff --git a/.gitignore b/.gitignore index 27b2369dab..a45a03de15 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,3 @@ locale *.egg-info dist/ build/ -docs/ diff --git a/frappe/config/docs.py b/frappe/config/docs.py new file mode 100644 index 0000000000..1f28f557dd --- /dev/null +++ b/frappe/config/docs.py @@ -0,0 +1,16 @@ + +source_link = "https://github.com/frappe/frappe" +docs_base_url = "https://frappe.github.io/frappe" +headline = "Full stack web framework to build complex apps" +sub_heading = "Build extensions to ERPNext or make your own database driven app" +hide_install = True +long_description = """The Frappe Framework is a server side and client side +framework and is built with the philosophy make it "battries included". +It has libraries and API for authentication, MVC, permissions, REST API, +templating, admin interface, forms, reports and much more. + +Frappe Framework was designed to build [ERPNext](https://erpnext.com), open source +ERP for managing small and medium sized businesses. +""" +def get_context(context): + context.title = "Frappe Framework" diff --git a/frappe/docs/assets/img/add_user_roles.png b/frappe/docs/assets/img/add_user_roles.png new file mode 100644 index 0000000000..49006acef9 Binary files /dev/null and b/frappe/docs/assets/img/add_user_roles.png differ diff --git a/frappe/docs/assets/img/attach_image.gif b/frappe/docs/assets/img/attach_image.gif new file mode 100644 index 0000000000..c360c8513e Binary files /dev/null and b/frappe/docs/assets/img/attach_image.gif differ diff --git a/frappe/docs/assets/img/autoname_and_search_field.png b/frappe/docs/assets/img/autoname_and_search_field.png new file mode 100644 index 0000000000..ea801805e5 Binary files /dev/null and b/frappe/docs/assets/img/autoname_and_search_field.png differ diff --git a/frappe/docs/assets/img/desk.png b/frappe/docs/assets/img/desk.png new file mode 100644 index 0000000000..311ff5a7cb Binary files /dev/null and b/frappe/docs/assets/img/desk.png differ diff --git a/frappe/docs/assets/img/doctype_adding_field.png b/frappe/docs/assets/img/doctype_adding_field.png new file mode 100644 index 0000000000..8ce7fdf284 Binary files /dev/null and b/frappe/docs/assets/img/doctype_adding_field.png differ diff --git a/frappe/docs/assets/img/doctype_adding_permission.png b/frappe/docs/assets/img/doctype_adding_permission.png new file mode 100644 index 0000000000..6853f42b01 Binary files /dev/null and b/frappe/docs/assets/img/doctype_adding_permission.png differ diff --git a/frappe/docs/assets/img/doctype_article.png b/frappe/docs/assets/img/doctype_article.png new file mode 100644 index 0000000000..3532ee2f74 Binary files /dev/null and b/frappe/docs/assets/img/doctype_article.png differ diff --git a/frappe/docs/assets/img/doctype_lib_member.png b/frappe/docs/assets/img/doctype_lib_member.png new file mode 100644 index 0000000000..3257fcf08e Binary files /dev/null and b/frappe/docs/assets/img/doctype_lib_member.png differ diff --git a/frappe/docs/assets/img/doctype_lib_membership.png b/frappe/docs/assets/img/doctype_lib_membership.png new file mode 100644 index 0000000000..c32e348e1d Binary files /dev/null and b/frappe/docs/assets/img/doctype_lib_membership.png differ diff --git a/frappe/docs/assets/img/doctype_lib_trans.png b/frappe/docs/assets/img/doctype_lib_trans.png new file mode 100644 index 0000000000..e7059290e9 Binary files /dev/null and b/frappe/docs/assets/img/doctype_lib_trans.png differ diff --git a/frappe/docs/assets/img/doctype_new.png b/frappe/docs/assets/img/doctype_new.png new file mode 100644 index 0000000000..e24c605e2b Binary files /dev/null and b/frappe/docs/assets/img/doctype_new.png differ diff --git a/frappe/docs/assets/img/fetch.png b/frappe/docs/assets/img/fetch.png new file mode 100644 index 0000000000..3ac38b8e08 Binary files /dev/null and b/frappe/docs/assets/img/fetch.png differ diff --git a/frappe/docs/assets/img/home.png b/frappe/docs/assets/img/home.png new file mode 100644 index 0000000000..cc34207724 Binary files /dev/null and b/frappe/docs/assets/img/home.png differ diff --git a/frappe/docs/assets/img/lib_management_module.png b/frappe/docs/assets/img/lib_management_module.png new file mode 100644 index 0000000000..be2a5d9820 Binary files /dev/null and b/frappe/docs/assets/img/lib_management_module.png differ diff --git a/frappe/docs/assets/img/lib_trans.png b/frappe/docs/assets/img/lib_trans.png new file mode 100644 index 0000000000..6ab4dbfa48 Binary files /dev/null and b/frappe/docs/assets/img/lib_trans.png differ diff --git a/frappe/docs/assets/img/link_field.png b/frappe/docs/assets/img/link_field.png new file mode 100644 index 0000000000..dac6600809 Binary files /dev/null and b/frappe/docs/assets/img/link_field.png differ diff --git a/frappe/docs/assets/img/login.png b/frappe/docs/assets/img/login.png new file mode 100644 index 0000000000..217d03f612 Binary files /dev/null and b/frappe/docs/assets/img/login.png differ diff --git a/frappe/docs/assets/img/naming_doctype.png b/frappe/docs/assets/img/naming_doctype.png new file mode 100644 index 0000000000..ca109e7c5d Binary files /dev/null and b/frappe/docs/assets/img/naming_doctype.png differ diff --git a/frappe/docs/assets/img/new_article.png b/frappe/docs/assets/img/new_article.png new file mode 100644 index 0000000000..6e17d82bfc Binary files /dev/null and b/frappe/docs/assets/img/new_article.png differ diff --git a/frappe/docs/assets/img/new_article_blank.png b/frappe/docs/assets/img/new_article_blank.png new file mode 100644 index 0000000000..54c8d9152a Binary files /dev/null and b/frappe/docs/assets/img/new_article_blank.png differ diff --git a/frappe/docs/assets/img/new_lib_membership.png b/frappe/docs/assets/img/new_lib_membership.png new file mode 100644 index 0000000000..ea8e16aa8b Binary files /dev/null and b/frappe/docs/assets/img/new_lib_membership.png differ diff --git a/frappe/docs/assets/img/new_member.png b/frappe/docs/assets/img/new_member.png new file mode 100644 index 0000000000..0bf0cea89d Binary files /dev/null and b/frappe/docs/assets/img/new_member.png differ diff --git a/frappe/docs/assets/img/report.png b/frappe/docs/assets/img/report.png new file mode 100644 index 0000000000..f0fe15bcfc Binary files /dev/null and b/frappe/docs/assets/img/report.png differ diff --git a/frappe/docs/assets/img/roles_creation.png b/frappe/docs/assets/img/roles_creation.png new file mode 100644 index 0000000000..e2733d7cd6 Binary files /dev/null and b/frappe/docs/assets/img/roles_creation.png differ diff --git a/frappe/docs/assets/img/select_field.png b/frappe/docs/assets/img/select_field.png new file mode 100644 index 0000000000..4ac4f213ad Binary files /dev/null and b/frappe/docs/assets/img/select_field.png differ diff --git a/frappe/docs/assets/img/system_settings.png b/frappe/docs/assets/img/system_settings.png new file mode 100644 index 0000000000..934dad3619 Binary files /dev/null and b/frappe/docs/assets/img/system_settings.png differ diff --git a/frappe/docs/assets/img/tab_single.png b/frappe/docs/assets/img/tab_single.png new file mode 100644 index 0000000000..e341313711 Binary files /dev/null and b/frappe/docs/assets/img/tab_single.png differ diff --git a/frappe/docs/contents.html b/frappe/docs/contents.html new file mode 100644 index 0000000000..59d0b4459d --- /dev/null +++ b/frappe/docs/contents.html @@ -0,0 +1,10 @@ + + +

Table of Contents

+
+ +{% include "templates/includes/full_index.html" %} + + + + diff --git a/frappe/docs/contents.py b/frappe/docs/contents.py new file mode 100644 index 0000000000..131d4102a3 --- /dev/null +++ b/frappe/docs/contents.py @@ -0,0 +1,9 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +from __future__ import unicode_literals +import frappe +from frappe.website.utils import get_full_index + +def get_context(context): + context.full_index = get_full_index(extn = True) diff --git a/frappe/docs/current/api/config/frappe.config.desktop.html b/frappe/docs/current/api/config/frappe.config.desktop.html new file mode 100644 index 0000000000..6ee4f29cd0 --- /dev/null +++ b/frappe/docs/current/api/config/frappe.config.desktop.html @@ -0,0 +1,34 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.config.desktop.get_data + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/config/frappe.config.docs.html b/frappe/docs/current/api/config/frappe.config.docs.html new file mode 100644 index 0000000000..994bba1f0a --- /dev/null +++ b/frappe/docs/current/api/config/frappe.config.docs.html @@ -0,0 +1,34 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.config.docs.get_context + (context) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/config/frappe.config.html b/frappe/docs/current/api/config/frappe.config.html new file mode 100644 index 0000000000..c74c8ce06c --- /dev/null +++ b/frappe/docs/current/api/config/frappe.config.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/config/frappe.config.integrations.html b/frappe/docs/current/api/config/frappe.config.integrations.html new file mode 100644 index 0000000000..1b248cde14 --- /dev/null +++ b/frappe/docs/current/api/config/frappe.config.integrations.html @@ -0,0 +1,34 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.config.integrations.get_data + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/config/frappe.config.setup.html b/frappe/docs/current/api/config/frappe.config.setup.html new file mode 100644 index 0000000000..a893e5ac71 --- /dev/null +++ b/frappe/docs/current/api/config/frappe.config.setup.html @@ -0,0 +1,34 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.config.setup.get_data + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/config/frappe.config.website.html b/frappe/docs/current/api/config/frappe.config.website.html new file mode 100644 index 0000000000..a29d10d2b6 --- /dev/null +++ b/frappe/docs/current/api/config/frappe.config.website.html @@ -0,0 +1,34 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.config.website.get_data + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/config/index.html b/frappe/docs/current/api/config/index.html new file mode 100644 index 0000000000..23c67fb66a --- /dev/null +++ b/frappe/docs/current/api/config/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/config/index.txt b/frappe/docs/current/api/config/index.txt new file mode 100644 index 0000000000..91a8fbfa41 --- /dev/null +++ b/frappe/docs/current/api/config/index.txt @@ -0,0 +1,6 @@ +frappe.config.desktop +frappe.config.docs +frappe.config +frappe.config.integrations +frappe.config.setup +frappe.config.website \ No newline at end of file diff --git a/frappe/docs/current/api/core/frappe.core.html b/frappe/docs/current/api/core/frappe.core.html new file mode 100644 index 0000000000..0c2b4d0a95 --- /dev/null +++ b/frappe/docs/current/api/core/frappe.core.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/core/frappe.core.notifications.html b/frappe/docs/current/api/core/frappe.core.notifications.html new file mode 100644 index 0000000000..847f15678f --- /dev/null +++ b/frappe/docs/current/api/core/frappe.core.notifications.html @@ -0,0 +1,82 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.core.notifications.get_notification_config + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.core.notifications.get_things_todo + () +

+

Returns a count of incomplete todos

+
+
+ + + + + + + +

+ + + frappe.core.notifications.get_todays_events + () +

+

Returns a count of todays events in calendar

+
+
+ + + + + + + +

+ + + frappe.core.notifications.get_unread_messages + () +

+

returns unread (docstatus-0 messages for a user)

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/core/index.html b/frappe/docs/current/api/core/index.html new file mode 100644 index 0000000000..2cd1333385 --- /dev/null +++ b/frappe/docs/current/api/core/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/core/index.txt b/frappe/docs/current/api/core/index.txt new file mode 100644 index 0000000000..7bf21e3723 --- /dev/null +++ b/frappe/docs/current/api/core/index.txt @@ -0,0 +1,2 @@ +frappe.core +frappe.core.notifications \ No newline at end of file diff --git a/frappe/docs/current/api/custom/frappe.custom.html b/frappe/docs/current/api/custom/frappe.custom.html new file mode 100644 index 0000000000..41751b0079 --- /dev/null +++ b/frappe/docs/current/api/custom/frappe.custom.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/custom/index.html b/frappe/docs/current/api/custom/index.html new file mode 100644 index 0000000000..c424fad120 --- /dev/null +++ b/frappe/docs/current/api/custom/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/custom/index.txt b/frappe/docs/current/api/custom/index.txt new file mode 100644 index 0000000000..adeae6e90d --- /dev/null +++ b/frappe/docs/current/api/custom/index.txt @@ -0,0 +1 @@ +frappe.custom \ No newline at end of file diff --git a/frappe/docs/current/api/desk/form/frappe.desk.form.assign_to.html b/frappe/docs/current/api/desk/form/frappe.desk.form.assign_to.html new file mode 100644 index 0000000000..ddf66d2768 --- /dev/null +++ b/frappe/docs/current/api/desk/form/frappe.desk.form.assign_to.html @@ -0,0 +1,108 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + +

Public API +
/api/method/frappe.desk.form.assign_to.add +

+

+ + + frappe.desk.form.assign_to.add + (args=None) +

+

add in someone's to do list +args = { + "assign_to": , + "doctype": , + "name": , + "description": +}

+
+
+ + + + + + + +

+ + + frappe.desk.form.assign_to.clear + (doctype, name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.form.assign_to.get + (args=None) +

+

get assigned to

+
+
+ + + + + + + +

+ + + frappe.desk.form.assign_to.notify_assignment + (assigned_by, owner, doc_type, doc_name, action=CLOSE, description=None, notify=0) +

+

Notify assignee that there is a change in assignment

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.assign_to.remove +

+

+ + + frappe.desk.form.assign_to.remove + (doctype, name, assign_to) +

+

remove from todo

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/form/frappe.desk.form.html b/frappe/docs/current/api/desk/form/frappe.desk.form.html new file mode 100644 index 0000000000..42dc01e4eb --- /dev/null +++ b/frappe/docs/current/api/desk/form/frappe.desk.form.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/form/frappe.desk.form.linked_with.html b/frappe/docs/current/api/desk/form/frappe.desk.form.linked_with.html new file mode 100644 index 0000000000..50771a29bb --- /dev/null +++ b/frappe/docs/current/api/desk/form/frappe.desk.form.linked_with.html @@ -0,0 +1,107 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.desk.form.linked_with._get_linked_doctypes + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.form.linked_with.get_dynamic_linked_fields + (doctype) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.linked_with.get_linked_docs +

+

+ + + frappe.desk.form.linked_with.get_linked_docs + (doctype, name, linkinfo=None) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.linked_with.get_linked_doctypes +

+

+ + + frappe.desk.form.linked_with.get_linked_doctypes + (doctype) +

+

add list of doctypes this doctype is 'linked' with.

+ +

Example, for Customer:

+ +
{"Address": {"fieldname": "customer"}..}
+
+
+
+ + + + + + + +

+ + + frappe.desk.form.linked_with.get_linked_fields + (doctype) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/form/frappe.desk.form.load.html b/frappe/docs/current/api/desk/form/frappe.desk.form.load.html new file mode 100644 index 0000000000..00222f8e66 --- /dev/null +++ b/frappe/docs/current/api/desk/form/frappe.desk.form.load.html @@ -0,0 +1,188 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.desk.form.load.get_assignments + (dt, dn) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.form.load.get_attachments + (dt, dn) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.load.get_badge_info +

+

+ + + frappe.desk.form.load.get_badge_info + (doctypes, filters) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.form.load.get_comments + (dt, dn, limit=100) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.load.get_docinfo +

+

+ + + frappe.desk.form.load.get_docinfo + (doc=None, doctype=None, name=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.form.load.get_meta_bundle + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.form.load.get_user_permissions + (meta) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.load.getdoc +

+

+ + + frappe.desk.form.load.getdoc + (doctype, name, user=None) +

+

Loads a doclist for a given document. This method is called directly from the client. +Requries "doctype", "name" as form variables. +Will also call the "onload" method on the document.

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.load.getdoctype +

+

+ + + frappe.desk.form.load.getdoctype + (doctype, with_parent=False, cached_timestamp=None) +

+

load doctype

+
+
+ + + + + + + +

+ + + frappe.desk.form.load.run_onload + (doc) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/form/frappe.desk.form.meta.html b/frappe/docs/current/api/desk/form/frappe.desk.form.meta.html new file mode 100644 index 0000000000..fc5a003dea --- /dev/null +++ b/frappe/docs/current/api/desk/form/frappe.desk.form.meta.html @@ -0,0 +1,245 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class FormMeta

+ +

Inherits from frappe.model.meta.Meta + +

+
+
+ + + + +

+ + + __init__ + (self, doctype) +

+

No docs

+
+
+ + + + + +

+ + + _add_code + (self, path, fieldname) +

+

No docs

+
+
+ + + + + +

+ + + add_code + (self) +

+

No docs

+
+
+ + + + + +

+ + + add_code_via_hook + (self, hook, fieldname) +

+

No docs

+
+
+ + + + + +

+ + + add_custom_script + (self) +

+

embed all require files

+
+
+ + + + + +

+ + + add_html_templates + (self, path) +

+

No docs

+
+
+ + + + + +

+ + + add_linked_document_type + (self) +

+

No docs

+
+
+ + + + + +

+ + + add_search_fields + (self) +

+

add search fields found in the doctypes indicated by link fields' options

+
+
+ + + + + +

+ + + as_dict + (self, no_nulls=False) +

+

No docs

+
+
+ + + + + +

+ + + load_assets + (self) +

+

No docs

+
+
+ + + + + +

+ + + load_print_formats + (self) +

+

No docs

+
+
+ + + + + +

+ + + load_templates + (self) +

+

No docs

+
+
+ + + + + +

+ + + load_workflows + (self) +

+

No docs

+
+
+ + + + + +

+ + + set_translations + (self, lang) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.desk.form.meta.get_meta + (doctype, cached=True) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/form/frappe.desk.form.run_method.html b/frappe/docs/current/api/desk/form/frappe.desk.form.run_method.html new file mode 100644 index 0000000000..b8595b5c1b --- /dev/null +++ b/frappe/docs/current/api/desk/form/frappe.desk.form.run_method.html @@ -0,0 +1,52 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.desk.form.run_method.make_csv_output + (res, dt) +

+

send method response as downloadable CSV file

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.run_method.runserverobj +

+

+ + + frappe.desk.form.run_method.runserverobj + (method, docs=None, dt=None, dn=None, arg=None, args=None) +

+

run controller method - old style

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/form/frappe.desk.form.save.html b/frappe/docs/current/api/desk/form/frappe.desk.form.save.html new file mode 100644 index 0000000000..0def22ec34 --- /dev/null +++ b/frappe/docs/current/api/desk/form/frappe.desk.form.save.html @@ -0,0 +1,86 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + +

Public API +
/api/method/frappe.desk.form.save.cancel +

+

+ + + frappe.desk.form.save.cancel + (doctype=None, name=None, workflow_state_fieldname=None, workflow_state=None) +

+

cancel a doclist

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.save.savedocs +

+

+ + + frappe.desk.form.save.savedocs + () +

+

save / submit / update doclist

+
+
+ + + + + + + +

+ + + frappe.desk.form.save.send_updated_docs + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.form.save.set_local_name + (doc) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/form/frappe.desk.form.test_form.html b/frappe/docs/current/api/desk/form/frappe.desk.form.test_form.html new file mode 100644 index 0000000000..5e40400ffe --- /dev/null +++ b/frappe/docs/current/api/desk/form/frappe.desk.form.test_form.html @@ -0,0 +1,47 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class TestForm

+ +

Inherits from unittest.case.TestCase + +

+
+
+ + + + +

+ + + test_linked_with + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/form/frappe.desk.form.utils.html b/frappe/docs/current/api/desk/form/frappe.desk.form.utils.html new file mode 100644 index 0000000000..62a45735c9 --- /dev/null +++ b/frappe/docs/current/api/desk/form/frappe.desk.form.utils.html @@ -0,0 +1,108 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + +

Public API +
/api/method/frappe.desk.form.utils.add_comment +

+

+ + + frappe.desk.form.utils.add_comment + (doc) +

+

allow any logged user to post a comment

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.utils.get_fields +

+

+ + + frappe.desk.form.utils.get_fields + () +

+

get fields

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.utils.get_next +

+

+ + + frappe.desk.form.utils.get_next + (doctype, value, prev, filters=None, order_by=modified desc) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.utils.remove_attach +

+

+ + + frappe.desk.form.utils.remove_attach + () +

+

remove attachment

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.form.utils.validate_link +

+

+ + + frappe.desk.form.utils.validate_link + () +

+

validate link when updated by user

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/form/index.html b/frappe/docs/current/api/desk/form/index.html new file mode 100644 index 0000000000..156194bccb --- /dev/null +++ b/frappe/docs/current/api/desk/form/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/form/index.txt b/frappe/docs/current/api/desk/form/index.txt new file mode 100644 index 0000000000..1bcd9b9b51 --- /dev/null +++ b/frappe/docs/current/api/desk/form/index.txt @@ -0,0 +1,9 @@ +frappe.desk.form.assign_to +frappe.desk.form +frappe.desk.form.linked_with +frappe.desk.form.load +frappe.desk.form.meta +frappe.desk.form.run_method +frappe.desk.form.save +frappe.desk.form.test_form +frappe.desk.form.utils \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.calendar.html b/frappe/docs/current/api/desk/frappe.desk.calendar.html new file mode 100644 index 0000000000..b8f3263b16 --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.calendar.html @@ -0,0 +1,52 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.desk.calendar.get_event_conditions + (doctype, filters=None) +

+

Returns SQL conditions with user permissions and filters for event queries

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.calendar.update_event +

+

+ + + frappe.desk.calendar.update_event + (args, field_map) +

+

Updates Event (called via calendar) based on passed field_map

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.desk_page.html b/frappe/docs/current/api/desk/frappe.desk.desk_page.html new file mode 100644 index 0000000000..95ebd9a5d9 --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.desk_page.html @@ -0,0 +1,70 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + +

Public API +
/api/method/frappe.desk.desk_page.get +

+

+ + + frappe.desk.desk_page.get + (name) +

+

Return the :term:doclist of the Page specified by name

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.desk_page.getpage +

+

+ + + frappe.desk.desk_page.getpage + () +

+

Load the page from frappe.form and send it via frappe.response

+
+
+ + + + + + + +

+ + + frappe.desk.desk_page.has_permission + (page) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.html b/frappe/docs/current/api/desk/frappe.desk.html new file mode 100644 index 0000000000..5843b659d0 --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.moduleview.html b/frappe/docs/current/api/desk/frappe.desk.moduleview.html new file mode 100644 index 0000000000..6309a2b054 --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.moduleview.html @@ -0,0 +1,261 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.desk.moduleview.add_custom_doctypes + (data, doctype_info) +

+

Adds Custom DocTypes to modules setup via config/desktop.py.

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.add_section + (data, label, icon, items) +

+

Adds a section to the module data.

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.add_setup_section + (config, app, module, label, icon) +

+

Add common sections to /desk#Module/Setup

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.apply_permissions + (data) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.build_config_from_file + (module) +

+

Build module info from app/config/desktop.py files.

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.build_standard_config + (module, doctype_info) +

+

Build standard module data from DocTypes.

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.combine_common_sections + (data) +

+

Combine sections declared in separate apps.

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.moduleview.get +

+

+ + + frappe.desk.moduleview.get + (module) +

+

Returns data (sections, list of reports, counts) to render module view in desk: +/desk/#Module/[name].

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.get_config + (app, module) +

+

Load module info from [app].config.[module].

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.get_data + (module) +

+

Get module data for the module view desk/#Module/[name]

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.get_doctype_info + (module) +

+

Returns list of non child DocTypes for given module.

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.get_last_modified + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.get_report_list + (module, is_standard=No) +

+

Returns list on new style reports for modules.

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.get_setup_section + (app, module, label, icon) +

+

Get the setup section from each module (for global Setup page).

+
+
+ + + + + + + +

+ + + frappe.desk.moduleview.set_last_modified + (data) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.notifications.html b/frappe/docs/current/api/desk/frappe.desk.notifications.html new file mode 100644 index 0000000000..f39cf3093b --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.notifications.html @@ -0,0 +1,164 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.desk.notifications.clear_doctype_notifications + (doc, method=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.notifications.clear_notifications + (user=*) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.notifications.delete_notification_count_for + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.notifications.get_new_messages + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.notifications.get_notification_config + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.notifications.get_notification_info_for_boot + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.notifications.get_notifications +

+

+ + + frappe.desk.notifications.get_notifications + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.notifications.get_notifications_for_doctypes + (config, notification_count) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.notifications.get_notifications_for_modules + (config, notification_count) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.query_builder.html b/frappe/docs/current/api/desk/frappe.desk.query_builder.html new file mode 100644 index 0000000000..1069d0eb0a --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.query_builder.html @@ -0,0 +1,183 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.desk.query_builder.add_limit_to_query + (query, args) +

+

Add limit condition to query +can be used by methods called in listing to add limit condition

+
+
+ + + + + + + +

+ + + frappe.desk.query_builder.add_match_conditions + (q, tl) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_builder.build_description_simple + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_builder.build_description_standard + (meta, tl) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_builder.get_parent_dt + (dt) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_builder.get_sql_meta + (tl) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_builder.get_sql_tables + (q) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_builder.guess_type + (m) +

+

Returns fieldtype depending on the MySQLdb Description

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.query_builder.runquery +

+

+ + + frappe.desk.query_builder.runquery + (q=, ret=0, from_export=0) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.query_builder.runquery_csv +

+

+ + + frappe.desk.query_builder.runquery_csv + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.query_report.html b/frappe/docs/current/api/desk/frappe.desk.query_report.html new file mode 100644 index 0000000000..42dc236460 --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.query_report.html @@ -0,0 +1,193 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.desk.query_report.add_total_row + (result, columns) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_report.get_columns_dict + (columns) +

+

Returns a dict with column docfield values as dict +The keys for the dict are both idx and fieldname, +so either index or fieldname can be used to search for a column's docfield properties

+
+
+ + + + + + + +

+ + + frappe.desk.query_report.get_filtered_data + (ref_doctype, columns, data) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_report.get_linked_doctypes + (columns, data) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_report.get_report_doc + (report_name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_report.get_report_module_dotted_path + (module, report_name) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.query_report.get_script +

+

+ + + frappe.desk.query_report.get_script + (report_name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_report.get_user_match_filters + (doctypes, ref_doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.query_report.has_match + (row, linked_doctypes, doctype_match_filters, ref_doctype, if_owner, columns_dict) +

+

Returns True if after evaluating permissions for each linked doctype +- There is an owner match for the ref_doctype +- and There is a user permission match for all linked doctypes

+ +

Returns True if the row is empty

+ +

Note: +Each doctype could have multiple conflicting user permission doctypes. +Hence even if one of the sets allows a match, it is true. +This behavior is equivalent to the trickling of user permissions of linked doctypes to the ref doctype.

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.query_report.run +

+

+ + + frappe.desk.query_report.run + (report_name, filters=()) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.report_dump.html b/frappe/docs/current/api/desk/frappe.desk.report_dump.html new file mode 100644 index 0000000000..b60de89172 --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.report_dump.html @@ -0,0 +1,36 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + +

Public API +
/api/method/frappe.desk.report_dump.get_data +

+

+ + + frappe.desk.report_dump.get_data + (doctypes, last_modified) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.reportview.html b/frappe/docs/current/api/desk/frappe.desk.reportview.html new file mode 100644 index 0000000000..dd636d1481 --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.reportview.html @@ -0,0 +1,220 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.desk.reportview.build_match_conditions + (doctype, as_condition=True) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.reportview.compress + (data) +

+

separate keys and values

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.reportview.delete_items +

+

+ + + frappe.desk.reportview.delete_items + () +

+

delete selected items

+
+
+ + + + + + + +

+ + + frappe.desk.reportview.execute + (doctype) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.reportview.export_query +

+

+ + + frappe.desk.reportview.export_query + () +

+

export from report builder

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.reportview.get +

+

+ + + frappe.desk.reportview.get + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.reportview.get_form_params + () +

+

Stringify GET request parameters.

+
+
+ + + + + + + +

+ + + frappe.desk.reportview.get_labels + (fields, doctype) +

+

get column labels based on column names

+
+
+ + + + + + + +

+ + + frappe.desk.reportview.get_match_cond + (doctype) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.reportview.get_stats +

+

+ + + frappe.desk.reportview.get_stats + (stats, doctype) +

+

get tag info

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.reportview.save_report +

+

+ + + frappe.desk.reportview.save_report + () +

+

save report

+
+
+ + + + + + + +

+ + + frappe.desk.reportview.scrub_user_tags + (tagcount) +

+

rebuild tag list for tags

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.search.html b/frappe/docs/current/api/desk/frappe.desk.search.html new file mode 100644 index 0000000000..56ed2c1742 --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.search.html @@ -0,0 +1,102 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.desk.search.build_for_autosuggest + (res) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.search.get_std_fields_list + (meta, key) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.search.scrub_custom_query + (query, key, txt) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.search.search_link +

+

+ + + frappe.desk.search.search_link + (doctype, txt, query=None, filters=None, page_len=20, searchfield=None) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.search.search_widget +

+

+ + + frappe.desk.search.search_widget + (doctype, txt, query=None, searchfield=None, start=0, page_len=50, filters=None) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.star.html b/frappe/docs/current/api/desk/frappe.desk.star.html new file mode 100644 index 0000000000..27d8fa76be --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.star.html @@ -0,0 +1,64 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.desk.star._toggle_star + (doctype, name, add=False, user=None) +

+

Same as toggle_star but hides param user from API

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.star.toggle_star +

+

+ + + frappe.desk.star.toggle_star + (doctype, name, add=False) +

+

Adds / removes the current user in the __starred_by property of the given document. +If column does not exist, will add it in the database.

+ +

The _starred_by property is always set from this function and is ignored if set via +Document API

+ +

Parameters:

+ + +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.tags.html b/frappe/docs/current/api/desk/frappe.desk.tags.html new file mode 100644 index 0000000000..3911e296ad --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.tags.html @@ -0,0 +1,213 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class DocTags

+ +

Tags for a particular doctype

+
+
+ + + + +

+ + + __init__ + (self, dt) +

+

No docs

+
+
+ + + + + +

+ + + add + (self, dn, tag) +

+

add a new user tag

+
+
+ + + + + +

+ + + get_tag_fields + (self) +

+

returns tag_fields property

+
+
+ + + + + +

+ + + get_tags + (self, dn) +

+

returns tag for a particular item

+
+
+ + + + + +

+ + + remove + (self, dn, tag) +

+

remove a user tag

+
+
+ + + + + +

+ + + remove_all + (self, dn) +

+

remove all user tags (call before delete)

+
+
+ + + + + +

+ + + setup + (self) +

+

adds the usertags column if not exists

+
+
+ + + + + +

+ + + update + (self, dn, tl) +

+

updates the usertag column in the table

+
+
+ + +
+
+ + + + + + +

Public API +
/api/method/frappe.desk.tags.add_tag +

+

+ + + frappe.desk.tags.add_tag + () +

+

adds a new tag to a record, and creates the Tag master

+
+
+ + + + + + + +

+ + + frappe.desk.tags.check_user_tags + (dt) +

+

if the user does not have a tags column, then it creates one

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.tags.get_tags +

+

+ + + frappe.desk.tags.get_tags + (doctype, txt) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.desk.tags.remove_tag +

+

+ + + frappe.desk.tags.remove_tag + () +

+

removes tag from the record

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/index.html b/frappe/docs/current/api/desk/index.html new file mode 100644 index 0000000000..80ae4bdefa --- /dev/null +++ b/frappe/docs/current/api/desk/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/desk/index.txt b/frappe/docs/current/api/desk/index.txt new file mode 100644 index 0000000000..439207c279 --- /dev/null +++ b/frappe/docs/current/api/desk/index.txt @@ -0,0 +1,12 @@ +frappe.desk.calendar +frappe.desk.desk_page +frappe.desk +frappe.desk.moduleview +frappe.desk.notifications +frappe.desk.query_builder +frappe.desk.query_report +frappe.desk.report_dump +frappe.desk.reportview +frappe.desk.search +frappe.desk.star +frappe.desk.tags \ No newline at end of file diff --git a/frappe/docs/current/api/email/frappe.email.bulk.html b/frappe/docs/current/api/email/frappe.email.bulk.html new file mode 100644 index 0000000000..4d0cec73ca --- /dev/null +++ b/frappe/docs/current/api/email/frappe.email.bulk.html @@ -0,0 +1,197 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class BulkLimitCrossedError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + + + +

+ + + frappe.email.bulk.add + (email, sender, subject, formatted, text_content=None, reference_doctype=None, reference_name=None, attachments=None, reply_to=None, cc=(), message_id=None, send_after=None, bulk_priority=1) +

+

add to bulk mail queue

+
+
+ + + + + + + +

+ + + frappe.email.bulk.check_bulk_limit + (recipients) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.email.bulk.clear_outbox + () +

+

Remove mails older than 31 days in Outbox. Called daily via scheduler.

+
+
+ + + + + + + +

+ + + frappe.email.bulk.flush + (from_test=False) +

+

flush email queue, every time: called from scheduler

+
+
+ + + + + + + +

+ + + frappe.email.bulk.get_unsubcribed_url + (reference_doctype, reference_name, email, unsubscribe_method, unsubscribe_params) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.email.bulk.get_unsubscribe_link + (reference_doctype, reference_name, email, recipients, expose_recipients, show_as_cc, unsubscribe_method, unsubscribe_params, unsubscribe_message) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.email.bulk.return_unsubscribed_page + (email, doctype, name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.email.bulk.send + (recipients=None, sender=None, subject=None, message=None, reference_doctype=None, reference_name=None, unsubscribe_method=None, unsubscribe_params=None, unsubscribe_message=None, attachments=None, reply_to=None, cc=(), show_as_cc=(), message_id=None, send_after=None, expose_recipients=False, bulk_priority=1) +

+

Add email to sending queue (Bulk Email)

+ +

Parameters:

+ + +
+
+ + + + + + +

Public API +
/api/method/frappe.email.bulk.unsubscribe +

+

+ + + frappe.email.bulk.unsubscribe + (doctype, name, email) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/email/frappe.email.email_body.html b/frappe/docs/current/api/email/frappe.email.email_body.html new file mode 100644 index 0000000000..a57fd54966 --- /dev/null +++ b/frappe/docs/current/api/email/frappe.email.email_body.html @@ -0,0 +1,293 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class EMail

+ +

Wrapper on the email module. Email object represents emails to be sent to the client. +Also provides a clean way to add binary FileData attachments +Also sets all messages as multipart/alternative for cleaner reading in text-only clients

+
+
+ + + + +

+ + + __init__ + (self, sender=, recipients=(), subject=, alternative=0, reply_to=None, cc=()) +

+

No docs

+
+
+ + + + + +

+ + + add_attachment + (self, fname, fcontent, content_type=None) +

+

add attachment

+
+
+ + + + + +

+ + + add_pdf_attachment + (self, name, html, options=None) +

+

No docs

+
+
+ + + + + +

+ + + as_string + (self) +

+

validate, build message and convert to string

+
+
+ + + + + +

+ + + attach_file + (self, n) +

+

attach a file from the FileData table

+
+
+ + + + + +

+ + + get_default_sender + (self) +

+

No docs

+
+
+ + + + + +

+ + + make + (self) +

+

build into msg_root

+
+
+ + + + + +

+ + + set_html + (self, message, text_content=None, footer=None, print_html=None, formatted=None) +

+

Attach message in the html portion of multipart/alternative

+
+
+ + + + + +

+ + + set_html_as_text + (self, html) +

+

return html2text

+
+
+ + + + + +

+ + + set_message + (self, message, mime_type=text/html, as_attachment=0, filename=attachment.html) +

+

Append the message with MIME content to the root node (as attachment)

+
+
+ + + + + +

+ + + set_message_id + (self, message_id) +

+

No docs

+
+
+ + + + + +

+ + + set_part_html + (self, message) +

+

No docs

+
+
+ + + + + +

+ + + set_text + (self, message) +

+

Attach message in the text portion of multipart/alternative

+
+
+ + + + + +

+ + + validate + (self) +

+

validate the email ids

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.email.email_body.get_email + (recipients, sender=, msg=, subject=[No Subject], text_content=None, footer=None, print_html=None, formatted=None, attachments=None, content=None, reply_to=None, cc=()) +

+

send an html email as multipart with attachments and all

+
+
+ + + + + + + +

+ + + frappe.email.email_body.get_footer + (email_account, footer=None) +

+

append a footer (signature)

+
+
+ + + + + + + +

+ + + frappe.email.email_body.get_formatted_html + (subject, message, footer=None, print_html=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.email.email_body.get_signature + (email_account) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/email/frappe.email.html b/frappe/docs/current/api/email/frappe.email.html new file mode 100644 index 0000000000..4e926b0705 --- /dev/null +++ b/frappe/docs/current/api/email/frappe.email.html @@ -0,0 +1,100 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + +

Public API +
/api/method/frappe.email.get_contact_list +

+

+ + + frappe.email.get_contact_list + () +

+

Returns contacts (from autosuggest)

+
+
+ + + + + + + +

+ + + frappe.email.get_system_managers + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.email.sendmail + (recipients, sender=, msg=, subject=[No Subject], attachments=None, content=None, reply_to=None, cc=(), message_id=None) +

+

send an html email as multipart with attachments and all

+
+
+ + + + + + + +

+ + + frappe.email.sendmail_md + (recipients, sender=None, msg=None, subject=None, attachments=None, content=None, reply_to=None, cc=(), message_id=None) +

+

send markdown email

+
+
+ + + + + + + +

+ + + frappe.email.sendmail_to_system_managers + (subject, content) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/email/frappe.email.receive.html b/frappe/docs/current/api/email/frappe.email.receive.html new file mode 100644 index 0000000000..2f9075e323 --- /dev/null +++ b/frappe/docs/current/api/email/frappe.email.receive.html @@ -0,0 +1,575 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class Email

+ +

Wrapper for an email.

+
+
+ + + + +

+ + + __init__ + (self, content) +

+

Parses headers, content, attachments from given raw message.

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + get_attachment + (self, part, charset) +

+

No docs

+
+
+ + + + + +

+ + + get_charset + (self, part) +

+

Detect chartset.

+
+
+ + + + + +

+ + + get_payload + (self, part, charset) +

+

No docs

+
+
+ + + + + +

+ + + get_thread_id + (self) +

+

Extract thread ID from []

+
+
+ + + + + +

+ + + parse + (self) +

+

Walk and process multi-part email.

+
+
+ + + + + +

+ + + process_part + (self, part) +

+

Parse email part and set it to text_content, html_content or attachments.

+
+
+ + + + + +

+ + + save_attachments_in_doc + (self, doc) +

+

Save email attachments in given document.

+
+
+ + + + + +

+ + + set_content_and_type + (self) +

+

No docs

+
+
+ + + + + +

+ + + set_subject + (self) +

+

Parse and decode Subject header.

+
+
+ + +
+
+ + + + + +

Class EmailSizeExceededError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class EmailTimeoutError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class LoginLimitExceeded

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class POP3Server

+ +

Wrapper for POP server to pull emails.

+
+
+ + + + +

+ + + __init__ + (self, args=None) +

+

No docs

+
+
+ + + + + +

+ + + check_mails + (self) +

+

No docs

+
+
+ + + + + +

+ + + connect + (self) +

+

Connect to Email Account.

+
+
+ + + + + +

+ + + get_messages + (self) +

+

Returns new email messages in a list.

+
+
+ + + + + +

+ + + has_login_limit_exceeded + (self, e) +

+

No docs

+
+
+ + + + + +

+ + + is_temporary_system_problem + (self, e) +

+

No docs

+
+
+ + + + + +

+ + + make_error_msg + (self, msg_num, incoming_mail) +

+

No docs

+
+
+ + + + + +

+ + + process_message + (self, mail) +

+

No docs

+
+
+ + + + + +

+ + + retrieve_message + (self, pop_meta, msg_num) +

+

No docs

+
+
+ + + + + +

+ + + setup + (self, args=None) +

+

No docs

+
+
+ + + + + +

+ + + validate_pop + (self, pop_meta) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class Timed_POP3

+ +

Inherits from frappe.email.receive.TimerMixin, poplib.POP3 + +

+
+
+ + + + +

+ + + __init__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + _getline + (self) +

+

No docs

+
+
+ + + + + +

+ + + quit + (self) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class Timed_POP3_SSL

+ +

Inherits from frappe.email.receive.TimerMixin, poplib.POP3_SSL + +

+
+
+ + + + +

+ + + __init__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + _getline + (self) +

+

No docs

+
+
+ + + + + +

+ + + quit + (self) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class TimerMixin

+ +

Inherits from __builtin__.object + +

+
+
+ + + + +

+ + + __init__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + _getline + (self) +

+

No docs

+
+
+ + + + + +

+ + + quit + (self) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class TotalSizeExceededError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/email/frappe.email.smtp.html b/frappe/docs/current/api/email/frappe.email.smtp.html new file mode 100644 index 0000000000..43b6f8caf2 --- /dev/null +++ b/frappe/docs/current/api/email/frappe.email.smtp.html @@ -0,0 +1,125 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class SMTPServer

+ +

+
+
+ + + + +

+ + + __init__ + (self, login=None, password=None, server=None, port=None, use_ssl=None, append_to=None) +

+

No docs

+
+
+ + + + + +

+ + + setup_email_account + (self, append_to=None) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.email.smtp._get_email_account + (filters) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.email.smtp.get_default_outgoing_email_account + (raise_exception_not_set=True) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.email.smtp.get_outgoing_email_account + (raise_exception_not_set=True, append_to=None) +

+

Returns outgoing email account based on append_to or the default +outgoing account. If default outgoing account is not found, it will +try getting settings from site_config.json.

+
+
+ + + + + + + +

+ + + frappe.email.smtp.send + (email, append_to=None) +

+

send the message or add it to Outbox Email

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/email/index.html b/frappe/docs/current/api/email/index.html new file mode 100644 index 0000000000..98ef52fcf7 --- /dev/null +++ b/frappe/docs/current/api/email/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/email/index.txt b/frappe/docs/current/api/email/index.txt new file mode 100644 index 0000000000..cf44b156d7 --- /dev/null +++ b/frappe/docs/current/api/email/index.txt @@ -0,0 +1,5 @@ +frappe.email.bulk +frappe.email.email_body +frappe.email +frappe.email.receive +frappe.email.smtp \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.__init__.html b/frappe/docs/current/api/frappe.__init__.html new file mode 100644 index 0000000000..a5dfb6a07e --- /dev/null +++ b/frappe/docs/current/api/frappe.__init__.html @@ -0,0 +1,1665 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + +

Introduction


globals attached to frappe module ++ some utility functions that should probably be moved

+

+ + + + + +

+ + + frappe.__init__._ + (msg, lang=None) +

+

Returns translated string in current lang, if exists.

+
+
+ + + + + +

Class _dict

+ +

Inherits from __builtin__.dict + +

dict like object that exposes keys as attributes

+
+
+ + + + +

+ + + __getattr__ + (self, key) +

+

No docs

+
+
+ + + + + +

+ + + __getstate__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + __setattr__ + (self, key, value) +

+

No docs

+
+
+ + + + + +

+ + + __setstate__ + (self, d) +

+

No docs

+
+
+ + + + + +

+ + + copy + (self) +

+

No docs

+
+
+ + + + + +

+ + + update + (self, d) +

+

update and return self -- the missing dict feature in python

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.__init__.add_version + (doc) +

+

Insert a new Version of the given document. +A Version is a JSON dump of the current document state.

+
+
+ + + + + + + +

+ + + frappe.__init__.are_emails_muted + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.__init__.as_json + (obj, indent=1) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.__init__.attach_print + (doctype, name, file_name=None, print_format=None, style=None, html=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.__init__.build_match_conditions + (doctype, as_condition=True) +

+

Return match (User permissions) for given doctype as list or SQL.

+
+
+ + + + + + + +

+ + + frappe.__init__.cache + () +

+

Returns memcache connection.

+
+
+ + + + + + + +

+ + + frappe.__init__.call + (fn) +

+

Call a function and match arguments.

+
+
+ + + + + + + +

+ + + frappe.__init__.clear_cache + (user=None, doctype=None) +

+

Clear User, DocType or global cache.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.compare + (val1, condition, val2) +

+

Compare two values using frappe.utils.compare

+ +

condition could be: +- "^" +- "in" +- "not in" +- "=" +- "!=" +- ">" +- "<" +- ">=" +- "<=" +- "not None" +- "None"

+
+
+ + + + + + + +

+ + + frappe.__init__.connect + (site=None, db_name=None) +

+

Connect to site database instance.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.copy_doc + (doc, ignore_no_copy=True) +

+

No_copy fields also get copied.

+
+
+ + + + + + + +

+ + + frappe.__init__.create_folder + (path, with_init=False) +

+

Create a folder in the given path and add an __init__.py file (optional).

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.delete_doc + (doctype=None, name=None, force=0, ignore_doctypes=None, for_reload=False, ignore_permissions=False, flags=None) +

+

Delete a document. Calls frappe.model.delete_doc.delete_doc.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.delete_doc_if_exists + (doctype, name) +

+

Delete document if exists.

+
+
+ + + + + + + +

+ + + frappe.__init__.destroy + () +

+

Closes connection and releases werkzeug local.

+
+
+ + + + + + + +

+ + + frappe.__init__.errprint + (msg) +

+

Log error. This is sent back as exc in response.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.format_value + (value, df, doc=None, currency=None) +

+

Format value with given field properties.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.generate_hash + (txt=None, length=None) +

+

Generates random hash for given text + current timestamp + random string.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_all + (doctype) +

+

List database query via frappe.model.db_query. Will not check for conditions. +Parameters are same as frappe.get_list

+ +

Parameters:

+ + + +

Example usage:

+ +
# simple dict filter
+frappe.get_all("ToDo", fields=["name", "description"], filters = {"owner":"test@example.com"})
+
+# filter as a list of lists
+frappe.get_all("ToDo", fields=["*"], filters = [["modified", ">", "2014-01-01"]])
+
+# filter as a list of dicts
+frappe.get_all("ToDo", fields=["*"], filters = {"description": ("like", "test%")})
+
+
+
+ + + + + + + +

+ + + frappe.__init__.get_all_apps + (with_frappe=False, with_internal_apps=True, sites_path=None) +

+

Get list of all apps via sites/apps.txt.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_app_path + (app_name) +

+

Return path of given app.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.get_attr + (method_string) +

+

Get python method object from its name.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_doc + (arg1, arg2=None) +

+

Return a frappe.model.document.Document object of the given type and name.

+ +

Parameters:

+ + + +

Examples:

+ +
# insert a new document
+todo = frappe.get_doc({"doctype":"ToDo", "description": "test"})
+tood.insert()
+
+# open an existing document
+todo = frappe.get_doc("ToDo", "TD0001")
+
+
+
+ + + + + + + +

+ + + frappe.__init__.get_file_items + (path, raise_not_found=False, ignore_empty_lines=True) +

+

Returns items from text file as a list. Ignores empty lines.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_file_json + (path) +

+

Read a file and return parsed JSON object.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_hooks + (hook=None, default=None, app_name=None) +

+

Get hooks via app/hooks.py

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.get_installed_apps + (sort=False) +

+

Get list of installed apps in current site.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_lang_dict + (fortype, name=None) +

+

Returns the translated language dict for the given type and name.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.get_last_doc + (doctype) +

+

Get last created document of this type.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_list + (doctype) +

+

List database query via frappe.model.db_query. Will also check for permissions.

+ +

Parameters:

+ + + +

Example usage:

+ +
# simple dict filter
+frappe.get_list("ToDo", fields=["name", "description"], filters = {"owner":"test@example.com"})
+
+# filter as a list of lists
+frappe.get_list("ToDo", fields="*", filters = [["modified", ">", "2014-01-01"]])
+
+# filter as a list of dicts
+frappe.get_list("ToDo", fields="*", filters = {"description": ("like", "test%")})
+
+
+
+ + + + + + + +

+ + + frappe.__init__.get_logger + (module=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.__init__.get_meta + (doctype, cached=True) +

+

Get frappe.model.meta.Meta instance of given doctype name.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_meta_module + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.__init__.get_module + (modulename) +

+

Returns a module object for given Python module name using importlib.import_module.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_module_list + (app_name) +

+

Get list of modules for given all via app/modules.txt.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_module_path + (module) +

+

Get the path of the given module name.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.get_precision + (doctype, fieldname, currency=None, doc=None) +

+

Get precision for a given field

+
+
+ + + + + + + +

+ + + frappe.__init__.get_print + (doctype, name, print_format=None, style=None, html=None, as_pdf=False) +

+

Get Print Format for given document.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.get_pymodule_path + (modulename) +

+

Return path of given Python module name.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.get_request_header + (key, default=None) +

+

Return HTTP request header.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.get_roles + (username=None) +

+

Returns roles of current user.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_single + (doctype) +

+

Return a frappe.model.document.Document object of the given Single doctype.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_site_config + (sites_path=None, site_path=None) +

+

Returns site_config.json combined with sites/common_site_config.json. +site_config is a set of site wide settings like database name, password, email etc.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_site_path + () +

+

Return path of current site.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.get_test_records + (doctype) +

+

Returns list of objects from test_records.json in the given doctype's folder.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_traceback + () +

+

Returns error traceback.

+
+
+ + + + + + + +

+ + + frappe.__init__.get_user + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.__init__.get_value + () +

+

Returns a document property or list of properties.

+ +

Alias for frappe.db.get_value

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.has_permission + (doctype, ptype=read, doc=None, user=None, verbose=False) +

+

Raises frappe.PermissionError if not permitted.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.has_website_permission + (doctype, ptype=read, doc=None, user=None, verbose=False) +

+

Raises frappe.PermissionError if not permitted.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.import_doc + (path, ignore_links=False, ignore_insert=False, insert=False) +

+

Import a file using Data Import Tool.

+
+
+ + + + + + + +

+ + + frappe.__init__.init + (site, sites_path=None) +

+

Initialize frappe for the current site. Reset thread locals frappe.local

+
+
+ + + + + + + +

+ + + frappe.__init__.is_table + (doctype) +

+

Returns True if istable property (indicating child Table) is set for given DocType.

+
+
+ + + + + + + +

+ + + frappe.__init__.local_cache + (namespace, key, generator, regenerate_if_none=False) +

+

A key value store for caching within a request

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.log + (msg) +

+

Add to debug_log.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.make_property_setter + (args, ignore_validate=False, validate_fields_for_doctype=True) +

+

Create a new Property Setter (for overriding DocType and DocField properties).

+
+
+ + + + + + + +

+ + + frappe.__init__.msgprint + (msg, small=0, raise_exception=0, as_table=False) +

+

Print a message to the user (via HTTP response). +Messages are sent in the __server_messages property in the +response JSON and shown in a pop-up / modal.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.new_doc + (doctype, parent_doc=None, parentfield=None, as_dict=False) +

+

Returns a new document of the given DocType with defaults set.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.only_for + (roles) +

+

Raise frappe.PermissionError if the user does not have any of the given Roles.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.publish_realtime + () +

+

Publish real-time updates

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.read_file + (path, raise_not_found=False) +

+

Open a file and return its content as Unicode.

+
+
+ + + + + + + +

+ + + frappe.__init__.reload_doc + (module, dt=None, dn=None, force=False) +

+

Reload Document from model ([module]/[doctype]/[name]/[name].json) files.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.reload_doctype + (doctype, force=False) +

+

Reload DocType from model ([module]/[doctype]/[name]/[name].json) files.

+
+
+ + + + + + + +

+ + + frappe.__init__.rename_doc + (doctype, old, new, debug=0, force=False, merge=False, ignore_permissions=False) +

+

Rename a document. Calls frappe.model.rename_doc.rename_doc

+
+
+ + + + + + + +

+ + + frappe.__init__.reset_metadata_version + () +

+

Reset metadata_version (Client (Javascript) build ID) hash.

+
+
+ + + + + + + +

+ + + frappe.__init__.respond_as_web_page + (title, html, success=None, http_status_code=None) +

+

Send response as a web page with a message rather than JSON. Used to show permission errors etc.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.scrub + (txt) +

+

Returns sluggified string. e.g. Sales Order becomes sales_order.

+
+
+ + + + + + + +

+ + + frappe.__init__.sendmail + (recipients=(), sender=, subject=No Subject, message=No Message, as_markdown=False, bulk=False, reference_doctype=None, reference_name=None, unsubscribe_method=None, unsubscribe_params=None, unsubscribe_message=None, attachments=None, content=None, doctype=None, name=None, reply_to=None, cc=(), show_as_cc=(), message_id=None, as_bulk=False, send_after=None, expose_recipients=False, bulk_priority=1) +

+

Send email using user's default Email Account or global default Email Account.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.set_user + (username) +

+

Set current user.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.set_user_lang + (user, user_language=None) +

+

Guess and set user language for the session. frappe.local.lang

+
+
+ + + + + + + +

+ + + frappe.__init__.set_value + (doctype, docname, fieldname, value) +

+

Set document value. Calls frappe.client.set_value

+
+
+ + + + + + + +

+ + + frappe.__init__.setup_module_map + () +

+

Rebuild map of all modules (internal).

+
+
+ + + + + + + +

+ + + frappe.__init__.throw + (msg, exc=) +

+

Throw execption and show message (msgprint).

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.__init__.unscrub + (txt) +

+

Returns titlified string. e.g. sales_order becomes Sales Order.

+
+
+ + + + + + + +

+ + + frappe.__init__.whitelist + (allow_guest=False, xss_safe=False) +

+

Decorator for whitelisting a function and making it accessible via HTTP. +Standard request will be /api/method/[path.to.method]

+ +

Parameters:

+ + + +

Use as:

+ +
@frappe.whitelist()
+def myfunc(param1, param2):
+    pass
+
+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.__version__.html b/frappe/docs/current/api/frappe.__version__.html new file mode 100644 index 0000000000..76bd01af27 --- /dev/null +++ b/frappe/docs/current/api/frappe.__version__.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.api.html b/frappe/docs/current/api/frappe.api.html new file mode 100644 index 0000000000..d0e389c0a2 --- /dev/null +++ b/frappe/docs/current/api/frappe.api.html @@ -0,0 +1,53 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.api.handle + () +

+

Handler for /api methods

+ +

Examples:

+ +

/api/method/{methodname} will call a whitelisted method

+ +

/api/resource/{doctype} will query a table + examples: + - ?fields=["name", "owner"] + - ?filters=[["Task", "name", "like", "%005"]] + - ?limit_start=0 + - ?limit_page_length=20

+ +

/api/resource/{doctype}/{name} will point to a resource + GET will return doclist + POST will insert + PUT will update + DELETE will delete

+ +

/api/resource/{doctype}/{name}?run_method={method} will run a whitelisted controller method

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.app.html b/frappe/docs/current/api/frappe.app.html new file mode 100644 index 0000000000..22a7756e97 --- /dev/null +++ b/frappe/docs/current/api/frappe.app.html @@ -0,0 +1,123 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class RequestContext

+ +

Inherits from __builtin__.object + +

+
+
+ + + + +

+ + + __enter__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + __exit__ + (self, type, value, traceback) +

+

No docs

+
+
+ + + + + +

+ + + __init__ + (self, environ) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.app.init_site + (request) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.app.make_form_dict + (request) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.app.serve + (port=8000, profile=False, site=None, sites_path=.) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.async.html b/frappe/docs/current/api/frappe.async.html new file mode 100644 index 0000000000..7ace83c887 --- /dev/null +++ b/frappe/docs/current/api/frappe.async.html @@ -0,0 +1,394 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class FileAndRedisStream

+ +

Inherits from __builtin__.file + +

+
+
+ + + + +

+ + + __init__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + write + (self, data) +

+

No docs

+
+
+ + +
+
+ + + + + + +

Public API +
/api/method/frappe.async.can_subscribe_doc +

+

+ + + frappe.async.can_subscribe_doc + (doctype, docname, sid) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.async.emit_via_redis + (event, message, room) +

+

Publish real-time updates via redis

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.async.get_doc_room + (doctype, docname) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.async.get_pending_tasks_for_doc +

+

+ + + frappe.async.get_pending_tasks_for_doc + (doctype, docname) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.async.get_redis_server + () +

+

Returns memcache connection.

+
+
+ + + + + + + +

+ + + frappe.async.get_site_room + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.async.get_std_streams + (task_id) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.async.get_task_log_file_path + (task_id, stream_type) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.async.get_task_progress_room + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.async.get_task_status +

+

+ + + frappe.async.get_task_status + (task_id) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.async.get_user_info +

+

+ + + frappe.async.get_user_info + (sid) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.async.get_user_room + (user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.async.handler + (f) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.async.is_file_old + (file_path) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.async.ping +

+

+ + + frappe.async.ping + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.async.publish_realtime + (event=None, message=None, room=None, user=None, doctype=None, docname=None, now=False) +

+

Publish real-time updates

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.async.put_log + (line_no, line, task_id=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.async.remove_old_task_logs + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.async.set_task_status + (task_id, status, response=None) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.auth.html b/frappe/docs/current/api/frappe.auth.html new file mode 100644 index 0000000000..08dc301600 --- /dev/null +++ b/frappe/docs/current/api/frappe.auth.html @@ -0,0 +1,485 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class CookieManager

+ +

+
+
+ + + + +

+ + + __init__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + delete_cookie + (self, to_delete) +

+

No docs

+
+
+ + + + + +

+ + + flush_cookies + (self, response) +

+

No docs

+
+
+ + + + + +

+ + + init_cookies + (self) +

+

No docs

+
+
+ + + + + +

+ + + set_cookie + (self, key, value, expires=None) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class HTTPRequest

+ +

+
+
+ + + + +

+ + + __init__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + connect + (self, ac_name=None) +

+

connect to db, from acname or dbname

+
+
+ + + + + +

+ + + get_db_name + (self) +

+

get database name from conf

+
+
+ + + + + +

+ + + set_lang + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_csrf_token + (self) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class LoginManager

+ +

+
+
+ + + + +

+ + + __init__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + authenticate + (self, user=None, pwd=None) +

+

No docs

+
+
+ + + + + +

+ + + check_if_enabled + (self, user) +

+

raise exception if user not enabled

+
+
+ + + + + +

+ + + check_password + (self, user, pwd) +

+

check password

+
+
+ + + + + +

+ + + clear_active_sessions + (self) +

+

No docs

+
+
+ + + + + +

+ + + clear_cookies + (self) +

+

No docs

+
+
+ + + + + +

+ + + fail + (self, message) +

+

No docs

+
+
+ + + + + +

+ + + login + (self) +

+

No docs

+
+
+ + + + + +

+ + + login_as + (self, user) +

+

No docs

+
+
+ + + + + +

+ + + login_as_guest + (self) +

+

login as guest

+
+
+ + + + + +

+ + + logout + (self, arg=, user=None) +

+

No docs

+
+
+ + + + + +

+ + + make_session + (self, resume=False) +

+

No docs

+
+
+ + + + + +

+ + + post_login + (self) +

+

No docs

+
+
+ + + + + +

+ + + run_trigger + (self, event=on_login) +

+

No docs

+
+
+ + + + + +

+ + + set_user_info + (self, resume=False) +

+

No docs

+
+
+ + + + + +

+ + + validate_hour + (self) +

+

check if user is logging in during restricted hours

+
+
+ + + + + +

+ + + validate_ip_address + (self) +

+

check if IP Address is valid

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.auth._update_password + (user, password) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.auth.clear_cookies + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.auth.get_logged_user +

+

+ + + frappe.auth.get_logged_user + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.boot.html b/frappe/docs/current/api/frappe.boot.html new file mode 100644 index 0000000000..7a39559608 --- /dev/null +++ b/frappe/docs/current/api/frappe.boot.html @@ -0,0 +1,178 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.boot.add_home_page + (bootinfo, docs) +

+

load home page

+
+
+ + + + + + + +

+ + + frappe.boot.add_timezone_info + (bootinfo) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.boot.get_allowed_pages + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.boot.get_bootinfo + () +

+

build and return boot info

+
+
+ + + + + + + +

+ + + frappe.boot.get_fullnames + () +

+

map of user fullnames

+
+
+ + + + + + + +

+ + + frappe.boot.get_user + (bootinfo) +

+

get user info

+
+
+ + + + + + + +

+ + + frappe.boot.load_conf_settings + (bootinfo) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.boot.load_print + (bootinfo, doclist) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.boot.load_print_css + (bootinfo, print_settings) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.boot.load_translations + (bootinfo) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.build.html b/frappe/docs/current/api/frappe.build.html new file mode 100644 index 0000000000..b705d0a4da --- /dev/null +++ b/frappe/docs/current/api/frappe.build.html @@ -0,0 +1,178 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.build.build + (no_compress=False, verbose=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.build.bundle + (no_compress, make_copy=False, verbose=False) +

+

concat / minify js files

+
+
+ + + + + + + +

+ + + frappe.build.compile_less + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.build.files_dirty + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.build.get_build_maps + () +

+

get all build.jsons with absolute paths

+
+
+ + + + + + + +

+ + + frappe.build.html_to_js_template + (path, content) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.build.make_asset_dirs + (make_copy=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.build.pack + (target, sources, no_compress, verbose) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.build.setup + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.build.watch + (no_compress) +

+

watch and rebuild if necessary

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.celery_app.html b/frappe/docs/current/api/frappe.celery_app.html new file mode 100644 index 0000000000..b22199e3ff --- /dev/null +++ b/frappe/docs/current/api/frappe.celery_app.html @@ -0,0 +1,261 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class AsyncTaskRouter

+ +

Inherits from __builtin__.object + +

+
+
+ + + + +

+ + + route_for_task + (self, task, args=None, kwargs=None) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class MonitorThread

+ +

Inherits from __builtin__.object + +

Thread manager for monitoring celery events

+
+
+ + + + +

+ + + __init__ + (self, celery_app, interval=1) +

+

No docs

+
+
+ + + + + +

+ + + catchall + (self, event) +

+

No docs

+
+
+ + + + + +

+ + + run + (self) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class SiteRouter

+ +

Inherits from __builtin__.object + +

+
+
+ + + + +

+ + + route_for_task + (self, task, args=None, kwargs=None) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.celery_app.celery_task + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.celery_app.get_beat_schedule + (conf) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.celery_app.get_celery + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.celery_app.get_celery_app + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.celery_app.get_queue + (site, prefix=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.celery_app.get_site_config + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.celery_app.make_async_task + (args) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.celery_app.run_test + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.client.html b/frappe/docs/current/api/frappe.client.html new file mode 100644 index 0000000000..08b5e1b560 --- /dev/null +++ b/frappe/docs/current/api/frappe.client.html @@ -0,0 +1,288 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + +

Public API +
/api/method/frappe.client.bulk_update +

+

+ + + frappe.client.bulk_update + (docs) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.cancel +

+

+ + + frappe.client.cancel + (doctype, name) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.delete +

+

+ + + frappe.client.delete + (doctype, name) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.get +

+

+ + + frappe.client.get + (doctype, name=None, filters=None) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.get_js +

+

+ + + frappe.client.get_js + (src) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.get_list +

+

+ + + frappe.client.get_list + (doctype, fields=None, filters=None, order_by=None, limit_start=None, limit_page_length=20) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.get_value +

+

+ + + frappe.client.get_value + (doctype, fieldname, filters=None, as_dict=True, debug=False) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.has_permission +

+

+ + + frappe.client.has_permission + (doctype, docname, perm_type=read) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.insert +

+

+ + + frappe.client.insert + (doc=None) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.make_width_property_setter +

+

+ + + frappe.client.make_width_property_setter + (doc) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.rename_doc +

+

+ + + frappe.client.rename_doc + (doctype, old_name, new_name, merge=False) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.save +

+

+ + + frappe.client.save + (doc) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.set_default +

+

+ + + frappe.client.set_default + (key, value, parent=None) +

+

set a user default value

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.set_value +

+

+ + + frappe.client.set_value + (doctype, name, fieldname, value) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.client.submit +

+

+ + + frappe.client.submit + (doc) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.commands.html b/frappe/docs/current/api/frappe.commands.html new file mode 100644 index 0000000000..1b903e184e --- /dev/null +++ b/frappe/docs/current/api/frappe.commands.html @@ -0,0 +1,146 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.commands._is_scheduler_enabled + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.commands._new_site + (db_name, site, mariadb_root_username=None, mariadb_root_password=None, admin_password=None, verbose=False, install_apps=None, source_sql=None, force=False, reinstall=False) +

+

Install a new Frappe site

+
+
+ + + + + + + +

+ + + frappe.commands.call_command + (cmd, context) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.commands.get_single_site + (context) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.commands.move + (dest_dir, site) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.commands.pass_context + (f) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.commands.prepare_for_update + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.commands.use + (site, sites_path=.) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.database.html b/frappe/docs/current/api/frappe.database.html new file mode 100644 index 0000000000..a5baa5ec00 --- /dev/null +++ b/frappe/docs/current/api/frappe.database.html @@ -0,0 +1,952 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class Database

+ +

Open a database connection with the given parmeters, if use_default is True, use the +login details from conf.py. This is called by the request handler and is accessible using +the db global variable. the sql method is also global to run queries

+
+
+ + + + +

+ + + __init__ + (self, host=None, user=None, password=None, ac_name=None, use_default=0) +

+

No docs

+
+
+ + + + + +

+ + + _get_value_for_many_names + (self, doctype, names, field, debug=False) +

+

No docs

+
+
+ + + + + +

+ + + _get_values_from_table + (self, fields, filters, doctype, as_dict, debug, order_by=None, update=None) +

+

No docs

+
+
+ + + + + +

+ + + a_row_exists + (self, doctype) +

+

Returns True if atleast one row exists.

+
+
+ + + + + +

+ + + add_default + (self, key, val, parent=__default, parenttype=None) +

+

Append a default value for a key, there can be multiple default values for a particular key.

+
+
+ + + + + +

+ + + add_index + (self, doctype, fields, index_name=None) +

+

Creates an index with given fields if not already created. +Index name will be fieldname1_fieldname2_index

+
+
+ + + + + +

+ + + add_unique + (self, doctype, fields, constraint_name=None) +

+

No docs

+
+
+ + + + + +

+ + + begin + (self) +

+

No docs

+
+
+ + + + + +

+ + + build_conditions + (self, filters) +

+

Convert filters sent as dict, lists to SQL conditions. filter's key +is passed by map function, build conditions like:

+ + +
+
+ + + + + +

+ + + check_transaction_status + (self, query) +

+

Raises exception if more than 20,000 INSERT, UPDATE queries are +executed in one transaction. This is to ensure that writes are always flushed otherwise this +could cause the system to hang.

+
+
+ + + + + +

+ + + close + (self) +

+

Close database connection.

+
+
+ + + + + +

+ + + commit + (self) +

+

Commit current transaction. Calls SQL COMMIT.

+
+
+ + + + + +

+ + + connect + (self) +

+

Connects to a database as set in site_config.json.

+
+
+ + + + + +

+ + + convert_to_lists + (self, res, formatted=0, as_utf8=0) +

+

Convert tuple output to lists (internal).

+
+
+ + + + + +

+ + + convert_to_simple_type + (self, v, formatted=0) +

+

Format date, time, longint values.

+
+
+ + + + + +

+ + + convert_to_utf8 + (self, res, formatted=0) +

+

Encode result as UTF-8.

+
+
+ + + + + +

+ + + count + (self, dt, filters=None, debug=False) +

+

Returns COUNT(*) for given DocType and filters.

+
+
+ + + + + +

+ + + escape + (self, s) +

+

Excape quotes and percent in given string.

+
+
+ + + + + +

+ + + exists + (self, dt, dn=None) +

+

Returns true if document exists.

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + explain_query + (self, query, values=None) +

+

Print EXPLAIN in error log.

+
+
+ + + + + +

+ + + fetch_as_dict + (self, formatted=0, as_utf8=0) +

+

Internal. Converts results to dict.

+
+
+ + + + + +

+ + + field_exists + (self, dt, fn) +

+

Return true of field exists.

+
+
+ + + + + +

+ + + get + (self, doctype, filters=None, as_dict=True, cache=False) +

+

Returns get_value with fieldname='*'

+
+
+ + + + + +

+ + + get_all + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_creation_count + (self, doctype, minutes) +

+

Get count of records created in the last x minutes

+
+
+ + + + + +

+ + + get_db_login + (self, ac_name) +

+

No docs

+
+
+ + + + + +

+ + + get_default + (self, key, parent=__default) +

+

Returns default value as a list if multiple or single

+
+
+ + + + + +

+ + + get_defaults + (self, key=None, parent=__default) +

+

Get all defaults

+
+
+ + + + + +

+ + + get_defaults_as_list + (self, key, parent=__default) +

+

Returns default values as a list.

+
+
+ + + + + +

+ + + get_description + (self) +

+

Returns result metadata.

+
+
+ + + + + +

+ + + get_global + (self, key, user=__global) +

+

Returns a global key value.

+
+
+ + + + + +

+ + + get_list + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_single_value + (self, doctype, fieldname, cache=False) +

+

Get property of Single DocType. Cache locally by default

+
+
+ + + + + +

+ + + get_singles_dict + (self, doctype) +

+

Get Single DocType as dict.

+
+
+ + + + + +

+ + + get_singles_value + (self) +

+

Alias for getsinglevalue

+
+
+ + + + + +

+ + + get_table_columns + (self, doctype) +

+

Returns list of column names from given doctype.

+
+
+ + + + + +

+ + + get_tables + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_temp + (self, key) +

+

Return the temperory value and delete it.

+
+
+ + + + + +

+ + + get_value + (self, doctype, filters=None, fieldname=name, ignore=None, as_dict=False, debug=False, cache=False) +

+

Returns a document property or list of properties.

+ +

Parameters:

+ + + +

Example:

+ +
# return first customer starting with a
+frappe.db.get_value("Customer", {"name": ("like a%")})
+
+# return last login of **User** `test@example.com`
+frappe.db.get_value("User", "test@example.com", "last_login")
+
+last_login, last_ip = frappe.db.get_value("User", "test@example.com",
+    ["last_login", "last_ip"])
+
+# returns default date_format
+frappe.db.get_value("System Settings", None, "date_format")
+
+
+
+ + + + + +

+ + + get_values + (self, doctype, filters=None, fieldname=name, ignore=None, as_dict=False, debug=False, order_by=None, update=None, cache=False) +

+

Returns multiple document properties.

+ +

Parameters:

+ + + +

Example:

+ +
# return first customer starting with a
+customers = frappe.db.get_values("Customer", {"name": ("like a%")})
+
+# return last login of **User** `test@example.com`
+user = frappe.db.get_values("User", "test@example.com", "*")[0]
+
+
+
+ + + + + +

+ + + get_values_from_single + (self, fields, filters, doctype, as_dict=False, debug=False, update=None) +

+

Get values from tabSingles (Single DocTypes) (internal).

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + has_column + (self, doctype, column) +

+

Returns True if column exists in database.

+
+
+ + + + + +

+ + + needs_formatting + (self, result, formatted) +

+

Returns true if the first row in the result has a Date, Datetime, Long Int.

+
+
+ + + + + +

+ + + rollback + (self) +

+

ROLLBACK current transaction.

+
+
+ + + + + +

+ + + set + (self, doc, field, val) +

+

Set value in document. Avoid

+
+
+ + + + + +

+ + + set_default + (self, key, val, parent=__default, parenttype=None) +

+

Sets a global / user default value.

+
+
+ + + + + +

+ + + set_global + (self, key, val, user=__global) +

+

Save a global key value. Global values will be automatically set if they match fieldname.

+
+
+ + + + + +

+ + + set_temp + (self, value) +

+

Set a temperory value and return a key.

+
+
+ + + + + +

+ + + set_value + (self, dt, dn, field, val, modified=None, modified_by=None, update_modified=True, debug=False) +

+

Set a single value in the database, do not call the ORM triggers +but update the modified timestamp (unless specified not to).

+ +

Warning: this function will not call Document events and should be avoided in normal cases.

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + sql + (self, query, values=(), as_dict=0, as_list=0, formatted=0, debug=0, ignore_ddl=0, as_utf8=0, auto_commit=0, update=None) +

+

Execute a SQL query and fetch all rows.

+ +

Parameters:

+ + + +

Examples:

+ +
# return customer names as dicts
+frappe.db.sql("select name from tabCustomer", as_dict=True)
+
+# return names beginning with a
+frappe.db.sql("select name from tabCustomer where name like %s", "a%")
+
+# values as dict
+frappe.db.sql("select name from tabCustomer where name like %(name)s and owner=%(owner)s",
+    {"name": "a%", "owner":"test@example.com"})
+
+
+
+ + + + + +

+ + + sql_ddl + (self, query, values=(), debug=False) +

+

Commit and execute a query. DDL (Data Definition Language) queries that alter schema +autocommit in MariaDB.

+
+
+ + + + + +

+ + + sql_list + (self, query, values=(), debug=False) +

+

Return data as list of single elements (first column).

+ +

Example:

+ +
# doctypes = ["DocType", "DocField", "User", ...]
+doctypes = frappe.db.sql_list("select name from DocType")
+
+
+
+ + + + + +

+ + + table_exists + (self, tablename) +

+

Returns True if table exists.

+
+
+ + + + + +

+ + + touch + (self, doctype, docname) +

+

Update the modified timestamp of this document.

+
+
+ + + + + +

+ + + update + (self) +

+

Update multiple values. Alias for set_value.

+
+
+ + + + + +

+ + + use + (self, db_name) +

+

USE db_name.

+
+
+ + + + + +

+ + + validate_query + (self, q) +

+

Throw exception for dangerous queries: ALTER, DROP, TRUNCATE if not Administrator.

+
+
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.defaults.html b/frappe/docs/current/api/frappe.defaults.html new file mode 100644 index 0000000000..fa4af9509d --- /dev/null +++ b/frappe/docs/current/api/frappe.defaults.html @@ -0,0 +1,310 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.defaults._clear_cache + (parent) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.add_default + (key, value, parent, parenttype=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.add_global_default + (key, value) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.add_user_default + (key, value, user=None, parenttype=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.build_user_permissions + (user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.clear_cache + (user=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.clear_default + (key=None, value=None, parent=None, name=None, parenttype=None) +

+

Clear a default value by any of the given parameters and delete caches.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.defaults.clear_user_default + (key, user=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.get_defaults + (user=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.get_defaults_for + (parent=__default) +

+

get all defaults

+
+
+ + + + + + + +

+ + + frappe.defaults.get_global_default + (key) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.get_user_default + (key, user=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.get_user_default_as_list + (key, user=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.get_user_permissions + (user=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.set_default + (key, value, parent, parenttype=__default) +

+

Override or add a default value. +Adds default value in table tabDefaultValue.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.defaults.set_global_default + (key, value) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.defaults.set_user_default + (key, value, user=None, parenttype=None) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.exceptions.html b/frappe/docs/current/api/frappe.exceptions.html new file mode 100644 index 0000000000..6eec33ef5e --- /dev/null +++ b/frappe/docs/current/api/frappe.exceptions.html @@ -0,0 +1,468 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class AuthenticationError

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class CSRFTokenError

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class CancelledLinkError

+ +

Inherits from frappe.exceptions.LinkValidationError + +

+
+
+ +
+
+ + + + + +

Class CannotChangeConstantError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class CharacterLengthExceededError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class DataError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class DocstatusTransitionError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class DoesNotExistError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class DuplicateEntryError

+ +

Inherits from frappe.exceptions.NameError + +

+
+
+ +
+
+ + + + + +

Class EmptyTableError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class InvalidEmailAddressError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class InvalidSignatureError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class InvalidStatusError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class LinkExistsError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class LinkValidationError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class MandatoryError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class MappingMismatchError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class NameError

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class OutgoingEmailError

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class PermissionError

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class RateLimitExceededError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class Redirect

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class SessionStopped

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class TemplateNotFoundError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class TimestampMismatchError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class UniqueValidationError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class UnknownDomainError

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class UnsupportedMediaType

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class UpdateAfterSubmitError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class ValidationError

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.frappeclient.html b/frappe/docs/current/api/frappe.frappeclient.html new file mode 100644 index 0000000000..c0147b41ec --- /dev/null +++ b/frappe/docs/current/api/frappe.frappeclient.html @@ -0,0 +1,399 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class AuthError

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class FrappeClient

+ +

Inherits from __builtin__.object + +

+
+
+ + + + +

+ + + __enter__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + __exit__ + (self) +

+

No docs

+
+
+ + + + + +

+ + + __init__ + (self, url, username, password, verify=True) +

+

No docs

+
+
+ + + + + +

+ + + bulk_update + (self, docs) +

+

No docs

+
+
+ + + + + +

+ + + cancel + (self, doctype, name) +

+

No docs

+
+
+ + + + + +

+ + + delete + (self, doctype, name) +

+

No docs

+
+
+ + + + + +

+ + + get_api + (self, method, params={}) +

+

No docs

+
+
+ + + + + +

+ + + get_doc + (self, doctype, name=, filters=None, fields=None) +

+

No docs

+
+
+ + + + + +

+ + + get_list + (self, doctype, fields="*", filters=None, limit_start=0, limit_page_length=0) +

+

Returns list of records of a particular type

+
+
+ + + + + +

+ + + get_request + (self, params) +

+

No docs

+
+
+ + + + + +

+ + + get_value + (self, doctype, fieldname=None, filters=None) +

+

No docs

+
+
+ + + + + +

+ + + insert + (self, doc) +

+

No docs

+
+
+ + + + + +

+ + + login + (self, username, password) +

+

No docs

+
+
+ + + + + +

+ + + logout + (self) +

+

No docs

+
+
+ + + + + +

+ + + migrate_doctype + (self, doctype, filters=None, update=None, verbose=1, exclude=None, preprocess=None) +

+

Migrate records from another doctype

+
+
+ + + + + +

+ + + migrate_single + (self, doctype) +

+

No docs

+
+
+ + + + + +

+ + + post_api + (self, method, params={}) +

+

No docs

+
+
+ + + + + +

+ + + post_process + (self, response) +

+

No docs

+
+
+ + + + + +

+ + + post_request + (self, data) +

+

No docs

+
+
+ + + + + +

+ + + preprocess + (self, params) +

+

convert dicts, lists to json

+
+
+ + + + + +

+ + + rename_doc + (self, doctype, old_name, new_name) +

+

No docs

+
+
+ + + + + +

+ + + set_value + (self, doctype, docname, fieldname, value) +

+

No docs

+
+
+ + + + + +

+ + + submit + (self, doclist) +

+

No docs

+
+
+ + + + + +

+ + + update + (self, doc) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class FrappeException

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.handler.html b/frappe/docs/current/api/frappe.handler.html new file mode 100644 index 0000000000..51d129ecbe --- /dev/null +++ b/frappe/docs/current/api/frappe.handler.html @@ -0,0 +1,228 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + +

Public API +
/api/method/frappe.handler.async_ping +

+

+ + + frappe.handler.async_ping + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.handler.execute_cmd + (cmd, from_async=False) +

+

execute a request as python module

+
+
+ + + + + + +

Public API +
/api/method/frappe.handler.get_async_task_status +

+

+ + + frappe.handler.get_async_task_status + (task_id) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.handler.get_attr + (cmd) +

+

get method object from cmd

+
+
+ + + + + + + +

+ + + frappe.handler.handle + () +

+

handle request

+
+
+ + + + + + +

Public API +
/api/method/frappe.handler.logout +

+

+ + + frappe.handler.logout + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.handler.ping +

+

+ + + frappe.handler.ping + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.handler.run_custom_method +

+

+ + + frappe.handler.run_custom_method + (doctype, name, custom_method) +

+

cmd=runcustommethod&doctype={doctype}&name={name}&custommethod={custommethod}

+
+
+ + + + + + +

Public API +
/api/method/frappe.handler.runserverobj +

+

+ + + frappe.handler.runserverobj + (method, docs=None, dt=None, dn=None, arg=None, args=None) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.handler.uploadfile +

+

+ + + frappe.handler.uploadfile + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.handler.version +

+

+ + + frappe.handler.version + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.handler.web_logout +

+

+ + + frappe.handler.web_logout + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.hooks.html b/frappe/docs/current/api/frappe.hooks.html new file mode 100644 index 0000000000..8c7e349e0c --- /dev/null +++ b/frappe/docs/current/api/frappe.hooks.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.installer.html b/frappe/docs/current/api/frappe.installer.html new file mode 100644 index 0000000000..7bffabf8d5 --- /dev/null +++ b/frappe/docs/current/api/frappe.installer.html @@ -0,0 +1,370 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.installer.add_module_defs + (app) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.add_to_installed_apps + (app_name, rebuild_website=True) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.check_if_ready_for_barracuda + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.create_auth_table + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.create_database_and_user + (force, verbose) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.get_conf_params + (db_name=None, db_password=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.get_current_host + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.get_site_config_path + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.import_db_from_sql + (source_sql, verbose) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.init_singles + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.install_app + (name, verbose=False, set_as_patched=True) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.install_db + (root_login=root, root_password=None, db_name=None, source_sql=None, admin_password=None, verbose=True, force=0, site_config=None, reinstall=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.make_conf + (db_name=None, db_password=None, site_config=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.make_connection + (root_login, root_password) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.make_site_config + (db_name=None, db_password=None, site_config=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.make_site_dirs + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.post_install + (rebuild_website=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.remove_app + (app_name, dry_run=False) +

+

Delete app and all linked to the app's module with the app.

+
+
+ + + + + + + +

+ + + frappe.installer.remove_from_installed_apps + (app_name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.remove_missing_apps + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.set_all_patches_as_completed + (app) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.installer.update_site_config + (key, value) +

+

Update a value in site_config

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.middlewares.html b/frappe/docs/current/api/frappe.middlewares.html new file mode 100644 index 0000000000..eb394d66ec --- /dev/null +++ b/frappe/docs/current/api/frappe.middlewares.html @@ -0,0 +1,61 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class StaticDataMiddleware

+ +

Inherits from werkzeug.wsgi.SharedDataMiddleware + +

+
+
+ + + + +

+ + + __call__ + (self, environ, start_response) +

+

No docs

+
+
+ + + + + +

+ + + get_directory_loader + (self, directory) +

+

No docs

+
+
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.permissions.html b/frappe/docs/current/api/frappe.permissions.html new file mode 100644 index 0000000000..c56053d30b --- /dev/null +++ b/frappe/docs/current/api/frappe.permissions.html @@ -0,0 +1,332 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.permissions.add_user_permission + (doctype, name, user, with_message=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.permissions.apply_user_permissions + (doctype, ptype, user=None) +

+

Check if applyuserpermissions is checked for a doctype, perm type, user combination

+
+
+ + + + + + + +

+ + + frappe.permissions.can_export + (doctype, raise_exception=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.permissions.can_import + (doctype, raise_exception=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.permissions.can_set_user_permissions + (doctype, docname=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.permissions.check_admin_or_system_manager + (user=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.permissions.clear_user_permissions_for_doctype + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.permissions.get_doc_permissions + (doc, verbose=False, user=None) +

+

Returns a dict of evaluated permissions for given doc like {"read":1, "write":1}

+
+
+ + + + + + + +

+ + + frappe.permissions.get_linked_doctypes + (dt) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.permissions.get_role_permissions + (meta, user=None, verbose=False) +

+

Returns dict of evaluated role permissions like {"read": True, "write":False}

+ +

If user permissions are applicable, it adds a dict of user permissions like

+ +
{
+    // user permissions will apply on these rights
+    "apply_user_permissions": {"read": 1, "write": 1},
+
+    // doctypes that will be applicable for each right
+    "user_permission_doctypes": {
+        "read": [
+            // AND between "DocType 1" and "DocType 2"
+            ["DocType 1", "DocType 2"],
+
+            // OR
+
+            ["DocType 3"]
+
+        ]
+    }
+
+    "if_owner": {"read": 1, "write": 1}
+}
+
+
+
+ + + + + + + +

+ + + frappe.permissions.get_user_permission_doctypes + (user_permission_doctypes, user_permissions) +

+

returns a list of list like [["User", "Blog Post"], ["User"]]

+
+
+ + + + + + + +

+ + + frappe.permissions.has_controller_permissions + (doc, ptype, user=None) +

+

Returns controller permissions if defined. None if not defined

+
+
+ + + + + + + +

+ + + frappe.permissions.has_permission + (doctype, ptype=read, doc=None, verbose=False, user=None) +

+

Returns True if user has permission ptype for given doctype. +If doc is passed, it also checks user, share and owner permissions.

+ +

Note: if Table DocType is passed, it always returns True.

+
+
+ + + + + + + +

+ + + frappe.permissions.remove_user_permission + (doctype, name, user, default_value_name=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.permissions.reset_perms + (doctype) +

+

Reset permissions for given doctype.

+
+
+ + + + + + + +

+ + + frappe.permissions.set_user_permission_if_allowed + (doctype, name, user, with_message=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.permissions.update_share_permissions + (role_permissions, doc, user) +

+

Updates share permissions on role_permissions for given doc, if shared

+
+
+ + + + + + + +

+ + + frappe.permissions.user_has_permission + (doc, verbose=True, user=None, user_permission_doctypes=None) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.pythonrc.html b/frappe/docs/current/api/frappe.pythonrc.html new file mode 100644 index 0000000000..abe71bdbee --- /dev/null +++ b/frappe/docs/current/api/frappe.pythonrc.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.sessions.html b/frappe/docs/current/api/frappe.sessions.html new file mode 100644 index 0000000000..c78340750f --- /dev/null +++ b/frappe/docs/current/api/frappe.sessions.html @@ -0,0 +1,409 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class Session

+ +

+
+
+ + + + +

+ + + __init__ + (self, user, resume=False, full_name=None, user_type=None) +

+

No docs

+
+
+ + + + + +

+ + + delete_session + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_expiry_in_seconds + (self, expiry) +

+

No docs

+
+
+ + + + + +

+ + + get_session_data + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_session_data_from_cache + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_session_data_from_db + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_session_record + (self) +

+

get session record, or return the standard Guest Record

+
+
+ + + + + +

+ + + insert_session_record + (self) +

+

No docs

+
+
+ + + + + +

+ + + resume + (self) +

+

non-login request: load a session

+
+
+ + + + + +

+ + + start + (self) +

+

start a new session

+
+
+ + + + + +

+ + + start_as_guest + (self) +

+

all guests share the same 'Guest' session

+
+
+ + + + + +

+ + + update + (self, force=False) +

+

extend session expiry

+
+
+ + +
+
+ + + + + + +

Public API +
/api/method/frappe.sessions.clear +

+

+ + + frappe.sessions.clear + (user=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.sessions.clear_all_sessions + () +

+

This effectively logs out all users

+
+
+ + + + + + + +

+ + + frappe.sessions.clear_cache + (user=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.sessions.clear_expired_sessions + () +

+

This function is meant to be called from scheduler

+
+
+ + + + + + + +

+ + + frappe.sessions.clear_global_cache + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.sessions.clear_sessions + (user=None, keep_current=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.sessions.delete_session + (sid=None, user=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.sessions.generate_csrf_token + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.sessions.get + () +

+

get session boot info

+
+
+ + + + + + + +

+ + + frappe.sessions.get_csrf_token + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.sessions.get_expiry_period + (device=desktop) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.sessions.get_geo_from_ip + (ip_addr) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.sessions.get_geo_ip_country + (ip_addr) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.setup_logging.html b/frappe/docs/current/api/frappe.setup_logging.html new file mode 100644 index 0000000000..463bf84e0a --- /dev/null +++ b/frappe/docs/current/api/frappe.setup_logging.html @@ -0,0 +1,63 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class ContextFilter

+ +

Inherits from logging.Filter + +

This is a filter which injects request information (if available) into the log.

+
+
+ + + + +

+ + + filter + (self, record) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.setup_logging.setup_logging + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.share.html b/frappe/docs/current/api/frappe.share.html new file mode 100644 index 0000000000..8c74e5eb6b --- /dev/null +++ b/frappe/docs/current/api/frappe.share.html @@ -0,0 +1,160 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + +

Public API +
/api/method/frappe.share.add +

+

+ + + frappe.share.add + (doctype, name, user=None, read=1, write=0, share=0, everyone=0, flags=None) +

+

Share the given document with a user.

+
+
+ + + + + + + +

+ + + frappe.share.check_share_permission + (doctype, name) +

+

Check if the user can share with other users

+
+
+ + + + + + + +

+ + + frappe.share.get_share_name + (doctype, name, user, everyone) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.share.get_shared + (doctype, user=None, rights=None) +

+

Get list of shared document names for given user and DocType.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.share.get_shared_doctypes + (user=None) +

+

Return list of doctypes in which documents are shared for the given user.

+
+
+ + + + + + +

Public API +
/api/method/frappe.share.get_users +

+

+ + + frappe.share.get_users + (doctype, name, fields=*) +

+

Get list of users with which this document is shared

+
+
+ + + + + + + +

+ + + frappe.share.remove + (doctype, name, user, flags=None) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.share.set_permission +

+

+ + + frappe.share.set_permission + (doctype, name, user, permission_to, value=1, everyone=0) +

+

Set share permission.

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.tasks.html b/frappe/docs/current/api/frappe.tasks.html new file mode 100644 index 0000000000..1ed1d3d46f --- /dev/null +++ b/frappe/docs/current/api/frappe.tasks.html @@ -0,0 +1,82 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.tasks.get_active_queues + (app, worker) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.tasks.get_required_queues + (app, prefix=) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.tasks.get_workers + (app) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.tasks.sync_worker + (app, worker, prefix=) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.test_runner.html b/frappe/docs/current/api/frappe.test_runner.html new file mode 100644 index 0000000000..b50522a536 --- /dev/null +++ b/frappe/docs/current/api/frappe.test_runner.html @@ -0,0 +1,226 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.test_runner._add_test + (path, filename, verbose, test_suite=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner._run_unittest + (module, verbose=False, tests=()) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner.get_dependencies + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner.get_modules + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner.main + (app=None, module=None, doctype=None, verbose=False, tests=(), force=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner.make_test_objects + (doctype, test_records, verbose=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner.make_test_records + (doctype, verbose=0, force=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner.make_test_records_for_doctype + (doctype, verbose=0, force=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner.print_mandatory_fields + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner.run_all_tests + (app=None, verbose=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner.run_tests_for_doctype + (doctype, verbose=False, tests=(), force=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner.run_tests_for_module + (module, verbose=False, tests=()) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.test_runner.set_test_email_config + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.translate.html b/frappe/docs/current/api/frappe.translate.html new file mode 100644 index 0000000000..9fde78f833 --- /dev/null +++ b/frappe/docs/current/api/frappe.translate.html @@ -0,0 +1,696 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.translate._get_messages_from_page_or_report + (doctype, name, module=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.translate.add_lang_dict + (code) +

+

Extracts messages and returns Javascript code snippet to be appened at the end +of the given script

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.translate.clear_cache + () +

+

Clear all translation assets from :meth:frappe.cache

+
+
+ + + + + + + +

+ + + frappe.translate.deduplicate_messages + (messages) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.translate.extract_messages_from_code + (code, is_py=False) +

+

Extracts translatable srings from a code file

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.translate.get_all_languages + () +

+

Returns all language codes ar, ch etc

+
+
+ + + + + + + +

+ + + frappe.translate.get_all_messages_from_js_files + (app_name=None) +

+

Extracts all translatable strings from app .js files

+
+
+ + + + + + + +

+ + + frappe.translate.get_bench_dir + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.translate.get_dict + (fortype, name=None) +

+

Returns translation dict for a type of object.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.translate.get_dict_from_hooks + (fortype, name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.translate.get_full_dict + (lang) +

+

Load and return the entire translations dictionary for a language from :meth:frape.cache

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.translate.get_lang_dict + () +

+

Returns all languages in dict format, full name is the key e.g. {"english":"en"}

+
+
+ + + + + + + +

+ + + frappe.translate.get_lang_info + () +

+

Returns a listified version of apps/languages.txt

+
+
+ + + + + + + +

+ + + frappe.translate.get_lang_js + (fortype, name) +

+

Returns code snippet to be appended at the end of a JS script.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.translate.get_language_from_code + (lang) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.translate.get_messages_for_app + (app) +

+

Returns all messages (list) for a specified app

+
+
+ + + + + + + +

+ + + frappe.translate.get_messages_from_doctype + (name) +

+

Extract all translatable messages for a doctype. Includes labels, Python code, +Javascript code, html templates

+
+
+ + + + + + + +

+ + + frappe.translate.get_messages_from_file + (path) +

+

Returns a list of transatable strings from a code file

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.translate.get_messages_from_include_files + (app_name=None) +

+

Returns messages from js files included at time of boot like desk.min.js for desk and web

+
+
+ + + + + + + +

+ + + frappe.translate.get_messages_from_page + (name) +

+

Returns all translatable strings from a :class:frappe.core.doctype.Page

+
+
+ + + + + + + +

+ + + frappe.translate.get_messages_from_report + (name) +

+

Returns all translatable strings from a :class:frappe.core.doctype.Report

+
+
+ + + + + + + +

+ + + frappe.translate.get_server_messages + (app) +

+

Extracts all translatable strings (tagged with :func:frappe._) from Python modules inside an app

+
+
+ + + + + + + +

+ + + frappe.translate.get_untranslated + (lang, untranslated_file, get_all=False) +

+

Returns all untranslated strings for a language and writes in a file

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.translate.get_user_lang + (user=None) +

+

Set frappe.local.lang from user preferences on session beginning or resumption

+
+
+ + + + + + + +

+ + + frappe.translate.guess_language + (lang_list=None) +

+

Set frappe.local.lang from HTTP headers at beginning of request

+
+
+ + + + + + + +

+ + + frappe.translate.is_translatable + (m) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.translate.load_lang + (lang, apps=None) +

+

Combine all translations from .csv files in all apps

+
+
+ + + + + + + +

+ + + frappe.translate.make_dict_from_messages + (messages, full_dict=None) +

+

Returns translated messages as a dict in Language specified in frappe.local.lang

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.translate.pos_to_line_no + (messages, code) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.translate.read_csv_file + (path) +

+

Read CSV file and return as list of list

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.translate.rebuild_all_translation_files + () +

+

Rebuild all translation files: [app]/translations/[lang].csv.

+
+
+ + + + + + + +

+ + + frappe.translate.rename_language + (old_name, new_name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.translate.send_translations + (translation_dict) +

+

Append translated dict in frappe.local.response

+
+
+ + + + + + + +

+ + + frappe.translate.set_default_language + (language) +

+

Set Global default language

+
+
+ + + + + + + +

+ + + frappe.translate.update_translations + (lang, untranslated_file, translated_file) +

+

Update translations from a source and target file for a given language.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.translate.write_csv_file + (path, app_messages, lang_dict) +

+

Write translation CSV file.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.translate.write_translations_file + (app, lang, full_dict=None, app_messages=None) +

+

Write a translation file for a given language.

+ +

Parameters:

+ + +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/geo/frappe.geo.country_info.html b/frappe/docs/current/api/geo/frappe.geo.country_info.html new file mode 100644 index 0000000000..e7a0886bbe --- /dev/null +++ b/frappe/docs/current/api/geo/frappe.geo.country_info.html @@ -0,0 +1,100 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.geo.country_info.get_all + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.geo.country_info.get_country_info + (country=None) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.geo.country_info.get_country_timezone_info +

+

+ + + frappe.geo.country_info.get_country_timezone_info + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.geo.country_info.get_translated_dict + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.geo.country_info.update + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/geo/frappe.geo.html b/frappe/docs/current/api/geo/frappe.geo.html new file mode 100644 index 0000000000..bc639663d9 --- /dev/null +++ b/frappe/docs/current/api/geo/frappe.geo.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/geo/index.html b/frappe/docs/current/api/geo/index.html new file mode 100644 index 0000000000..741541ded6 --- /dev/null +++ b/frappe/docs/current/api/geo/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/geo/index.txt b/frappe/docs/current/api/geo/index.txt new file mode 100644 index 0000000000..78635c807a --- /dev/null +++ b/frappe/docs/current/api/geo/index.txt @@ -0,0 +1,2 @@ +frappe.geo.country_info +frappe.geo \ No newline at end of file diff --git a/frappe/docs/current/api/index.html b/frappe/docs/current/api/index.html new file mode 100644 index 0000000000..f8e79ba2c9 --- /dev/null +++ b/frappe/docs/current/api/index.html @@ -0,0 +1,20 @@ + + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Contents

+ + + +{index} \ No newline at end of file diff --git a/frappe/docs/current/api/index.txt b/frappe/docs/current/api/index.txt new file mode 100644 index 0000000000..9384b73ebe --- /dev/null +++ b/frappe/docs/current/api/index.txt @@ -0,0 +1,27 @@ +frappe.__init__ +frappe.__version__ +frappe.api +frappe.app +frappe.async +frappe.auth +frappe.boot +frappe.build +frappe.celery_app +frappe.client +frappe.commands +frappe.database +frappe.defaults +frappe.exceptions +frappe.frappeclient +frappe.handler +frappe.hooks +frappe.installer +frappe.middlewares +frappe.permissions +frappe.pythonrc +frappe.sessions +frappe.setup_logging +frappe.share +frappe.tasks +frappe.test_runner +frappe.translate \ No newline at end of file diff --git a/frappe/docs/current/api/integrations/frappe.integrations.html b/frappe/docs/current/api/integrations/frappe.integrations.html new file mode 100644 index 0000000000..cc7622b716 --- /dev/null +++ b/frappe/docs/current/api/integrations/frappe.integrations.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/integrations/index.html b/frappe/docs/current/api/integrations/index.html new file mode 100644 index 0000000000..be2f41e737 --- /dev/null +++ b/frappe/docs/current/api/integrations/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/integrations/index.txt b/frappe/docs/current/api/integrations/index.txt new file mode 100644 index 0000000000..1dce3c404d --- /dev/null +++ b/frappe/docs/current/api/integrations/index.txt @@ -0,0 +1 @@ +frappe.integrations \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.base_document.html b/frappe/docs/current/api/model/frappe.model.base_document.html new file mode 100644 index 0000000000..0e386135f1 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.base_document.html @@ -0,0 +1,643 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class BaseDocument

+ +

Inherits from __builtin__.object + +

+
+
+ + + + +

+ + + __init__ + (self, d) +

+

No docs

+
+
+ + + + + +

+ + + _extract_images_from_text_editor + (self) +

+

No docs

+
+
+ + + + + +

+ + + _fix_numeric_types + (self) +

+

No docs

+
+
+ + + + + +

+ + + _get_missing_mandatory_fields + (self) +

+

Get mandatory fields that do not have any values

+
+
+ + + + + +

+ + + _init_child + (self, value, key) +

+

No docs

+
+
+ + + + + +

+ + + _validate_constants + (self) +

+

No docs

+
+
+ + + + + +

+ + + _validate_length + (self) +

+

No docs

+
+
+ + + + + +

+ + + _validate_selects + (self) +

+

No docs

+
+
+ + + + + +

+ + + _validate_update_after_submit + (self) +

+

No docs

+
+
+ + + + + +

+ + + append + (self, key, value=None) +

+

No docs

+
+
+ + + + + +

+ + + as_dict + (self, no_nulls=False, no_default_fields=False) +

+

No docs

+
+
+ + + + + +

+ + + as_json + (self) +

+

No docs

+
+
+ + + + + +

+ + + cast + (self, val, df) +

+

No docs

+
+
+ + + + + +

+ + + db_insert + (self) +

+

INSERT the document (with valid columns) in the database.

+
+
+ + + + + +

+ + + db_set + (self, fieldname, value, update_modified=True) +

+

No docs

+
+
+ + + + + +

+ + + db_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + delete_key + (self, key) +

+

No docs

+
+
+ + + + + +

+ + + extend + (self, key, value) +

+

No docs

+
+
+ + + + + +

+ + + get + (self, key=None, filters=None, limit=None, default=None) +

+

No docs

+
+
+ + + + + +

+ + + get_db_value + (self, key) +

+

No docs

+
+
+ + + + + +

+ + + get_formatted + (self, fieldname, doc=None, currency=None, absolute_value=False) +

+

No docs

+
+
+ + + + + +

+ + + get_invalid_links + (self, is_submittable=False) +

+

No docs

+
+
+ + + + + +

+ + + get_parentfield_of_doctype + (self, doctype) +

+

No docs

+
+
+ + + + + +

+ + + get_table_field_doctype + (self, fieldname) +

+

No docs

+
+
+ + + + + +

+ + + get_valid_columns + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_valid_dict + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_value + (self, fieldname) +

+

No docs

+
+
+ + + + + +

+ + + getone + (self, key, filters=None) +

+

No docs

+
+
+ + + + + +

+ + + in_format_data + (self, fieldname) +

+

Returns True if shown via Print Format::format_data property. +Called from within standard print format.

+
+
+ + + + + +

+ + + init_valid_columns + (self) +

+

No docs

+
+
+ + + + + +

+ + + is_new + (self) +

+

No docs

+
+
+ + + + + +

+ + + is_print_hide + (self, fieldname, df=None, for_print=True) +

+

Returns true if fieldname is to be hidden for print.

+ +

Print Hide can be set via the Print Format Builder or in the controller as a list +of hidden fields. Example

+ +
class MyDoc(Document):
+    def __setup__(self):
+        self.print_hide = ["field1", "field2"]
+
+ +

Parameters:

+ + +
+
+ + + + + +

+ + + precision + (self, fieldname, parentfield=None) +

+

Returns float precision for a particular field (or get global default).

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + remove + (self, doc) +

+

No docs

+
+
+ + + + + +

+ + + reset_values_if_no_permlevel_access + (self, has_access_to, high_permlevel_fields) +

+

If the user does not have permissions at permlevel > 0, then reset the values to original / default

+
+
+ + + + + +

+ + + set + (self, key, value, as_value=False) +

+

No docs

+
+
+ + + + + +

+ + + show_unique_validation_message + (self, e) +

+

No docs

+
+
+ + + + + +

+ + + update + (self, d) +

+

No docs

+
+
+ + + + + +

+ + + update_if_missing + (self, d) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.model.base_document._filter + (data, filters, limit=None) +

+

pass filters as: +{"key": "val", "key": ["!=", "val"], +"key": ["in", "val"], "key": ["not in", "val"], "key": "^val", +"key" : True (exists), "key": False (does not exist) }

+
+
+ + + + + + + +

+ + + frappe.model.base_document.get_controller + (doctype) +

+

Returns the class object of the given DocType. +For custom type, returns frappe.model.document.Document.

+ +

Parameters:

+ + +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.create_new.html b/frappe/docs/current/api/model/frappe.model.create_new.html new file mode 100644 index 0000000000..d81654e0c8 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.create_new.html @@ -0,0 +1,146 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.model.create_new.get_default_based_on_another_field + (df, user_permissions, parent_doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.create_new.get_new_doc + (doctype, parent_doc=None, parentfield=None, as_dict=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.create_new.get_static_default_value + (df, user_permissions) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.create_new.get_user_default_value + (df, defaults, user_permissions) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.create_new.make_new_doc + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.create_new.set_dynamic_default_values + (doc, parent_doc, parentfield) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.create_new.set_user_and_static_default_values + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.create_new.user_permissions_exist + (df, user_permissions) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.db_query.html b/frappe/docs/current/api/model/frappe.model.db_query.html new file mode 100644 index 0000000000..113a63a661 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.db_query.html @@ -0,0 +1,336 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class DatabaseQuery

+ +

Inherits from __builtin__.object + +

+
+
+ + + + +

+ + + __init__ + (self, doctype) +

+

No docs

+
+
+ + + + + +

+ + + add_limit + (self) +

+

No docs

+
+
+ + + + + +

+ + + add_user_permissions + (self, user_permissions, user_permission_doctypes=None) +

+

No docs

+
+
+ + + + + +

+ + + append_table + (self, table_name) +

+

No docs

+
+
+ + + + + +

+ + + build_and_run + (self) +

+

No docs

+
+
+ + + + + +

+ + + build_conditions + (self) +

+

No docs

+
+
+ + + + + +

+ + + build_filter_conditions + (self, filters, conditions) +

+

build conditions from user filters

+
+
+ + + + + +

+ + + build_match_conditions + (self, as_condition=True) +

+

add match conditions if applicable

+
+
+ + + + + +

+ + + check_sort_by_table + (self, order_by) +

+

No docs

+
+
+ + + + + +

+ + + execute + (self, query=None, fields=None, filters=None, or_filters=None, docstatus=None, group_by=None, order_by=None, limit_start=False, limit_page_length=None, as_list=False, with_childnames=False, debug=False, ignore_permissions=False, user=None) +

+

No docs

+
+
+ + + + + +

+ + + extract_tables + (self) +

+

extract tables from fields

+
+
+ + + + + +

+ + + get_filter + (self, f) +

+

Returns a _dict like

+ +

{ + "doctype": "DocType", + "fieldname": "fieldname", + "operator": "=", + "value": "value" +}

+
+
+ + + + + +

+ + + get_permission_query_conditions + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_share_condition + (self) +

+

No docs

+
+
+ + + + + +

+ + + make_filter_tuple + (self, key, value) +

+

No docs

+
+
+ + + + + +

+ + + parse_args + (self) +

+

Convert fields and filters from strings to list, dicts

+
+
+ + + + + +

+ + + prepare_args + (self) +

+

No docs

+
+
+ + + + + +

+ + + prepare_filter_condition + (self, f) +

+

Returns a filter condition in the format:

+ +

ifnull(tabDocType.fieldname, fallback) operator "value"

+
+
+ + + + + +

+ + + remove_user_tags + (self) +

+

Removes optional columns like _user_tags, _comments etc. if not in table

+
+
+ + + + + +

+ + + run_custom_query + (self, query) +

+

No docs

+
+
+ + + + + +

+ + + set_order_by + (self, args) +

+

No docs

+
+
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.db_schema.html b/frappe/docs/current/api/model/frappe.model.db_schema.html new file mode 100644 index 0000000000..3d9f971228 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.db_schema.html @@ -0,0 +1,597 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class DbColumn

+ +

+
+
+ + + + +

+ + + __init__ + (self, table, fieldname, fieldtype, length, default, set_index, options, unique, precision) +

+

No docs

+
+
+ + + + + +

+ + + build_for_alter_table + (self, current_def) +

+

No docs

+
+
+ + + + + +

+ + + default_changed + (self, current_def) +

+

No docs

+
+
+ + + + + +

+ + + default_changed_for_decimal + (self, current_def) +

+

No docs

+
+
+ + + + + +

+ + + get_definition + (self, with_default=1) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class DbManager

+ +

Basically, a wrapper for oft-used mysql commands. like show tables,databases, variables etc...

+ +

TODO:

+ +
0.  Simplify / create settings for the restore database source folder
+0a. Merge restore database and extract_sql(from frappe_server_tools).
+1. Setter and getter for different mysql variables.
+2. Setter and getter for mysql variables at global level??
+
+
+
+ + + + +

+ + + __init__ + (self, db) +

+

Pass root_conn here for access to all databases.

+
+
+ + + + + +

+ + + create_database + (self, target) +

+

No docs

+
+
+ + + + + +

+ + + create_user + (self, user, password, host) +

+

No docs

+
+
+ + + + + +

+ + + delete_user + (self, target, host) +

+

No docs

+
+
+ + + + + +

+ + + drop_database + (self, target) +

+

No docs

+
+
+ + + + + +

+ + + drop_table + (self, table_name) +

+

drop table if exists

+
+
+ + + + + +

+ + + flush_privileges + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_database_list + (self) +

+

get list of databases

+
+
+ + + + + +

+ + + get_table_schema + (self, table) +

+

Just returns the output of Desc tables.

+
+
+ + + + + +

+ + + get_tables_list + (self, target=None) +

+

get list of tables

+
+
+ + + + + +

+ + + get_variables + (self, regex) +

+

Get variables that match the passed pattern regex

+
+
+ + + + + +

+ + + grant_all_privileges + (self, target, user, host) +

+

No docs

+
+
+ + + + + +

+ + + grant_select_privilges + (self, db, table, user, host) +

+

No docs

+
+
+ + + + + +

+ + + restore_database + (self, target, source, user, password) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class DbTable

+ +

+
+
+ + + + +

+ + + __init__ + (self, doctype, prefix=tab) +

+

No docs

+
+
+ + + + + +

+ + + alter + (self) +

+

No docs

+
+
+ + + + + +

+ + + create + (self) +

+

No docs

+
+
+ + + + + +

+ + + drop_foreign_keys + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_column_definitions + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_columns_from_db + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_columns_from_docfields + (self) +

+

get columns from docfields and custom fields

+
+
+ + + + + +

+ + + get_foreign_keys + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_index_definitions + (self) +

+

No docs

+
+
+ + + + + +

+ + + is_new + (self) +

+

No docs

+
+
+ + + + + +

+ + + sync + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

Check if change in varchar length isn't truncating the columns

+
+
+ + +
+
+ + + + + +

Class InvalidColumnName

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + + + +

+ + + frappe.model.db_schema.add_column + (doctype, column_name, fieldtype, precision=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.db_schema.get_definition + (fieldtype, precision=None, length=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.db_schema.remove_all_foreign_keys + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.db_schema.updatedb + (dt) +

+

Syncs a DocType to the table + * creates if required + * updates columns + * updates indices

+
+
+ + + + + + + +

+ + + frappe.model.db_schema.validate_column_name + (n) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.delete_doc.html b/frappe/docs/current/api/model/frappe.model.delete_doc.html new file mode 100644 index 0000000000..007d22f9fb --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.delete_doc.html @@ -0,0 +1,194 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.model.delete_doc.check_if_doc_is_dynamically_linked + (doc, method=Delete) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.delete_doc.check_if_doc_is_linked + (doc, method=Delete) +

+

Raises excption if the given doc(dt, dn) is linked in another record.

+
+
+ + + + + + + +

+ + + frappe.model.delete_doc.check_permission_and_not_submitted + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.delete_doc.delete_doc + (doctype=None, name=None, force=0, ignore_doctypes=None, for_reload=False, ignore_permissions=False, flags=None, ignore_on_trash=False) +

+

Deletes a doc(dt, dn) and validates if it is not submitted and not linked in a live record

+
+
+ + + + + + + +

+ + + frappe.model.delete_doc.delete_from_table + (doctype, name, ignore_doctypes, doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.delete_doc.delete_linked_comments + (doc) +

+

Delete comments from the document

+
+
+ + + + + + + +

+ + + frappe.model.delete_doc.delete_linked_communications + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.delete_doc.delete_linked_todos + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.delete_doc.delete_shared + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.delete_doc.insert_feed + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.delete_doc.update_naming_series + (doc) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.docfield.html b/frappe/docs/current/api/model/frappe.model.docfield.html new file mode 100644 index 0000000000..cf887230a9 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.docfield.html @@ -0,0 +1,98 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.model.docfield.get_change_column_query + (f, new) +

+

generate change fieldname query

+
+
+ + + + + + + +

+ + + frappe.model.docfield.rename + (doctype, fieldname, newname) +

+

rename docfield

+
+
+ + + + + + + +

+ + + frappe.model.docfield.update_parent_field + (f, new) +

+

update 'parentfield' in tables

+
+
+ + + + + + + +

+ + + frappe.model.docfield.update_single + (f, new) +

+

update in tabSingles

+
+
+ + + + + + + +

+ + + frappe.model.docfield.update_table + (f, new) +

+

update table

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.document.html b/frappe/docs/current/api/model/frappe.model.document.html new file mode 100644 index 0000000000..32a261cc10 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.document.html @@ -0,0 +1,788 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class Document

+ +

Inherits from frappe.model.base_document.BaseDocument + +

All controllers inherit from Document.

+
+
+ + + + +

+ + + __init__ + (self, arg1, arg2=None) +

+

Constructor.

+ +

Parameters:

+ + + +

If DocType name and document name are passed, the object will load +all values (including child documents) from the database.

+
+
+ + + + + +

+ + + _set_defaults + (self) +

+

No docs

+
+
+ + + + + +

+ + + _validate + (self) +

+

No docs

+
+
+ + + + + +

+ + + _validate_links + (self) +

+

No docs

+
+
+ + + + + +

+ + + _validate_mandatory + (self) +

+

No docs

+
+
+ + + + + +

+ + + add_comment + (self, comment_type, text=None, comment_by=None) +

+

Add a comment to this document.

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + cancel + (self) +

+

Cancel the document. Sets docstatus = 2, then saves.

+
+
+ + + + + +

+ + + check_docstatus_transition + (self, docstatus) +

+

Ensures valid docstatus transition. +Valid transitions are (number in brackets is docstatus):

+ + +
+
+ + + + + +

+ + + check_if_latest + (self) +

+

Checks if modified timestamp provided by document being updated is same as the +modified timestamp in the database. If there is a different, the document has been +updated in the database after the current copy was read. Will throw an error if +timestamps don't match.

+ +

Will also validate document transitions (Save > Submit > Cancel) calling +self.check_docstatus_transition.

+
+
+ + + + + +

+ + + check_no_back_links_exist + (self) +

+

Check if document links to any active document before Cancel.

+
+
+ + + + + +

+ + + check_permission + (self, permtype, permlabel=None) +

+

Raise frappe.PermissionError if not permitted

+
+
+ + + + + +

+ + + clear_cache + (self) +

+

No docs

+
+
+ + + + + +

+ + + clear_linked_with_cache + (self) +

+

No docs

+
+
+ + + + + +

+ + + delete + (self) +

+

Delete document.

+
+
+ + + + + +

+ + + get_all_children + (self, parenttype=None) +

+

Returns all children documents from Table type field in a list.

+
+
+ + + + + +

+ + + get_latest + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_permlevel_access + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_signature + (self) +

+

Returns signature (hash) for private URL.

+
+
+ + + + + +

+ + + get_starred_by + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_url + (self) +

+

Returns Desk URL for this document. /desk#Form/{doctype}/{name}

+
+
+ + + + + +

+ + + has_permission + (self, permtype=read, verbose=False) +

+

Call frappe.has_permission if self.flags.ignore_permissions +is not set.

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + has_website_permission + (self, permtype=read, verbose=False) +

+

Call frappe.has_website_permission if self.flags.ignore_permissions +is not set.

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + insert + (self, ignore_permissions=None) +

+

Insert the document in the database (as a new document). +This will check for user permissions and execute before_insert, +validate, on_update, after_insert methods if they are written.

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + is_whitelisted + (self, method) +

+

No docs

+
+
+ + + + + +

+ + + load_from_db + (self) +

+

Load document and children from database and create properties +from fields

+
+
+ + + + + +

+ + + notify_update + (self) +

+

Publish realtime that the current document is modified

+
+
+ + + + + +

+ + + raise_no_permission_to + (self, perm_type) +

+

Raise frappe.PermissionError.

+
+
+ + + + + +

+ + + reload + (self) +

+

Reload document from database

+
+
+ + + + + +

+ + + round_floats_in + (self, doc, fieldnames=None) +

+

Round floats for all Currency, Float, Percent fields for the given doc.

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + run_before_save_methods + (self) +

+

Run standard methods before INSERT or UPDATE. Standard Methods are:

+ + + +

Will also update title_field if set

+
+
+ + + + + +

+ + + run_method + (self, method) +

+

run standard triggers, plus those in hooks

+
+
+ + + + + +

+ + + run_post_save_methods + (self) +

+

Run standard methods after INSERT or UPDATE. Standard Methods are:

+ + +
+
+ + + + + +

+ + + save + (self, ignore_permissions=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.

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + set_docstatus_user_and_timestamp + (self) +

+

No docs

+
+
+ + + + + +

+ + + set_new_name + (self) +

+

Calls frappe.naming.se_new_name for parent and child docs.

+
+
+ + + + + +

+ + + set_onload + (self, key, value) +

+

No docs

+
+
+ + + + + +

+ + + set_parent_in_children + (self) +

+

Updates parent and parenttype property in all children.

+
+
+ + + + + +

+ + + set_title_field + (self) +

+

Set title field based on template

+
+
+ + + + + +

+ + + submit + (self) +

+

Submit the document. Sets docstatus = 1, then saves.

+
+
+ + + + + +

+ + + update_children + (self) +

+

No docs

+
+
+ + + + + +

+ + + update_single + (self, d) +

+

Updates values for Single type Document in tabSingles.

+
+
+ + + + + +

+ + + validate_higher_perm_levels + (self) +

+

If the user does not have permissions at permlevel > 0, then reset the values to original / default

+
+
+ + + + + +

+ + + validate_table_has_rows + (self, parentfield, raise_exception=None) +

+

Raise exception if Table field is empty.

+
+
+ + + + + +

+ + + validate_update_after_submit + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_value + (self, fieldname, condition, val2, doc=None, raise_exception=None) +

+

Check that value of fieldname should be 'condition' val2 +else throw Exception.

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.model.document.get_doc + (arg1, arg2=None) +

+

returns a frappe.model.Document object.

+ +

Parameters:

+ + + +

There are two ways to call get_doc

+ +
# will fetch the latest user object (with child table) from the database
+user = get_doc("User", "test@example.com")
+
+# create a new object
+user = get_doc({
+    "doctype":"User"
+    "email_id": "test@example.com",
+    "user_roles: [
+        {"role": "System Manager"}
+    ]
+})
+
+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.html b/frappe/docs/current/api/model/frappe.model.html new file mode 100644 index 0000000000..47559ffa1a --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.html @@ -0,0 +1,87 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.model.copytables + (srctype, src, srcfield, tartype, tar, tarfield, srcfields, tarfields=[]) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.db_exists + (dt, dn) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.delete_fields + (args_dict, delete=0) +

+

Delete a field. +* Deletes record from tabDocField +* If not single doctype: Drops column from table +* If single, deletes record from tabSingles

+ +

args_dict = { dt: [field names] }

+
+
+ + + + + + + +

+ + + frappe.model.rename + (doctype, old, new, debug=False) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.mapper.html b/frappe/docs/current/api/model/frappe.model.mapper.html new file mode 100644 index 0000000000..f29fa21d48 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.mapper.html @@ -0,0 +1,98 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.model.mapper.get_mapped_doc + (from_doctype, from_docname, table_maps, target_doc=None, postprocess=None, ignore_permissions=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.mapper.map_child_doc + (source_d, target_parent, table_map, source_parent=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.mapper.map_doc + (source_doc, target_doc, table_map, source_parent=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.mapper.map_fetch_fields + (target_doc, df, no_copy_fields) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.mapper.map_fields + (source_doc, target_doc, table_map, source_parent) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.meta.html b/frappe/docs/current/api/model/frappe.model.meta.html new file mode 100644 index 0000000000..2e02e3dd23 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.meta.html @@ -0,0 +1,489 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class Meta

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + __init__ + (self, doctype) +

+

No docs

+
+
+ + + + + +

+ + + add_custom_fields + (self) +

+

No docs

+
+
+ + + + + +

+ + + apply_property_setters + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_dynamic_link_fields + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_field + (self, fieldname) +

+

No docs

+
+
+ + + + + +

+ + + get_fields_to_check_permissions + (self, user_permission_doctypes) +

+

No docs

+
+
+ + + + + +

+ + + get_high_permlevel_fields + (self) +

+

Build list of fields with high perm level and all the higher perm levels defined.

+
+
+ + + + + +

+ + + get_label + (self, fieldname) +

+

No docs

+
+
+ + + + + +

+ + + get_link_fields + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_list_fields + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_options + (self, fieldname) +

+

No docs

+
+
+ + + + + +

+ + + get_search_fields + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_select_fields + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_table_field_doctype + (self, fieldname) +

+

No docs

+
+
+ + + + + +

+ + + get_table_fields + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_title_field + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_valid_columns + (self) +

+

No docs

+
+
+ + + + + +

+ + + load_from_db + (self) +

+

No docs

+
+
+ + + + + +

+ + + process + (self) +

+

No docs

+
+
+ + + + + +

+ + + sort_fields + (self) +

+

sort on basis of previous_field

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.model.meta.clear_cache + (doctype=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.meta.get_default_df + (fieldname) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.meta.get_field_currency + (df, doc=None) +

+

get currency based on DocField options and fieldvalue in doc

+
+
+ + + + + + + +

+ + + frappe.model.meta.get_field_precision + (df, doc=None, currency=None) +

+

get precision based on DocField options and fieldvalue in doc

+
+
+ + + + + + + +

+ + + frappe.model.meta.get_meta + (doctype, cached=True) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.meta.get_parent_dt + (dt) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.meta.get_table_columns + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.meta.is_single + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.meta.load_doctype_from_file + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.meta.set_fieldname + (field_id, fieldname) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.meta.trim_tables + () +

+

Use this to remove columns that don't exist in meta

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.naming.html b/frappe/docs/current/api/model/frappe.model.naming.html new file mode 100644 index 0000000000..6a6fd6ff86 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.naming.html @@ -0,0 +1,209 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.model.naming._set_amended_name + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.naming.append_number_if_name_exists + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.naming.de_duplicate + (doctype, name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.naming.get_default_naming_series + (doctype) +

+

get default value for naming_series property

+
+
+ + + + + + + +

+ + + frappe.model.naming.getseries + (key, digits, doctype=) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.naming.make_autoname + (key, doctype=) +

+

Creates an autoname from the given key:

+ +

Autoname rules:

+ +
  * The key is separated by '.'
+  * '####' represents a series. The string before this part becomes the prefix:
+     Example: ABC.#### creates a series ABC0001, ABC0002 etc
+  * 'MM' represents the current month
+  * 'YY' and 'YYYY' represent the current year
+
+ +

Example:

+ +
  * DE/./.YY./.MM./.##### will create a series like
+    DE/09/01/0001 where 09 is the year, 01 is the month and 0001 is the series
+
+
+
+ + + + + + + +

+ + + frappe.model.naming.revert_series_if_last + (key, name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.naming.set_name_by_naming_series + (doc) +

+

Sets name by the naming_series property

+
+
+ + + + + + + +

+ + + frappe.model.naming.set_new_name + (doc) +

+

Sets the `name`` property for the document based on various rules.

+ +
    +
  1. If amened doc, set suffix.
  2. +
  3. If autoname method is declared, then call it.
  4. +
  5. If autoname property is set in the DocType (meta), then build it using the autoname property.
  6. +
  7. If name is already defined, use that name
  8. +
  9. If no rule defined, use hash.
  10. +
+ +

Note:

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.model.naming.validate_name + (doctype, name, case=None, merge=False) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.rename_doc.html b/frappe/docs/current/api/model/frappe.model.rename_doc.html new file mode 100644 index 0000000000..61aa0fb5f4 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.rename_doc.html @@ -0,0 +1,285 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.model.rename_doc.bulk_rename + (doctype, rows=None, via_console=False) +

+

Bulk rename documents

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.model.rename_doc.get_link_fields + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.get_select_fields + (old, new) +

+

get select type fields where doctype's name is hardcoded as +new line separated list

+
+
+ + + + + + +

Public API +
/api/method/frappe.model.rename_doc.rename_doc +

+

+ + + frappe.model.rename_doc.rename_doc + (doctype, old, new, force=False, merge=False, ignore_permissions=False) +

+

Renames a doc(dt, old) to doc(dt, new) and +updates all linked fields of type "Link"

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.rename_doctype + (doctype, old, new, force=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.rename_dynamic_links + (doctype, old, new) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.rename_parent_and_child + (doctype, old, new, meta) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.rename_versions + (doctype, old, new) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.update_attachments + (doctype, old, new) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.update_child_docs + (old, new, meta) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.update_comments + (doctype, old, new, force=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.update_link_field_values + (link_fields, old, new, doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.update_options_for_fieldtype + (fieldtype, old, new) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.update_parenttype_values + (old, new) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.update_select_field_values + (old, new) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.rename_doc.validate_rename + (doctype, new, meta, merge, force, ignore_permissions) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.sync.html b/frappe/docs/current/api/model/frappe.model.sync.html new file mode 100644 index 0000000000..dcff138e61 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.sync.html @@ -0,0 +1,66 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.model.sync.get_doc_files + (files, start_path, force=0, sync_everything=False, verbose=False) +

+

walk and sync all doctypes and pages

+
+
+ + + + + + + +

+ + + frappe.model.sync.sync_all + (force=0, verbose=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.sync.sync_for + (app_name, force=0, sync_everything=False, verbose=False) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/frappe.model.workflow.html b/frappe/docs/current/api/model/frappe.model.workflow.html new file mode 100644 index 0000000000..cb56af0049 --- /dev/null +++ b/frappe/docs/current/api/model/frappe.model.workflow.html @@ -0,0 +1,66 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.model.workflow.get_default_state + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.workflow.get_state_fieldname + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.workflow.get_workflow_name + (doctype) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/index.html b/frappe/docs/current/api/model/index.html new file mode 100644 index 0000000000..760c32320b --- /dev/null +++ b/frappe/docs/current/api/model/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/index.txt b/frappe/docs/current/api/model/index.txt new file mode 100644 index 0000000000..7dc8257c25 --- /dev/null +++ b/frappe/docs/current/api/model/index.txt @@ -0,0 +1,14 @@ +frappe.model.base_document +frappe.model.create_new +frappe.model.db_query +frappe.model.db_schema +frappe.model.delete_doc +frappe.model.docfield +frappe.model.document +frappe.model +frappe.model.mapper +frappe.model.meta +frappe.model.naming +frappe.model.rename_doc +frappe.model.sync +frappe.model.workflow \ No newline at end of file diff --git a/frappe/docs/current/api/model/utils/frappe.model.utils.html b/frappe/docs/current/api/model/utils/frappe.model.utils.html new file mode 100644 index 0000000000..a751f058aa --- /dev/null +++ b/frappe/docs/current/api/model/utils/frappe.model.utils.html @@ -0,0 +1,34 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.model.utils.set_default + (doc, key) +

+

Set is_default property of given doc and unset all others filtered by given key.

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/utils/frappe.model.utils.rename_field.html b/frappe/docs/current/api/model/utils/frappe.model.utils.rename_field.html new file mode 100644 index 0000000000..e040771bcd --- /dev/null +++ b/frappe/docs/current/api/model/utils/frappe.model.utils.rename_field.html @@ -0,0 +1,66 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.model.utils.rename_field.rename_field + (doctype, old_fieldname, new_fieldname) +

+

This functions assumes that doctype is already synced

+
+
+ + + + + + + +

+ + + frappe.model.utils.rename_field.update_reports + (doctype, old_fieldname, new_fieldname) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.model.utils.rename_field.update_users_report_view_settings + (doctype, ref_fieldname, new_fieldname) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/utils/index.html b/frappe/docs/current/api/model/utils/index.html new file mode 100644 index 0000000000..97c4ae6632 --- /dev/null +++ b/frappe/docs/current/api/model/utils/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/model/utils/index.txt b/frappe/docs/current/api/model/utils/index.txt new file mode 100644 index 0000000000..3887301bf2 --- /dev/null +++ b/frappe/docs/current/api/model/utils/index.txt @@ -0,0 +1,2 @@ +frappe.model.utils +frappe.model.utils.rename_field \ No newline at end of file diff --git a/frappe/docs/current/api/modules/frappe.modules.export_file.html b/frappe/docs/current/api/modules/frappe.modules.export_file.html new file mode 100644 index 0000000000..d7dae0fc12 --- /dev/null +++ b/frappe/docs/current/api/modules/frappe.modules.export_file.html @@ -0,0 +1,114 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.modules.export_file.create_folder + (module, dt, dn, create_init) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.export_file.create_init_py + (module_path, dt, dn) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.export_file.export_doc + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.export_file.export_to_files + (record_list=None, record_module=None, verbose=0, create_init=None) +

+

Export recordlist to files. recordlist is a list of lists ([doctype],[docname] ) ,

+
+
+ + + + + + + +

+ + + frappe.modules.export_file.get_module_name + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.export_file.write_document_file + (doc, record_module=None, create_init=None) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/modules/frappe.modules.html b/frappe/docs/current/api/modules/frappe.modules.html new file mode 100644 index 0000000000..f870b49616 --- /dev/null +++ b/frappe/docs/current/api/modules/frappe.modules.html @@ -0,0 +1,210 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.modules.export_doc + (doctype, name, module=None) +

+

Write a doc to standard path.

+
+
+ + + + + + + +

+ + + frappe.modules.get_app_publisher + (module) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.get_doc_path + (module, doctype, name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.get_doctype_module + (doctype) +

+

Returns Module Def name of given doctype.

+
+
+ + + + + + + +

+ + + frappe.modules.get_module_app + (module) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.get_module_name + (doctype, module, prefix=, app=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.get_module_path + (module) +

+

Returns path of the given module

+
+
+ + + + + + + +

+ + + frappe.modules.load_doctype_module + (doctype, module=None, prefix=) +

+

Returns the module object for given doctype.

+
+
+ + + + + + + +

+ + + frappe.modules.make_boilerplate + (template, doc, opts=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.reload_doc + (module, dt=None, dn=None, force=True) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.scrub + (txt) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.scrub_dt_dn + (dt, dn) +

+

Returns in lowercase and code friendly names of doctype and name for certain types

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/modules/frappe.modules.import_file.html b/frappe/docs/current/api/modules/frappe.modules.import_file.html new file mode 100644 index 0000000000..3733d5bba9 --- /dev/null +++ b/frappe/docs/current/api/modules/frappe.modules.import_file.html @@ -0,0 +1,114 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.modules.import_file.get_file_path + (module, dt, dn) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.import_file.import_doc + (docdict, force=False, data_import=False, pre_process=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.import_file.import_file + (module, dt, dn, force=False, pre_process=None) +

+

Sync a file from txt if modifed, return false if not updated

+
+
+ + + + + + + +

+ + + frappe.modules.import_file.import_file_by_path + (path, force=False, data_import=False, pre_process=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.import_file.import_files + (module, dt=None, dn=None, force=False, pre_process=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.import_file.read_doc_from_file + (path) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/modules/frappe.modules.patch_handler.html b/frappe/docs/current/api/modules/frappe.modules.patch_handler.html new file mode 100644 index 0000000000..ef73be87ca --- /dev/null +++ b/frappe/docs/current/api/modules/frappe.modules.patch_handler.html @@ -0,0 +1,193 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class PatchError

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + + + +

+ + + frappe.modules.patch_handler.block_user + (block) +

+

stop/start execution till patch is run

+
+
+ + + + + + + +

+ + + frappe.modules.patch_handler.check_session_stopped + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.patch_handler.execute_patch + (patchmodule, method=None, methodargs=None) +

+

execute the patch

+
+
+ + + + + + + +

+ + + frappe.modules.patch_handler.executed + (patchmodule) +

+

return True if is executed

+
+
+ + + + + + + +

+ + + frappe.modules.patch_handler.get_all_patches + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.patch_handler.log + (msg) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.patch_handler.reload_doc + (args) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.patch_handler.run_all + () +

+

run all pending patches

+
+
+ + + + + + + +

+ + + frappe.modules.patch_handler.run_single + (patchmodule=None, method=None, methodargs=None, force=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.patch_handler.update_patch_log + (patchmodule) +

+

update patch_file in patch log

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/modules/frappe.modules.utils.html b/frappe/docs/current/api/modules/frappe.modules.utils.html new file mode 100644 index 0000000000..8f1cbac1fd --- /dev/null +++ b/frappe/docs/current/api/modules/frappe.modules.utils.html @@ -0,0 +1,117 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.modules.utils.commonify_doclist + (doclist, with_comments=1) +

+

Makes a doclist more readable by extracting common properties. +This is used for printing Documents in files

+
+
+ + + + + + + +

+ + + frappe.modules.utils.listfolders + (path, only_name=0) +

+

Returns the list of folders (with paths) in the given path, +If only_name is set, it returns only the folder names

+
+
+ + + + + + + +

+ + + frappe.modules.utils.peval_doclist + (txt) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.utils.pprint_doclist + (doclist, with_comments=1) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.modules.utils.switch_module + (dt, dn, to, frm=None, export=None) +

+

Change the module of the given doctype, if export is true, then also export txt and copy +code files from src

+
+
+ + + + + + + +

+ + + frappe.modules.utils.uncommonify_doclist + (dl) +

+

Expands an commonified doclist

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/modules/index.html b/frappe/docs/current/api/modules/index.html new file mode 100644 index 0000000000..02aaad7811 --- /dev/null +++ b/frappe/docs/current/api/modules/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/modules/index.txt b/frappe/docs/current/api/modules/index.txt new file mode 100644 index 0000000000..f5fd1cfdbc --- /dev/null +++ b/frappe/docs/current/api/modules/index.txt @@ -0,0 +1,5 @@ +frappe.modules.export_file +frappe.modules +frappe.modules.import_file +frappe.modules.patch_handler +frappe.modules.utils \ No newline at end of file diff --git a/frappe/docs/current/api/print/frappe.print.html b/frappe/docs/current/api/print/frappe.print.html new file mode 100644 index 0000000000..708ad6c128 --- /dev/null +++ b/frappe/docs/current/api/print/frappe.print.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/print/index.html b/frappe/docs/current/api/print/index.html new file mode 100644 index 0000000000..902afc4bc5 --- /dev/null +++ b/frappe/docs/current/api/print/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/print/index.txt b/frappe/docs/current/api/print/index.txt new file mode 100644 index 0000000000..1b90f60e66 --- /dev/null +++ b/frappe/docs/current/api/print/index.txt @@ -0,0 +1 @@ +frappe.print \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.autodoc.html b/frappe/docs/current/api/utils/frappe.utils.autodoc.html new file mode 100644 index 0000000000..2926a5a83c --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.autodoc.html @@ -0,0 +1,152 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + +

Introduction


frappe.utils.autodoc +~~~~~~~~~~~~~~~~~~~~

+ +

Inspect elements of a given module and return its objects

+

+ + + + + +

+ + + frappe.utils.autodoc.automodel + (doctype) +

+

return doctype template

+
+
+ + + + + + + +

+ + + frappe.utils.autodoc.automodule + (name) +

+

Returns a list of attributes for given module string.

+ +

Attribute Format:

+ +
{
+    "name": [__name__],
+    "type": ["function" or "class"]
+    "args": [inspect.getargspec(value) (for function)]
+    "docs": [__doc__ as markdown]
+}
+
+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.utils.autodoc.get_class_info + (class_obj, module_name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.autodoc.get_function_info + (value) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.autodoc.get_version + (name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.autodoc.parse + (docs) +

+

Parameters:

+ +

Parse docs text into markdown. Will parse directives like - **name** - etc

+
+
+ + + + + + + +

+ + + frappe.utils.autodoc.strip_leading_tabs + (docs) +

+

Strip leading tabs from doc text.

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.backups.html b/frappe/docs/current/api/utils/frappe.utils.backups.html new file mode 100644 index 0000000000..1a465cf136 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.backups.html @@ -0,0 +1,238 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + +

Introduction


This module handles the On Demand Backup utility

+

+ + + +

Class BackupGenerator

+ +

This class contains methods to perform On Demand Backup

+ +

To initialize, specify (dbname, user, password, dbfilename=None, dbhost="localhost") +If specifying dbfilename, also append ".sql.gz"

+
+
+ + + + +

+ + + __init__ + (self, db_name, user, password, backup_path_db=None, backup_path_files=None, db_host=localhost) +

+

No docs

+
+
+ + + + + +

+ + + get_backup + (self, older_than=24, ignore_files=False, force=False) +

+

Takes a new dump if existing file is old +and sends the link to the file as email

+
+
+ + + + + +

+ + + get_recent_backup + (self, older_than) +

+

No docs

+
+
+ + + + + +

+ + + send_email + (self) +

+

Sends the link to backup file located at erpnext/backups

+
+
+ + + + + +

+ + + set_backup_file_name + (self) +

+

No docs

+
+
+ + + + + +

+ + + take_dump + (self) +

+

No docs

+
+
+ + + + + +

+ + + zip_files + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.utils.backups.delete_temp_backups + (older_than=24) +

+

Cleans up the backuplinkpath directory by deleting files older than 24 hours

+
+
+ + + + + + +

Public API +
/api/method/frappe.utils.backups.get_backup +

+

+ + + frappe.utils.backups.get_backup + () +

+

This function is executed when the user clicks on +Toos > Download Backup

+
+
+ + + + + + + +

+ + + frappe.utils.backups.get_backup_path + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.backups.is_file_old + (db_file_name, older_than=24) +

+

Checks if file exists and is older than specified hours +Returns -> +True: file does not exist or file is old +False: file is new

+
+
+ + + + + + + +

+ + + frappe.utils.backups.new_backup + (older_than=6, ignore_files=False, backup_path_db=None, backup_path_files=None, force=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.backups.scheduled_backup + (older_than=6, ignore_files=False, backup_path_db=None, backup_path_files=None, force=False) +

+

this function is called from scheduler +deletes backups older than 7 days +takes backup

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.bench_helper.html b/frappe/docs/current/api/utils/frappe.utils.bench_helper.html new file mode 100644 index 0000000000..58712dfd02 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.bench_helper.html @@ -0,0 +1,130 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.bench_helper.app_group + (ctx, site=False, force=False, verbose=False, profile=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.bench_helper.get_app_commands + (app) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.bench_helper.get_app_group + (app) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.bench_helper.get_app_groups + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.bench_helper.get_apps + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.bench_helper.get_sites + (site_arg) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.bench_helper.main + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.boilerplate.html b/frappe/docs/current/api/utils/frappe.utils.boilerplate.html new file mode 100644 index 0000000000..ad239b235e --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.boilerplate.html @@ -0,0 +1,34 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.boilerplate.make_boilerplate + (dest, app_name) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.change_log.html b/frappe/docs/current/api/utils/frappe.utils.change_log.html new file mode 100644 index 0000000000..3aba5e3817 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.change_log.html @@ -0,0 +1,96 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.change_log.get_change_log + (user=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.change_log.get_change_log_for_app + (app, from_version, to_version) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.utils.change_log.get_versions +

+

+ + + frappe.utils.change_log.get_versions + () +

+

Get versions of all installed apps.

+ +

Example:

+ +
{
+    "frappe": {
+        "title": "Frappe Framework",
+        "version": "5.0.0"
+    }
+}
+
+
+
+ + + + + + +

Public API +
/api/method/frappe.utils.change_log.update_last_known_versions +

+

+ + + frappe.utils.change_log.update_last_known_versions + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.csvutils.html b/frappe/docs/current/api/utils/frappe.utils.csvutils.html new file mode 100644 index 0000000000..d65d6daed3 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.csvutils.html @@ -0,0 +1,203 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class UnicodeWriter

+ +

+
+
+ + + + +

+ + + __init__ + (self, encoding=utf-8) +

+

No docs

+
+
+ + + + + +

+ + + getvalue + (self) +

+

No docs

+
+
+ + + + + +

+ + + writerow + (self, row) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.utils.csvutils.check_record + (d) +

+

check for mandatory, select options, dates. these should ideally be in doclist

+
+
+ + + + + + + +

+ + + frappe.utils.csvutils.getlink + (doctype, name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.csvutils.import_doc + (d, doctype, overwrite, row_idx, submit=False, ignore_links=False) +

+

import main (non child) document

+
+
+ + + + + + + +

+ + + frappe.utils.csvutils.read_csv_content + (fcontent, ignore_encoding=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.csvutils.read_csv_content_from_attached_file + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.csvutils.read_csv_content_from_uploaded_file + (ignore_encoding=False) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.utils.csvutils.send_csv_to_client +

+

+ + + frappe.utils.csvutils.send_csv_to_client + (args) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.csvutils.to_csv + (data) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.data.html b/frappe/docs/current/api/utils/frappe.utils.data.html new file mode 100644 index 0000000000..2b1915f6c4 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.data.html @@ -0,0 +1,976 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.data._get_time_zone + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.add_days + (date, days) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.add_months + (date, months) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.add_to_date + (date, years=0, months=0, days=0) +

+

Adds days to the given date

+
+
+ + + + + + + +

+ + + frappe.utils.data.add_years + (date, years) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.cint + (s) +

+

Convert to integer

+
+
+ + + + + + + +

+ + + frappe.utils.data.comma_and + (some_list) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.comma_or + (some_list) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.comma_sep + (some_list, pattern) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.compare + (val1, condition, val2) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.convert_utc_to_user_timezone + (utc_timestamp) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.cstr + (s) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.date_diff + (string_ed_date, string_st_date) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.encode + (obj, encoding=utf-8) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.escape_html + (text) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.expand_relative_urls + (html) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.filter_strip_join + (some_list, sep) +

+

given a list, filter None values, strip spaces and join

+
+
+ + + + + + + +

+ + + frappe.utils.data.flt + (s, precision=None) +

+

Convert to float (ignore commas)

+
+
+ + + + + + + +

+ + + frappe.utils.data.fmt_money + (amount, precision=None, currency=None) +

+

Convert to string with commas for thousands, millions etc

+
+
+ + + + + + + +

+ + + frappe.utils.data.format_datetime + (datetime_string, format_string=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.format_time + (txt) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.formatdate + (string_date=None, format_string=None) +

+

Convers the given string date to :data:user_format +ser format specified in defaults

+ +

Examples:

+ + +
+
+ + + + + + + +

+ + + frappe.utils.data.get_datetime + (datetime_str=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_datetime_str + (datetime_obj) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_first_day + (dt, d_years=0, d_months=0) +

+

Returns the first day of the month for the date specified by date object +Also adds d_years and d_months if specified

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_host_name + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_last_day + (dt) +

+

Returns last day of the month using: +get_first_day(dt, 0, 1) + datetime.timedelta(-1)

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_link_to_form + (doctype, name, label=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_number_format_info + (format) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_time + (time_str) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_time_zone + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_url + (uri=None, full_address=False) +

+

get app url from request

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_url_to_form + (doctype, name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_url_to_list + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.get_user_format + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.getdate + (string_date=None) +

+

Coverts string date (yyyy-mm-dd) to datetime.date object

+
+
+ + + + + + + +

+ + + frappe.utils.data.global_date_format + (date) +

+

returns date as 1 January 2012

+
+
+ + + + + + + +

+ + + frappe.utils.data.has_common + (l1, l2) +

+

Returns truthy value if there are common elements in lists l1 and l2

+
+
+ + + + + + + +

+ + + frappe.utils.data.in_words + (integer, in_million=True) +

+

Returns string in words for the given integer.

+
+
+ + + + + + + +

+ + + frappe.utils.data.is_html + (text) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.money_in_words + (number, main_currency=None, fraction_currency=None) +

+

Returns string in words with currency and fraction currency.

+
+
+ + + + + + + +

+ + + frappe.utils.data.now + () +

+

return current datetime as yyyy-mm-dd hh:mm:ss

+
+
+ + + + + + + +

+ + + frappe.utils.data.now_datetime + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.nowdate + () +

+

return current date as yyyy-mm-dd

+
+
+ + + + + + + +

+ + + frappe.utils.data.nowtime + () +

+

return current time in hh:mm

+
+
+ + + + + + + +

+ + + frappe.utils.data.parse_val + (v) +

+

Converts to simple datatypes from SQL query results

+
+
+ + + + + + + +

+ + + frappe.utils.data.pretty_date + (iso_datetime) +

+

Takes an ISO time and returns a string representing how +long ago the date represents. +Ported from PrettyDate by John Resig

+
+
+ + + + + + + +

+ + + frappe.utils.data.quote_urls + (html) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.quoted + (url) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.rounded + (num, precision=0) +

+

round method for round halfs to nearest even algorithm aka banker's rounding - compatible with python3

+
+
+ + + + + + + +

+ + + frappe.utils.data.scrub_urls + (html) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.strip + (val, chars=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.strip_html + (text) +

+

removes anything enclosed in and including <>

+
+
+ + + + + + + +

+ + + frappe.utils.data.time_diff + (string_ed_date, string_st_date) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.time_diff_in_hours + (string_ed_date, string_st_date) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.time_diff_in_seconds + (string_ed_date, string_st_date) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.to_timedelta + (time_str) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.today + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.data.unique + (seq) +

+

use this instead of list(set()) to preserve order of the original list. +Thanks to Stackoverflow: http://stackoverflow.com/questions/480214/how-do-you-remove-duplicates-from-a-list-in-python-whilst-preserving-order

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.dateutils.html b/frappe/docs/current/api/utils/frappe.utils.dateutils.html new file mode 100644 index 0000000000..c71ee5a623 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.dateutils.html @@ -0,0 +1,82 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.dateutils.datetime_in_user_format + (date_time) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.dateutils.get_user_date_format + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.dateutils.parse_date + (date) +

+

tries to parse given date to system's format i.e. yyyy-mm-dd. returns a string

+
+
+ + + + + + + +

+ + + frappe.utils.dateutils.user_to_str + (date, date_format=None) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.doctor.html b/frappe/docs/current/api/utils/frappe.utils.doctor.html new file mode 100644 index 0000000000..3fea42e627 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.doctor.html @@ -0,0 +1,213 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.doctor.celery_doctor + (site=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.doctor.check_if_workers_online + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.doctor.doctor + () +

+

Prints diagnostic information for the scheduler

+
+
+ + + + + + + +

+ + + frappe.utils.doctor.dump_queue_status + (site=None) +

+

Dumps pending events and tasks per queue

+
+
+ + + + + + + +

+ + + frappe.utils.doctor.get_pending_task_count + () +

+

Get count of pending tasks

+
+
+ + + + + + + +

+ + + frappe.utils.doctor.get_queues + (site=None) +

+

Returns the name of queues where frappe enqueues tasks as per the configuration

+
+
+ + + + + + + +

+ + + frappe.utils.doctor.get_redis_conn + () +

+

Returns the redis connection that celery would use

+
+
+ + + + + + + +

+ + + frappe.utils.doctor.get_running_tasks + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.doctor.get_task_body + (taskstr) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.doctor.get_task_count_for_queue + (queue) +

+

For a given queue, returns the count of every pending task and aggregate of +events pending

+
+
+ + + + + + + +

+ + + frappe.utils.doctor.get_timedout_locks + () +

+

Get list of stale locks from all sites

+
+
+ + + + + + + +

+ + + frappe.utils.doctor.purge_pending_tasks + (event=all) +

+

Purge tasks of the event event type. Passing 'all' will not purge all +events but of the all event type, ie. the ones that are enqueued every five +mintues and would any leave daily, hourly and weekly tasks

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.file_lock.html b/frappe/docs/current/api/utils/frappe.utils.file_lock.html new file mode 100644 index 0000000000..8eb45317f7 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.file_lock.html @@ -0,0 +1,97 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class LockTimeoutError

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + + + +

+ + + frappe.utils.file_lock.check_lock + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_lock.create_lock + (name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_lock.delete_lock + (name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_lock.get_lock_path + (name) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.file_manager.html b/frappe/docs/current/api/utils/frappe.utils.file_manager.html new file mode 100644 index 0000000000..8997b87d28 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.file_manager.html @@ -0,0 +1,385 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class MaxFileSizeReachedError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + + + +

+ + + frappe.utils.file_manager.check_max_file_size + (content) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.delete_file + (path) +

+

Delete file from public folder

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.delete_file_data_content + (doc, only_thumbnail=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.delete_file_from_filesystem + (doc, only_thumbnail=False) +

+

Delete file, thumbnail from File document

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.extract_images_from_doc + (doc, fieldname) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.extract_images_from_html + (doc, content) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.get_content_hash + (content) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.get_file + (fname) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.get_file_data_from_hash + (content_hash) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.get_file_name + (fname, optional_suffix) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.get_file_url + (file_data_name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.get_random_filename + (extn=None, content_type=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.get_uploaded_content + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.remove_all + (dt, dn) +

+

remove all files in a transaction

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.remove_file + (fid, attached_to_doctype=None, attached_to_name=None) +

+

Remove file and File entry

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.remove_file_by_url + (file_url, doctype=None, name=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.save_file + (fname, content, dt, dn, folder=None, decode=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.save_file_on_filesystem + (fname, content, content_type=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.save_uploaded + (dt, dn, folder) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.save_url + (file_url, dt, dn, folder) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.upload + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.file_manager.write_file + (content, file_path, fname) +

+

write file to disk with a random name (to compare)

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.fixtures.html b/frappe/docs/current/api/utils/frappe.utils.fixtures.html new file mode 100644 index 0000000000..fa6730ea2d --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.fixtures.html @@ -0,0 +1,66 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.fixtures.export_fixtures + () +

+

Export fixtures as JSON to [app]/fixtures

+
+
+ + + + + + + +

+ + + frappe.utils.fixtures.import_custom_scripts + (app) +

+

Import custom scripts from [app]/fixtures/custom_scripts

+
+
+ + + + + + + +

+ + + frappe.utils.fixtures.sync_fixtures + (app=None) +

+

Import, overwrite fixtures from [app]/fixtures

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.formatters.html b/frappe/docs/current/api/utils/frappe.utils.formatters.html new file mode 100644 index 0000000000..50fe374786 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.formatters.html @@ -0,0 +1,34 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.formatters.format_value + (value, df, doc=None, currency=None) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.html b/frappe/docs/current/api/utils/frappe.utils.html new file mode 100644 index 0000000000..f2b0b4f43d --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.html @@ -0,0 +1,695 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.decode_dict + (d, encoding=utf-8) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.dict_to_str + (args, sep=&) +

+

Converts a dictionary to URL

+
+
+ + + + + + + +

+ + + frappe.utils.encode_dict + (d, encoding=utf-8) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.esc + (s, esc_chars) +

+

Escape special characters

+
+
+ + + + + + + +

+ + + frappe.utils.execute_in_shell + (cmd, verbose=0) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.extract_email_id + (email) +

+

fetch only the email part of the email id

+
+
+ + + + + + + +

+ + + frappe.utils.getCSVelement + (v) +

+

Returns the CSV value of v, For example:

+ + +
+
+ + + + + + + +

+ + + frappe.utils.get_backups_path + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_common + (d1, d2) +

+

returns (list of keys) the common part of two dicts

+
+
+ + + + + + + +

+ + + frappe.utils.get_common_dict + (d1, d2) +

+

return common dictionary of d1 and d2

+
+
+ + + + + + + +

+ + + frappe.utils.get_defaults + (key=None) +

+

Get dictionary of default values from the defaults, or a value if key is passed

+
+
+ + + + + + + +

+ + + frappe.utils.get_diff_dict + (d1, d2) +

+

return common dictionary of d1 and d2

+
+
+ + + + + + + +

+ + + frappe.utils.get_disk_usage + () +

+

get disk usage of files folder

+
+
+ + + + + + + +

+ + + frappe.utils.get_file_timestamp + (fn) +

+

Returns timestamp of the given file

+
+
+ + + + + + + +

+ + + frappe.utils.get_files_path + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_formatted_email + (user) +

+

get email id of user formatted as: John Doe johndoe@example.com

+
+
+ + + + + + + +

+ + + frappe.utils.get_fullname + (user=None) +

+

get the full name (first name + last name) of the user from User

+
+
+ + + + + + + +

+ + + frappe.utils.get_gravatar + (email) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_hook_method + (hook_name, fallback=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_html_format + (print_path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_path + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_request_session + (max_retries=3) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_request_site_address + (full_address=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_site_base_path + (sites_dir=None, hostname=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_site_name + (hostname) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_site_path + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_sites + (sites_path=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_test_client + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.get_traceback + () +

+

Returns the traceback of the Exception

+
+
+ + + + + + + +

+ + + frappe.utils.is_markdown + (text) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.log + (event, details) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.make_esc + (esc_chars) +

+

Function generator for Escaping special characters

+
+
+ + + + + + + +

+ + + frappe.utils.pprint_dict + (d, level=1, no_blanks=True) +

+

Pretty print a dictionary with indents

+
+
+ + + + + + + +

+ + + frappe.utils.random_string + (length) +

+

generate a random string

+
+
+ + + + + + + +

+ + + frappe.utils.remove_blanks + (d) +

+

Returns d with empty ('' or None) values stripped

+
+
+ + + + + + + +

+ + + frappe.utils.set_default + (key, val) +

+

Set / add a default value to defaults`

+
+
+ + + + + + + +

+ + + frappe.utils.split_emails + (txt) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.strip_html_tags + (text) +

+

Remove html tags from text

+
+
+ + + + + + + +

+ + + frappe.utils.touch_file + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.unesc + (s, esc_chars) +

+

UnEscape special characters

+
+
+ + + + + + + +

+ + + frappe.utils.update_progress_bar + (txt, i, l) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.validate_email_add + (email_str, throw=False) +

+

Validates the email string

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.image.html b/frappe/docs/current/api/utils/frappe.utils.image.html new file mode 100644 index 0000000000..dc878d993c --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.image.html @@ -0,0 +1,34 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.image.resize_images + (path, maxdim=700) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.install.html b/frappe/docs/current/api/utils/frappe.utils.install.html new file mode 100644 index 0000000000..52547bbf38 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.install.html @@ -0,0 +1,114 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.install.add_country_and_currency + (name, country) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.install.after_install + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.install.before_install + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.install.before_tests + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.install.get_admin_password + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.install.import_country_and_currency + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.jinja.html b/frappe/docs/current/api/utils/frappe.utils.jinja.html new file mode 100644 index 0000000000..cfa454236b --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.jinja.html @@ -0,0 +1,130 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.jinja.get_allowed_functions_for_jenv + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.jinja.get_jenv + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.jinja.get_jloader + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.jinja.get_template + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.jinja.render_include + (content) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.jinja.render_template + (template, context, is_path=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.jinja.set_filters + (jenv) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.make_random.html b/frappe/docs/current/api/utils/frappe.utils.make_random.html new file mode 100644 index 0000000000..b9765b5244 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.make_random.html @@ -0,0 +1,82 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.make_random.add_random_children + (doc, fieldname, rows, randomize, unique=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.make_random.can_make + (doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.make_random.get_random + (doctype, filters=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.make_random.how_many + (doctype) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.minify.html b/frappe/docs/current/api/utils/frappe.utils.minify.html new file mode 100644 index 0000000000..0c4e2675f7 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.minify.html @@ -0,0 +1,234 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class JavascriptMinify

+ +

Inherits from __builtin__.object + +

+
+
+ + + + +

+ + + _action + (self, action) +

+

do something! What you do is determined by the argument: +1 Output A. Copy B to A. Get the next B. +2 Copy B to A. Get the next B. (Delete A). +3 Get the next B. (Delete B). +action treats a string as a single character. Wow! +action recognizes a regular expression if it is preceded by ( or , or =.

+
+
+ + + + + +

+ + + _get + (self) +

+

return the next character from stdin. Watch out for lookahead. If +the character is a control character, translate it to a space or +linefeed.

+
+
+ + + + + +

+ + + _jsmin + (self) +

+

Copy the input to the output, deleting the characters which are +insignificant to JavaScript. Comments will be removed. Tabs will be +replaced with spaces. Carriage returns will be replaced with linefeeds. +Most spaces and linefeeds will be removed.

+
+
+ + + + + +

+ + + _next + (self) +

+

get the next character, excluding comments. peek() is used to see +if an unescaped '/' is followed by a '/' or '*'.

+
+
+ + + + + +

+ + + _outA + (self) +

+

No docs

+
+
+ + + + + +

+ + + _outB + (self) +

+

No docs

+
+
+ + + + + +

+ + + _peek + (self) +

+

No docs

+
+
+ + + + + +

+ + + minify + (self, instream, outstream) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class UnterminatedComment

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class UnterminatedRegularExpression

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + +

Class UnterminatedStringLiteral

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + + + +

+ + + frappe.utils.minify.isAlphanum + (c) +

+

return true if the character is a letter, digit, underscore, +dollar sign, or non-ASCII character.

+
+
+ + + + + + + +

+ + + frappe.utils.minify.jsmin + (js) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.momentjs.html b/frappe/docs/current/api/utils/frappe.utils.momentjs.html new file mode 100644 index 0000000000..28ae1bf1c8 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.momentjs.html @@ -0,0 +1,50 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.momentjs.get_all_timezones + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.momentjs.update + (tz, out) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.nestedset.html b/frappe/docs/current/api/utils/frappe.utils.nestedset.html new file mode 100644 index 0000000000..00e1989e11 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.nestedset.html @@ -0,0 +1,319 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class NestedSet

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + after_rename + (self, olddn, newdn, merge=False) +

+

No docs

+
+
+ + + + + +

+ + + before_rename + (self, olddn, newdn, merge=False, group_fname=is_group) +

+

No docs

+
+
+ + + + + +

+ + + get_ancestors + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_trash + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_ledger + (self, group_identifier=is_group) +

+

No docs

+
+
+ + + + + +

+ + + validate_one_root + (self) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class NestedSetChildExistsError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class NestedSetInvalidMergeError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class NestedSetMultipleRootsError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + +

Class NestedSetRecursionError

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + + + +

+ + + frappe.utils.nestedset.get_ancestors_of + (doctype, name) +

+

Get ancestor elements of a DocType with a tree structure

+
+
+ + + + + + + +

+ + + frappe.utils.nestedset.get_root_of + (doctype) +

+

Get root element of a DocType with a tree structure

+
+
+ + + + + + + +

+ + + frappe.utils.nestedset.rebuild_node + (doctype, parent, left, parent_field) +

+

reset lft, rgt and recursive call for all children

+
+
+ + + + + + + +

+ + + frappe.utils.nestedset.rebuild_tree + (doctype, parent_field) +

+

call rebuild_node for all root nodes

+
+
+ + + + + + + +

+ + + frappe.utils.nestedset.update_add_node + (doc, parent, parent_field) +

+

insert a new node

+
+
+ + + + + + + +

+ + + frappe.utils.nestedset.update_move_node + (doc, parent_field) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.nestedset.update_nsm + (doc) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.nestedset.validate_loop + (doctype, name, lft, rgt) +

+

check if item not an ancestor (loop)

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.pdf.html b/frappe/docs/current/api/utils/frappe.utils.pdf.html new file mode 100644 index 0000000000..a735cf3e6c --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.pdf.html @@ -0,0 +1,34 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.pdf.get_pdf + (html, options=None) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.redis_wrapper.html b/frappe/docs/current/api/utils/frappe.utils.redis_wrapper.html new file mode 100644 index 0000000000..606e0e86b3 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.redis_wrapper.html @@ -0,0 +1,219 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class RedisWrapper

+ +

Inherits from redis.client.Redis + +

Redis client that will automatically prefix conf.db_name

+
+
+ + + + +

+ + + delete_key + (self) +

+

No docs

+
+
+ + + + + +

+ + + delete_keys + (self, key) +

+

Delete keys with wildcard *.

+
+
+ + + + + +

+ + + delete_value + (self, keys, user=None, make_keys=True) +

+

Delete value, list of values.

+
+
+ + + + + +

+ + + get_all + (self, key) +

+

No docs

+
+
+ + + + + +

+ + + get_keys + (self, key) +

+

Return keys starting with key.

+
+
+ + + + + +

+ + + get_value + (self, key, generator=None, user=None) +

+

Returns cache value. If not found and generator function is +given, it will call the generator.

+ +

param key: Cache key. +param generator: Function to be called to generate a value if None is returned.

+
+
+ + + + + +

+ + + hdel + (self, name, key) +

+

No docs

+
+
+ + + + + +

+ + + hdel_keys + (self, name_starts_with, key) +

+

Delete hash names with wildcard * and key

+
+
+ + + + + +

+ + + hget + (self, name, key, generator=None) +

+

No docs

+
+
+ + + + + +

+ + + hkeys + (self, name) +

+

No docs

+
+
+ + + + + +

+ + + hset + (self, name, key, value) +

+

No docs

+
+
+ + + + + +

+ + + make_key + (self, key, user=None) +

+

No docs

+
+
+ + + + + +

+ + + set_value + (self, key, val, user=None) +

+

Sets cache value.

+
+
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.response.html b/frappe/docs/current/api/utils/frappe.utils.response.html new file mode 100644 index 0000000000..124ae07521 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.response.html @@ -0,0 +1,210 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.response.as_csv + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.response.as_json + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.response.as_page + () +

+

print web page

+
+
+ + + + + + + +

+ + + frappe.utils.response.as_raw + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.response.build_response + (response_type=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.response.download_backup + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.response.handle_session_stopped + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.response.json_handler + (obj) +

+

serialize non-serializable data for json

+
+
+ + + + + + + +

+ + + frappe.utils.response.make_logs + (response=None) +

+

make strings for msgprint and errprint

+
+
+ + + + + + + +

+ + + frappe.utils.response.redirect + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.response.report_error + (status_code) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.response.send_private_file + (path) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.scheduler.html b/frappe/docs/current/api/utils/frappe.utils.scheduler.html new file mode 100644 index 0000000000..9aae666ba7 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.scheduler.html @@ -0,0 +1,199 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + +

Introduction


Events: + always + daily + monthly + weekly

+

+ + + + + +

+ + + frappe.utils.scheduler.disable_scheduler + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.scheduler.enable_scheduler + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.scheduler.enqueue_applicable_events + (site, nowtime, last) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.scheduler.enqueue_events + (site) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.scheduler.get_enabled_scheduler_events + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.scheduler.get_error_report + (from_date=None, to_date=None, limit=10) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.scheduler.get_errors + (from_date, to_date, limit) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.scheduler.is_scheduler_disabled + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.scheduler.log + (method, message=None) +

+

log error in patch_log

+
+
+ + + + + + + +

+ + + frappe.utils.scheduler.toggle_scheduler + (enable) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.scheduler.trigger + (site, event, now=False) +

+

trigger method in startup.schedule_handler

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.sel.html b/frappe/docs/current/api/utils/frappe.utils.sel.html new file mode 100644 index 0000000000..5e578ec3cb --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.sel.html @@ -0,0 +1,418 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.sel.add_child + (fieldname) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.close + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.done_add_child + (fieldname) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.execute_script + (js) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.find + (selector, everywhere=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.get + (url) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.get_localhost + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.get_wait + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.go_to_module + (module_name, item=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.login + (wait_for_id=#page-desktop) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.new_doc + (module, doctype) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.primary_action + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.scroll_to + (selector) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.set_field + (fieldname, value, fieldtype=input) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.set_input + (selector, text, key=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.set_select + (fieldname, value) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.signal_handler + (signal, frame) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.start + (verbose=None, driver=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.start_test_server + (verbose) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.wait + (selector, everywhere=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.wait_for_ajax + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.wait_for_page + (name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.wait_for_state + (state) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.wait_till_clickable + (selector) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.sel.wait_till_visible + (selector) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.setup_docs.html b/frappe/docs/current/api/utils/frappe.utils.setup_docs.html new file mode 100644 index 0000000000..ebf4af34f9 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.setup_docs.html @@ -0,0 +1,239 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + +

Introduction


Automatically setup docs for a project

+ +

Call from command line:

+ +
bench setup-docs app path
+
+

+ + + +

Class setup_docs

+ +

Inherits from __builtin__.object + +

+
+
+ + + + +

+ + + __init__ + (self, app) +

+

Generate source templates for models reference and module API +and templates at templates/autodoc

+
+
+ + + + + +

+ + + build + (self, docs_version) +

+

Build templates for docs models and Python API

+
+
+ + + + + +

+ + + build_user_docs + (self) +

+

Build templates for user docs pages, if missing.

+
+
+ + + + + +

+ + + copy_assets + (self) +

+

Copy jquery, bootstrap and other assets to files

+
+
+ + + + + +

+ + + is_py_module + (self, basepath, folders, files) +

+

No docs

+
+
+ + + + + +

+ + + make_docs + (self, target, local=False) +

+

No docs

+
+
+ + + + + +

+ + + make_folder + (self, path, template=None, context=None) +

+

No docs

+
+
+ + + + + +

+ + + make_home_pages + (self) +

+

Make standard home pages for docs, developer docs, api and models +from templates

+
+
+ + + + + +

+ + + setup_app_context + (self) +

+

No docs

+
+
+ + + + + +

+ + + sync_docs + (self) +

+

Sync docs from /docs folder to Web Page.

+ +

Called as bench --site [sitename] sync-docs [appname]

+
+
+ + + + + +

+ + + update_index_txt + (self, path) +

+

No docs

+
+
+ + + + + +

+ + + write_files + (self) +

+

render templates and write files to target folder

+
+
+ + + + + +

+ + + write_model_file + (self, basepath, module, doctype) +

+

No docs

+
+
+ + + + + +

+ + + write_modules + (self, basepath, folders, files) +

+

No docs

+
+
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.user.html b/frappe/docs/current/api/utils/frappe.utils.user.html new file mode 100644 index 0000000000..f99e2de654 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.user.html @@ -0,0 +1,346 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class User

+ +

A user permission object can be accessed as frappe.get_user()

+
+
+ + + + +

+ + + __init__ + (self, name=) +

+

No docs

+
+
+ + + + + +

+ + + _get + (self, key) +

+

No docs

+
+
+ + + + + +

+ + + build_doctype_map + (self) +

+

build map of special doctype properties

+
+
+ + + + + +

+ + + build_perm_map + (self) +

+

build map of permissions at level 0

+
+
+ + + + + +

+ + + build_permissions + (self) +

+

build lists of what the user can read / write / create +quirks: + readonly => Not in Search + increate => Not in create

+
+
+ + + + + +

+ + + get_block_modules + (self) +

+

Returns list of blocked modules

+
+
+ + + + + +

+ + + get_can_read + (self) +

+

return list of doctypes that the user can read

+
+
+ + + + + +

+ + + get_defaults + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_roles + (self) +

+

get list of roles

+
+
+ + + + + +

+ + + load_user + (self) +

+

No docs

+
+
+ + + + + +

+ + + setup_user + (self) +

+

No docs

+
+
+ + + + + +

+ + + update_recent + (self, dt, dn) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.utils.user.add_role + (user, role) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.user.add_system_manager + (email, first_name=None, last_name=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.user.get_enabled_system_users + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.user.get_fullname_and_avatar + (user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.user.get_roles + (user=None, with_standard=True) +

+

get roles of current user

+
+
+ + + + + + + +

+ + + frappe.utils.user.get_system_managers + (only_name=False) +

+

returns all system manager's user details

+
+
+ + + + + + + +

+ + + frappe.utils.user.get_user_fullname + (user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.user.is_system_user + (username) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.user.is_website_user + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/frappe.utils.verified_command.html b/frappe/docs/current/api/utils/frappe.utils.verified_command.html new file mode 100644 index 0000000000..1d4d2a7ae0 --- /dev/null +++ b/frappe/docs/current/api/utils/frappe.utils.verified_command.html @@ -0,0 +1,136 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.utils.verified_command.get_secret + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.verified_command.get_signature + (params, nonce, secret=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.verified_command.get_signed_params + (params) +

+

Sign a url by appending &_signature=xxxxx to given params (string or dict).

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.utils.verified_command.get_url + (cmd, params, nonce=None, secret=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.verified_command.get_url_using_doc + (doc, cmd) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.utils.verified_command.verify_request + () +

+

Verify if the incoming signed request if it is correct.

+
+
+ + + + + + + +

+ + + frappe.utils.verified_command.verify_using_doc + (doc, signature, cmd) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/index.html b/frappe/docs/current/api/utils/index.html new file mode 100644 index 0000000000..97c4ae6632 --- /dev/null +++ b/frappe/docs/current/api/utils/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/utils/index.txt b/frappe/docs/current/api/utils/index.txt new file mode 100644 index 0000000000..19f2af7c4a --- /dev/null +++ b/frappe/docs/current/api/utils/index.txt @@ -0,0 +1,29 @@ +frappe.utils.autodoc +frappe.utils.backups +frappe.utils.bench_helper +frappe.utils.boilerplate +frappe.utils.change_log +frappe.utils.csvutils +frappe.utils.data +frappe.utils.dateutils +frappe.utils.doctor +frappe.utils.file_lock +frappe.utils.file_manager +frappe.utils.fixtures +frappe.utils.formatters +frappe.utils +frappe.utils.image +frappe.utils.install +frappe.utils.jinja +frappe.utils.make_random +frappe.utils.minify +frappe.utils.momentjs +frappe.utils.nestedset +frappe.utils.pdf +frappe.utils.redis_wrapper +frappe.utils.response +frappe.utils.scheduler +frappe.utils.sel +frappe.utils.setup_docs +frappe.utils.user +frappe.utils.verified_command \ No newline at end of file diff --git a/frappe/docs/current/api/website/frappe.website.context.html b/frappe/docs/current/api/website/frappe.website.context.html new file mode 100644 index 0000000000..ab79d84263 --- /dev/null +++ b/frappe/docs/current/api/website/frappe.website.context.html @@ -0,0 +1,66 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.website.context.add_metatags + (context) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.context.build_context + (context) +

+

get_context method of doc or module is supposed to render content templates and push it into context

+
+
+ + + + + + + +

+ + + frappe.website.context.get_context + (path, args=None) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/frappe.website.html b/frappe/docs/current/api/website/frappe.website.html new file mode 100644 index 0000000000..6106989435 --- /dev/null +++ b/frappe/docs/current/api/website/frappe.website.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/frappe.website.render.html b/frappe/docs/current/api/website/frappe.website.render.html new file mode 100644 index 0000000000..5c476a7918 --- /dev/null +++ b/frappe/docs/current/api/website/frappe.website.render.html @@ -0,0 +1,273 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class PageNotFoundError

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + + + +

+ + + frappe.website.render.add_csrf_token + (data) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.build + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.build_json + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.build_page + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.build_response + (path, data, http_status_code, headers=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.clear_cache + (path=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.get_doctype_from_path + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.is_ajax + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.render + (path, http_status_code=None) +

+

render html page

+
+
+ + + + + + + +

+ + + frappe.website.render.render_403 + (e, pathname) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.render_page + (path) +

+

get page html

+
+
+ + + + + + + +

+ + + frappe.website.render.render_page_by_language + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.resolve_from_map + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.resolve_path + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.render.set_content_type + (response, data, path) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/frappe.website.router.html b/frappe/docs/current/api/website/frappe.website.router.html new file mode 100644 index 0000000000..4c30f438a8 --- /dev/null +++ b/frappe/docs/current/api/website/frappe.website.router.html @@ -0,0 +1,166 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.website.router.build_route + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.router.clear_sitemap + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.router.get_generator_route + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.router.get_generator_routes + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.router.get_page_route + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.router.get_pages + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.router.get_route_info + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.router.process_generators + (func) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.router.resolve_route + (path) +

+

Returns the page route object based on searching in pages and generators. +The www folder is also a part of generator Web Page.

+ +

The only exceptions are /about and /contact these will be searched in Web Pages +first before checking the standard pages.

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/frappe.website.statics.html b/frappe/docs/current/api/website/frappe.website.statics.html new file mode 100644 index 0000000000..b55b448882 --- /dev/null +++ b/frappe/docs/current/api/website/frappe.website.statics.html @@ -0,0 +1,203 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class sync

+ +

Inherits from __builtin__.object + +

+
+
+ + + + +

+ + + __init__ + (self, verbose=False, path=None) +

+

No docs

+
+
+ + + + + +

+ + + cleanup + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_index_txt + (self, basepath, files) +

+

No docs

+
+
+ + + + + +

+ + + get_title + (self, fpath, content) +

+

No docs

+
+
+ + + + + +

+ + + start + (self, rebuild=False, path=www, apps=None) +

+

No docs

+
+
+ + + + + +

+ + + sync_alphabetically + (self, basepath, folders, files, app) +

+

No docs

+
+
+ + + + + +

+ + + sync_file + (self, fname, template_path, priority, app) +

+

No docs

+
+
+ + + + + +

+ + + sync_folder + (self, basepath, folders, files, app) +

+

No docs

+
+
+ + + + + +

+ + + sync_for_app + (self, app) +

+

No docs

+
+
+ + + + + +

+ + + sync_index_page + (self, basepath, files, app) +

+

No docs

+
+
+ + + + + +

+ + + sync_using_given_index + (self, basepath, folders, files, app) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.website.statics.sync_statics + (rebuild=False) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/frappe.website.template.html b/frappe/docs/current/api/website/frappe.website.template.html new file mode 100644 index 0000000000..b93ef31ac5 --- /dev/null +++ b/frappe/docs/current/api/website/frappe.website.template.html @@ -0,0 +1,147 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.website.template.add_hero + (out, context) +

+

Add a hero element if specified in content or hooks. +Hero elements get full page width.

+
+
+ + + + + + + +

+ + + frappe.website.template.add_index + (out, context) +

+

Add index, next button if {index}, {next} is present.

+
+
+ + + + + + + +

+ + + frappe.website.template.build_template + (context) +

+

Returns a dict of block name and its rendered content

+
+
+ + + + + + + +

+ + + frappe.website.template.render_blocks + (template_path, out, context) +

+

Build the template block by block from the main template.

+
+
+ + + + + + + +

+ + + frappe.website.template.separate_style_and_script + (out, context) +

+

Extract style and script tags into separate blocks

+
+
+ + + + + + + +

+ + + frappe.website.template.set_breadcrumbs + (out, context) +

+

Build breadcrumbs template (deprecated)

+
+
+ + + + + + + +

+ + + frappe.website.template.set_sidebar + (out, context) +

+

Include sidebar (deprecated)

+
+
+ + + + + + + +

+ + + frappe.website.template.set_title_and_header + (out, context) +

+

Extract and set title and header from content or context.

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/frappe.website.utils.html b/frappe/docs/current/api/website/frappe.website.utils.html new file mode 100644 index 0000000000..c9caf181bf --- /dev/null +++ b/frappe/docs/current/api/website/frappe.website.utils.html @@ -0,0 +1,242 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + +

+ + + frappe.website.utils.abs_url + (path) +

+

Deconstructs and Reconstructs a URL into an absolute URL or a URL relative from root '/'

+
+
+ + + + + + + +

+ + + frappe.website.utils.can_cache + (no_cache=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.utils.cleanup_page_name + (title) +

+

make page name from title

+
+
+ + + + + + + +

+ + + frappe.website.utils.convert_to_hex + (channel_value) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.utils.delete_page_cache + (path) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.utils.detect_color_format + (color) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.utils.find_first_image + (html) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.utils.format_color + (r, g, b, a, color_format) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.utils.get_comment_list + (doctype, name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.utils.get_full_index + (route=None, doctype=Web Page, extn=False) +

+

Returns full index of the website (on Web Page) upto the n-th level

+
+
+ + + + + + + +

+ + + frappe.website.utils.get_home_page + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.utils.get_shade + (color, percent) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.utils.get_shade_for_channel + (channel_value, percent) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.utils.is_signup_enabled + () +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/frappe.website.website_generator.html b/frappe/docs/current/api/website/frappe.website.website_generator.html new file mode 100644 index 0000000000..dc29918fcb --- /dev/null +++ b/frappe/docs/current/api/website/frappe.website.website_generator.html @@ -0,0 +1,357 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + +

Class WebsiteGenerator

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + after_rename + (self, olddn, newdn, merge) +

+

No docs

+
+
+ + + + + +

+ + + autoname + (self) +

+

No docs

+
+
+ + + + + +

+ + + before_rename + (self, oldname, name, merge) +

+

No docs

+
+
+ + + + + +

+ + + clear_cache + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_children + (self, context=None) +

+

No docs

+
+
+ + + + + +

+ + + get_children_of + (self, route) +

+

Return list of children of given route, for generating index in Web Page

+
+
+ + + + + +

+ + + get_next + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_or_make_page_name + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_page_name + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_parent + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_parents + (self, context) +

+

No docs

+
+
+ + + + + +

+ + + get_route + (self, doc=None) +

+

No docs

+
+
+ + + + + +

+ + + get_route_context + (self) +

+

No docs

+
+
+ + + + + +

+ + + has_children + (self, route) +

+

No docs

+
+
+ + + + + +

+ + + make_page_name + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_trash + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + onload + (self) +

+

No docs

+
+
+ + + + + +

+ + + set_parent_website_route + (self) +

+

No docs

+
+
+ + + + + +

+ + + update_routes_of_descendants + (self, old_route=None) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + + + + +

+ + + website_published + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.website.website_generator.make_route + (doc) +

+

No docs

+
+
+ + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/index.html b/frappe/docs/current/api/website/index.html new file mode 100644 index 0000000000..0f7c3c357e --- /dev/null +++ b/frappe/docs/current/api/website/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/index.txt b/frappe/docs/current/api/website/index.txt new file mode 100644 index 0000000000..45ac658638 --- /dev/null +++ b/frappe/docs/current/api/website/index.txt @@ -0,0 +1,8 @@ +frappe.website.context +frappe.website +frappe.website.render +frappe.website.router +frappe.website.statics +frappe.website.template +frappe.website.utils +frappe.website.website_generator \ No newline at end of file diff --git a/frappe/docs/current/api/website/website_theme/frappe.website.website_theme.html b/frappe/docs/current/api/website/website_theme/frappe.website.website_theme.html new file mode 100644 index 0000000000..081a148e92 --- /dev/null +++ b/frappe/docs/current/api/website/website_theme/frappe.website.website_theme.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/website_theme/index.html b/frappe/docs/current/api/website/website_theme/index.html new file mode 100644 index 0000000000..bbff2b0fa2 --- /dev/null +++ b/frappe/docs/current/api/website/website_theme/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/website_theme/index.txt b/frappe/docs/current/api/website/website_theme/index.txt new file mode 100644 index 0000000000..31655928c3 --- /dev/null +++ b/frappe/docs/current/api/website/website_theme/index.txt @@ -0,0 +1 @@ +frappe.website.website_theme \ No newline at end of file diff --git a/frappe/docs/current/api/website/website_theme/standard/frappe.website.website_theme.standard.html b/frappe/docs/current/api/website/website_theme/standard/frappe.website.website_theme.standard.html new file mode 100644 index 0000000000..d10b4210f5 --- /dev/null +++ b/frappe/docs/current/api/website/website_theme/standard/frappe.website.website_theme.standard.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/website_theme/standard/index.html b/frappe/docs/current/api/website/website_theme/standard/index.html new file mode 100644 index 0000000000..d4a0a35929 --- /dev/null +++ b/frappe/docs/current/api/website/website_theme/standard/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/website/website_theme/standard/index.txt b/frappe/docs/current/api/website/website_theme/standard/index.txt new file mode 100644 index 0000000000..8a432687d6 --- /dev/null +++ b/frappe/docs/current/api/website/website_theme/standard/index.txt @@ -0,0 +1 @@ +frappe.website.website_theme.standard \ No newline at end of file diff --git a/frappe/docs/current/api/workflow/frappe.workflow.html b/frappe/docs/current/api/workflow/frappe.workflow.html new file mode 100644 index 0000000000..281d62a814 --- /dev/null +++ b/frappe/docs/current/api/workflow/frappe.workflow.html @@ -0,0 +1,18 @@ +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/api/workflow/index.html b/frappe/docs/current/api/workflow/index.html new file mode 100644 index 0000000000..c5cd871e7f --- /dev/null +++ b/frappe/docs/current/api/workflow/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Package Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/api/workflow/index.txt b/frappe/docs/current/api/workflow/index.txt new file mode 100644 index 0000000000..dab7c26a6c --- /dev/null +++ b/frappe/docs/current/api/workflow/index.txt @@ -0,0 +1 @@ +frappe.workflow \ No newline at end of file diff --git a/frappe/docs/current/index.html b/frappe/docs/current/index.html new file mode 100644 index 0000000000..d3ddf35b89 --- /dev/null +++ b/frappe/docs/current/index.html @@ -0,0 +1,55 @@ + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + + + + + + + + + + +
+ App Name + + frappe +
+ Publisher + + Frappe Technologies Pvt. Ltd. +
+ Version + + 6.6.1 +
+ +

Contents

+ + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/async_task.html b/frappe/docs/current/models/core/async_task.html new file mode 100644 index 0000000000..2b3f031b6b --- /dev/null +++ b/frappe/docs/current/models/core/async_task.html @@ -0,0 +1,189 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabAsync Task

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1status + Select + Status + + +
+Queued
+Running
+Succeeded
+Failed
+
+
2task_name + Data + Task Name + +
3runtime + Data + Runtime + +
4result + Code + Result + +
5traceback + Code + Traceback + +
6section_break_6 + Section Break + + +
7reference_doctype + Link + Reference DocType + + + + + + +DocType + + + +
8reference_name + Dynamic Link + Reference Doc + + +
reference_doctype
+
+ + +
+

Controller

+

frappe.core.doctype.async_task.async_task

+ + + + + + + +

Class AsyncTask

+ +

Inherits from frappe.model.document.Document + +

+
+
+ +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/block_module.html b/frappe/docs/current/models/core/block_module.html new file mode 100644 index 0000000000..547bbf100c --- /dev/null +++ b/frappe/docs/current/models/core/block_module.html @@ -0,0 +1,75 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabBlock Module

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1module + Data + Module + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/comment.html b/frappe/docs/current/models/core/comment.html new file mode 100644 index 0000000000..783a45b9f8 --- /dev/null +++ b/frappe/docs/current/models/core/comment.html @@ -0,0 +1,390 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabComment

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1comment + Text + Comment + +
2comment_type + Data + Comment Type + + +
Email
+Chat
+Phone
+SMS
+Created
+Submitted
+Cancelled
+Assigned
+Assignment Completed
+Comment
+Workflow
+Label
+Attachment
+Attachment Removed
+
3comment_by + Data + Comment By + +
4comment_by_fullname + Data + Comment By Fullname + +
5comment_date + Date + Comment Date + +
6comment_time + Data + Comment Time + +
7comment_doctype + Data + Comment Doctype + +
8comment_docname + Data + Comment Docname + +
9post_topic + Data + Post Topic + +
10unsubscribed + Check + Unsubscribed + +
11reference_doctype + Link + Reference DocType + + + + + + +DocType + + + +
12reference_name + Dynamic Link + Reference Name +

+ Reference DocType and Reference Name are used to render a comment as a link (href) to a Doc.

+
+
reference_doctype
+
+ + +
+

Controller

+

frappe.core.doctype.comment.comment

+ + + + + + + +

Class Comment

+ +

Inherits from frappe.model.document.Document + +

Comments are added to Documents via forms or views like blogs etc.

+
+
+ + + + +

+ + + after_insert + (self) +

+

Send realtime updates

+
+
+ + + + + +

+ + + get_comments_from_parent + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_feed + (self) +

+

Returns feed HTML from Comment.

+
+
+ + + + + +

+ + + on_trash + (self) +

+

Removes from _comments in parent Document

+
+
+ + + + + +

+ + + on_update + (self) +

+

Updates _comments property in parent Document.

+
+
+ + + + + +

+ + + update_comment_in_doc + (self) +

+

Updates _comments (JSON) property in parent Document. +Creates a column _comments if property does not exist.

+ +

_comments format

+ +
{
+    "comment": [String],
+    "by": [user],
+    "name": [Comment Document name]
+}
+
+
+
+ + + + + +

+ + + update_comments_in_parent + (self, _comments) +

+

Updates _comments property in parent Document with given dict.

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + validate + (self) +

+

Raise exception for more than 50 comments.

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.core.doctype.comment.comment.on_doctype_update + () +

+

Add index to tabComment (comment_doctype, comment_name)

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/communication.html b/frappe/docs/current/models/core/communication.html new file mode 100644 index 0000000000..a35a540560 --- /dev/null +++ b/frappe/docs/current/models/core/communication.html @@ -0,0 +1,802 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabCommunication

+ + +Keep a track of all communications + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1naming_series + Select + Series + + +
COMM-
+
2communication_medium + Select + Communication Medium + + +
+Chat
+Phone
+Email
+SMS
+Visit
+Other
+
3recipients + Data + Recipients + +
4cc + Data + CC + +
5phone_no + Data + Phone No. + +
6column_break_5 + Column Break + + +
7status + Select + Status + + +
Open
+Replied
+Closed
+Linked
+
8sent_or_received + Select + Sent or Received + + +
Sent
+Received
+
9delivery_status + Select + Delivery Status +

+ Integrations can use this field to set email delivery status

+
+
+Sent
+Bounced
+Opened
+Marked As Spam
+Rejected
+Delayed
+Soft-Bounced
+Clicked
+Recipient Unsubscribed
+
10section_break_10 + Section Break + + +
11subject + Data + Subject + +
12section_break_8 + Section Break + + +
13content + Text Editor + Content + +
14additional_info + Section Break + More Information + +
15sender + Data + Sender + +
16sender_full_name + Data + Sender Full Name + +
17communication_date + Datetime + Date + +
18column_break_14 + Column Break + + +
19reference_doctype + Link + Reference DocType + + + + + + +DocType + + + +
20reference_name + Dynamic Link + Reference Name + + +
reference_doctype
+
21in_reply_to + Link + In Reply To + + + + + + +Communication + + + +
22email_account + Link + Email Account + + + + + + +Email Account + + + +
23user + Link + User + + + + + + +User + + + +
24unread_notification_sent + Check + Unread Notification Sent + +
25_user_tags + Data + User Tags + +
+ + +
+

Controller

+

frappe.core.doctype.communication.communication

+ + + + + + + +

Class Communication

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + _notify + (self, print_html=None, print_format=None, attachments=None, recipients=None, cc=None) +

+

No docs

+
+
+ + + + + +

+ + + after_insert + (self) +

+

No docs

+
+
+ + + + + +

+ + + filter_email_list + (self, email_list, exclude, is_cc=False) +

+

No docs

+
+
+ + + + + +

+ + + get_assignees + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_attach_link + (self, print_format) +

+

Returns public link for the attachment via templates/emails/print_link.html.

+
+
+ + + + + +

+ + + get_cc + (self, recipients=None, fetched_from_email_account=False) +

+

Build a list of email addresses for CC

+
+
+ + + + + +

+ + + get_owner_email + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_parent_doc + (self) +

+

Returns document of reference_doctype, reference_doctype

+
+
+ + + + + +

+ + + get_recipients + (self, fetched_from_email_account=False) +

+

Build a list of email addresses for To

+
+
+ + + + + +

+ + + get_recipients_and_cc + (self, recipients, cc, fetched_from_email_account=False) +

+

No docs

+
+
+ + + + + +

+ + + get_starrers + (self) +

+

Return list of users who have starred this document.

+
+
+ + + + + +

+ + + notify + (self, print_html=None, print_format=None, attachments=None, recipients=None, cc=None, fetched_from_email_account=False) +

+

Calls a delayed celery task 'sendmail' that enqueus email in Bulk Email queue

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + on_update + (self) +

+

Update parent status as Open or Replied.

+
+
+ + + + + +

+ + + prepare_to_notify + (self, print_html=None, print_format=None, attachments=None) +

+

Prepare to make multipart MIME Email

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + send + (self, print_html=None, print_format=None, attachments=None, send_me_a_copy=False, recipients=None) +

+

Send communication via Email.

+ +

Parameters:

+ + +
+
+ + + + + +

+ + + set_incoming_outgoing_accounts + (self) +

+

No docs

+
+
+ + + + + +

+ + + update_parent + (self) +

+

Update status of parent document based on who is replying.

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.communication.communication.get_convert_to +

+

+ + + frappe.core.doctype.communication.communication.get_convert_to + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.communication.communication.make +

+

+ + + frappe.core.doctype.communication.communication.make + (doctype=None, name=None, content=None, subject=None, sent_or_received=Sent, sender=None, recipients=None, communication_medium=Email, send_email=False, print_html=None, print_format=None, attachments=[], ignore_doctype_permissions=False, send_me_a_copy=False, cc=None) +

+

Make a new communication.

+ +

Parameters:

+ + +
+
+ + + + + + + +

+ + + frappe.core.doctype.communication.communication.on_doctype_update + () +

+

Add index in tabCommunication for (reference_doctype, reference_name)

+
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/defaultvalue.html b/frappe/docs/current/models/core/defaultvalue.html new file mode 100644 index 0000000000..7f894a984a --- /dev/null +++ b/frappe/docs/current/models/core/defaultvalue.html @@ -0,0 +1,87 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabDefaultValue

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1defkey + Data + Key + +
2defvalue + Text + Value + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/docfield.html b/frappe/docs/current/models/core/docfield.html new file mode 100644 index 0000000000..908ec0ee70 --- /dev/null +++ b/frappe/docs/current/models/core/docfield.html @@ -0,0 +1,541 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabDocField

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1label_and_type + Section Break + + +
2label + Data + Label + +
3fieldtype + Select + Type + + +
Attach
+Attach Image
+Button
+Check
+Code
+Column Break
+Currency
+Data
+Date
+Datetime
+Dynamic Link
+Float
+Fold
+Heading
+HTML
+Image
+Int
+Link
+Long Text
+Password
+Percent
+Read Only
+Section Break
+Select
+Small Text
+Table
+Text
+Text Editor
+Time
+
4fieldname + Data + Name + +
5reqd + Check + Mandatory + +
6precision + Select + Precision +

+ Set non-standard precision for a Float or Currency field

+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+
7length + Int + Length + +
8search_index + Check + Index + +
9in_list_view + Check + In List View + +
10bold + Check + Bold + +
11collapsible + Check + Collapsible + +
12collapsible_depends_on + Small Text + Collapsible Depends On + +
13column_break_6 + Column Break + + +
14options + Text + Options +

+ For Links, enter the DocType as range. +For Select, enter list of Options, each on a new line.

+
15default + Small Text + Default + +
16permissions + Section Break + Permissions + +
17depends_on + Small Text + Depends On + +
18hidden + Check + Hidden + +
19read_only + Check + Read Only + +
20unique + Check + Unique + +
21set_only_once + Check + Set Only Once +

+ Do not allow user to change after set the first time

+
22column_break_13 + Column Break + + +
23permlevel + Int + Perm Level + +
24ignore_user_permissions + Check + Ignore User Permissions +

+ User permissions should not apply for this Link

+
25allow_on_submit + Check + Allow on Submit + +
26report_hide + Check + Report Hide + +
27display + Section Break + Display + +
28in_filter + Check + In Filter + +
29no_copy + Check + No Copy + +
30print_hide + Check + Print Hide + +
31print_width + Data + Print Width + +
32width + Data + Width + +
33column_break_22 + Column Break + + +
34description + Small Text + Description + +
35oldfieldname + Data + + +
36oldfieldtype + Data + + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/docperm.html b/frappe/docs/current/models/core/docperm.html new file mode 100644 index 0000000000..017637d7cf --- /dev/null +++ b/frappe/docs/current/models/core/docperm.html @@ -0,0 +1,376 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabDocPerm

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1role_and_level + Section Break + Role and Level + +
2role + Link + Role + + + + + + +Role + + + +
3apply_user_permissions + Check + Apply User Permissions +

+ Filter records based on User Permissions defined for a user

+
4if_owner + Check + If user is the owner +

+ Apply this rule if the User is the Owner

+
5column_break_2 + Column Break + + +
6permlevel + Int + Level + +
7user_permission_doctypes + Text + User Permission DocTypes +

+ JSON list of DocTypes used to apply User Permissions. If empty, all linked DocTypes will be used to apply User Permissions.

+
8section_break_4 + Section Break + Permissions + +
9read + Check + Read + +
10write + Check + Write + +
11create + Check + Create + +
12delete + Check + Delete + +
13column_break_8 + Column Break + + +
14submit + Check + Submit + +
15cancel + Check + Cancel + +
16amend + Check + Amend + +
17additional_permissions + Section Break + Additional Permissions + +
18report + Check + Report + +
19export + Check + Export + +
20import + Check + Import + +
21set_user_permissions + Check + Set User Permissions +

+ This role update User Permissions for a user

+
22column_break_19 + Column Break + + +
23share + Check + Share + +
24print + Check + Print + +
25email + Check + Email + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/docshare.html b/frappe/docs/current/models/core/docshare.html new file mode 100644 index 0000000000..35b0aa908c --- /dev/null +++ b/frappe/docs/current/models/core/docshare.html @@ -0,0 +1,293 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabDocShare

+ + +Internal record of document shares + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1user + Link + User + + + + + + +User + + + +
2share_doctype + Link + Document Type + + + + + + +DocType + + + +
3share_name + Dynamic Link + Document Name + + +
share_doctype
+
4read + Check + Read + +
5write + Check + Write + +
6share + Check + Share + +
7everyone + Check + Everyone + +
+ + +
+

Controller

+

frappe.core.doctype.docshare.docshare

+ + + + + + + +

Class DocShare

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + after_insert + (self) +

+

No docs

+
+
+ + + + + +

+ + + cascade_permissions_downwards + (self) +

+

No docs

+
+
+ + + + + +

+ + + check_share_permission + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_doc + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_trash + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_user + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.core.doctype.docshare.docshare.on_doctype_update + () +

+

Add index in tabDocShare for (user, share_doctype)

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/file.html b/frappe/docs/current/models/core/file.html new file mode 100644 index 0000000000..f8b752eb95 --- /dev/null +++ b/frappe/docs/current/models/core/file.html @@ -0,0 +1,742 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabFile

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1file_name + Data + File Name + +
2preview + Section Break + Preview + +
3preview_html + HTML + Preview HTML + +
4section_break_5 + Section Break + + +
5is_home_folder + Check + Is Home Folder + +
6is_attachments_folder + Check + Is Attachments Folder + +
7file_size + Int + File Size + +
8column_break_5 + Column Break + + +
9file_url + Data + File URL + +
10thumbnail_url + Data + Thumbnail URL + +
11folder + Link + Folder + + + + + + +File + + + +
12is_folder + Check + Is Folder + +
13section_break_8 + Section Break + + +
14attached_to_doctype + Link + Attached To DocType + + + + + + +DocType + + + +
15column_break_10 + Column Break + + +
16attached_to_name + Data + Attached To Name + +
17content_hash + Data + Content Hash + +
18lft + Int + lft + +
19rgt + Int + rgt + +
20old_parent + Data + old_parent + +
+ + +
+

Controller

+

frappe.core.doctype.file.file

+ + + + + + + +

Class File

+ +

Inherits from frappe.utils.nestedset.NestedSet + +

+
+
+ + + + +

+ + + after_delete + (self) +

+

No docs

+
+
+ + + + + +

+ + + after_insert + (self) +

+

No docs

+
+
+ + + + + +

+ + + after_rename + (self, olddn, newdn, merge=False) +

+

No docs

+
+
+ + + + + +

+ + + before_insert + (self) +

+

No docs

+
+
+ + + + + +

+ + + check_folder_is_empty + (self) +

+

Throw exception if folder is not empty

+
+
+ + + + + +

+ + + check_reference_doc_permission + (self) +

+

Check if permission exists for reference document

+
+
+ + + + + +

+ + + delete_file + (self) +

+

If file not attached to any other record, delete it

+
+
+ + + + + +

+ + + get_folder_size + (self, folder=None) +

+

Returns folder size for current folder

+
+
+ + + + + +

+ + + get_name_based_on_parent_folder + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_successor + (self) +

+

No docs

+
+
+ + + + + +

+ + + make_thumbnail + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_rollback + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_trash + (self) +

+

No docs

+
+
+ + + + + +

+ + + set_folder_name + (self) +

+

Make parent folders if not exists based on reference doctype and name

+
+
+ + + + + +

+ + + set_folder_size + (self) +

+

Set folder size if folder

+
+
+ + + + + +

+ + + set_name + (self) +

+

Set name for folder

+
+
+ + + + + +

+ + + update_parent_folder_size + (self) +

+

Update size of parent folder

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_duplicate_entry + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_folder + (self) +

+

No docs

+
+
+ + +
+
+ + + + + +

Class FolderNotEmpty

+ +

Inherits from frappe.exceptions.ValidationError + +

+
+
+ +
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.file.file.create_new_folder +

+

+ + + frappe.core.doctype.file.file.create_new_folder + (file_name, folder) +

+

create new folder under current parent folder

+
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.file.file.get_breadcrumbs +

+

+ + + frappe.core.doctype.file.file.get_breadcrumbs + (folder) +

+

returns name, file_name of parent folder

+
+
+ + + + + + + +

+ + + frappe.core.doctype.file.file.make_home_folder + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.file.file.move_file +

+

+ + + frappe.core.doctype.file.file.move_file + (file_list, new_parent, old_parent) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.core.doctype.file.file.on_doctype_update + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.core.doctype.file.file.setup_folder_path + (filename, new_parent) +

+

No docs

+
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/index.html b/frappe/docs/current/models/core/index.html new file mode 100644 index 0000000000..c632fc101c --- /dev/null +++ b/frappe/docs/current/models/core/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

DocTypes for core

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/index.txt b/frappe/docs/current/models/core/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/core/module_def.html b/frappe/docs/current/models/core/module_def.html new file mode 100644 index 0000000000..697f6294ee --- /dev/null +++ b/frappe/docs/current/models/core/module_def.html @@ -0,0 +1,175 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabModule Def

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1module_name + Data + Module Name + +
2app_name + Data + App Name + +
+ + +
+

Controller

+

frappe.core.doctype.module_def.module_def

+ + + + + + + +

Class ModuleDef

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + add_to_modules_txt + (self) +

+

Adds to [app]/modules.txt

+
+
+ + + + + +

+ + + create_modules_folder + (self) +

+

Creates a folder [app]/[module] and adds __init__.py

+
+
+ + + + + +

+ + + on_update + (self) +

+

If in developer_mode, create folder for module and +add in modules.txt of app if missing.

+
+
+ + +
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/page.html b/frappe/docs/current/models/core/page.html new file mode 100644 index 0000000000..d182173804 --- /dev/null +++ b/frappe/docs/current/models/core/page.html @@ -0,0 +1,292 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabPage

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1page_html + Section Break + Page HTML + +
2page_name + Data + Page Name + +
3title + Data + Title + +
4icon + Data + icon + +
5column_break0 + Column Break + + +
6module + Link + Module + + + + + + +Module Def + + + +
7standard + Select + Standard + + +
+Yes
+No
+
8section_break0 + Section Break + + +
9roles + Table + Roles + + + + + + +Page Role + + + +
+ + +
+

Controller

+

frappe.core.doctype.page.page

+ + + + + + + +

Class Page

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + as_dict + (self, no_nulls=False) +

+

No docs

+
+
+ + + + + +

+ + + autoname + (self) +

+

Creates a url friendly name for this page. +Will restrict the name to 30 characters, if there exists a similar name, +it will add name-1, name-2 etc.

+
+
+ + + + + +

+ + + is_permitted + (self) +

+

Returns true if Page Role is not set or the user is allowed.

+
+
+ + + + + +

+ + + load_assets + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

Writes the .txt for this page and if write_content is checked, +it will write out a .html file

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/page_role.html b/frappe/docs/current/models/core/page_role.html new file mode 100644 index 0000000000..4075c0b473 --- /dev/null +++ b/frappe/docs/current/models/core/page_role.html @@ -0,0 +1,84 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabPage Role

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1role + Link + Role + + + + + + +Role + + + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/patch_log.html b/frappe/docs/current/models/core/patch_log.html new file mode 100644 index 0000000000..2dea1c8a34 --- /dev/null +++ b/frappe/docs/current/models/core/patch_log.html @@ -0,0 +1,87 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabPatch Log

+ + +List of patches executed + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1patch + Small Text + Patch + +
+ + +
+

Controller

+

frappe.core.doctype.patch_log.patch_log

+ + + + + + + +

Class PatchLog

+ +

Inherits from frappe.model.document.Document + +

+
+
+ +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/report.html b/frappe/docs/current/models/core/report.html new file mode 100644 index 0000000000..b672c5f53d --- /dev/null +++ b/frappe/docs/current/models/core/report.html @@ -0,0 +1,327 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabReport

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1report_name + Data + Report Name + +
2ref_doctype + Link + Ref DocType + + + + + + +DocType + + + +
3is_standard + Select + Is Standard + + +
No
+Yes
+
4module + Link + Module + + + + + + +Module Def + + + +
5add_total_row + Check + Add Total Row + +
6column_break_4 + Column Break + + +
7report_type + Select + Report Type + + +
Report Builder
+Query Report
+Script Report
+
8disabled + Check + Disabled + +
9apply_user_permissions + Check + Apply User Permissions + +
10section_break_6 + Section Break + + +
11query + Code + Query + +
12javascript + Code + Javascript +

+ JavaScript Format: frappe.query_reports['REPORTNAME'] = {}

+
13json + Text + JSON + +
+ + +
+

Controller

+

frappe.core.doctype.report.report

+ + + + + + + +

Class Report

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + create_report_py + (self) +

+

No docs

+
+
+ + + + + +

+ + + export_doc + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + toggle_disable + (self, disable) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

only administrator can save standard report

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/role.html b/frappe/docs/current/models/core/role.html new file mode 100644 index 0000000000..ed0416f6f6 --- /dev/null +++ b/frappe/docs/current/models/core/role.html @@ -0,0 +1,155 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabRole

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1role_name + Data + Role Name + +
+ + +
+

Controller

+

frappe.core.doctype.role.role

+ + + + + + + +

Class Role

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + after_insert + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/scheduler_log.html b/frappe/docs/current/models/core/scheduler_log.html new file mode 100644 index 0000000000..ab0ac78d1c --- /dev/null +++ b/frappe/docs/current/models/core/scheduler_log.html @@ -0,0 +1,141 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabScheduler Log

+ + +Log of Scheduler Errors + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1seen + Check + Seen + +
2method + Data + Method + +
3error + Text + Error + +
+ + +
+

Controller

+

frappe.core.doctype.scheduler_log.scheduler_log

+ + + + + + + +

Class SchedulerLog

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + onload + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.core.doctype.scheduler_log.scheduler_log.set_old_logs_as_seen + () +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/system_settings.html b/frappe/docs/current/models/core/system_settings.html new file mode 100644 index 0000000000..86090b7bf5 --- /dev/null +++ b/frappe/docs/current/models/core/system_settings.html @@ -0,0 +1,391 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ +Single + + + + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1localization + Section Break + + +
2language + Select + Language + + +
Loading...
+
3column_break_3 + Column Break + + +
4time_zone + Select + Time Zone + +
5date_and_number_format + Section Break + + +
6date_format + Select + Date Format + + +
yyyy-mm-dd
+dd-mm-yyyy
+dd/mm/yyyy
+dd.mm.yyyy
+mm/dd/yyyy
+mm-dd-yyyy
+
7column_break_7 + Column Break + + +
8number_format + Select + Number Format + + +
#,###.##
+#.###,##
+# ###.##
+# ###,##
+#'###.##
+#, ###.##
+#,##,###.##
+#,###.###
+#.###
+#,###
+
9float_precision + Select + Float Precision + + +
+2
+3
+4
+5
+6
+
10security + Section Break + Security + +
11session_expiry + Data + Session Expiry +

+ Session Expiry in Hours e.g. 06:00

+
12session_expiry_mobile + Data + Session Expiry Mobile +

+ In Hours

+
13column_break_13 + Column Break + + +
14enable_scheduler + Check + Enable Scheduled Jobs +

+ Run scheduled jobs only if checked

+
15scheduler_last_event + Data + Scheduler Last Event + +
16ignore_user_permissions_if_missing + Check + Ignore User Permissions If Missing +

+ eg. If Apply User Permissions is checked for Report DocType but no User Permissions are defined for Report for a User, then all Reports are shown to that User

+
17email + Section Break + EMail + +
18email_footer_address + Small Text + Email Footer Address +

+ Your organization name and address for the email footer.

+
19column_break_18 + Column Break + + +
20disable_standard_email_footer + Check + Disable Standard Email Footer + +
+ + +
+

Controller

+

frappe.core.doctype.system_settings.system_settings

+ + + + + + + +

Class SystemSettings

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.system_settings.system_settings.load +

+

+ + + frappe.core.doctype.system_settings.system_settings.load + () +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/user.html b/frappe/docs/current/models/core/user.html new file mode 100644 index 0000000000..249c3d2dab --- /dev/null +++ b/frappe/docs/current/models/core/user.html @@ -0,0 +1,1535 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabUser

+ + +Represents a User in the system. + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1sb0_5 + Section Break + + +
2enabled + Check + Enabled + +
3section_break_3 + Section Break + + +
4email + Data + Email + + +
Email
+
5first_name + Data + First Name + +
6middle_name + Data + Middle Name (Optional) + +
7last_name + Data + Last Name + +
8send_welcome_email + Check + Send Welcome Email + +
9unsubscribed + Check + Unsubscribed + +
10column_break0 + Column Break + + +
11language + Select + Language + + +
Loading...
+
12time_zone + Select + Timezone + +
13change_password + Section Break + + +
14new_password + Password + Set New Password + +
15send_password_update_notification + Check + Send Password Update Notification + +
16reset_password_key + Data + Reset Password Key + +
17display_settings + Section Break + + +
18user_image + Attach + User Image +

+ Get your globally recognized avatar from Gravatar.com

+
19cb21 + Column Break + + +
20user_image_show + Image + user_image_show + + +
user_image
+
21email_settings + Section Break + Email Settings + +
22thread_notify + Check + Send Notifications for Transactions I Follow + +
23email_signature + Small Text + Email Signature + +
24background + Section Break + + +
25background_image + Attach + Background Image + +
26background_style + Select + Background Style + + +
Fill Screen
+Tile
+
27short_bio + Section Break + + +
28gender + Select + Gender + + +
+Male
+Female
+Other
+
29birth_date + Date + Birth Date + +
30location + Data + Location + +
31column_break_22 + Column Break + + +
32bio + Small Text + Bio + +
33sb1 + Section Break + Roles +

+ Check / Uncheck roles assigned to the User. Click on the Role to find out what permissions that Role has.

+
34roles_html + HTML + Roles HTML + +
35user_roles + Table + Roles Assigned + + + + + + +UserRole + + + +
36modules_access + Section Break + Modules Access +

+ Uncheck modules to hide from user's desktop

+
37modules_html + HTML + Modules HTML + +
38block_modules + Table + Block Modules + + + + + + +Block Module + + + +
39sb2 + Section Break + Defaults +

+ These values will be automatically updated in transactions and also will be useful to restrict permissions for this user on transactions containing these values.

+
40defaults + Table + User Defaults +

+ Enter default value fields (keys) and values. If you add multiple values for a field, the first one will be picked. These defaults are also used to set "match" permission rules. To see list of fields, go to "Customize Form".

+
+ + + + +DefaultValue + + + +
41sb3 + Section Break + Security Settings + +
42user_type + Select + User Type +

+ User Type "System User" can access Desktop. "Website User" can only be logged into the website and portal pages.

+
+
System User
+Website User
+
43login_after + Int + Login After +

+ Allow user to login only after this hour (0-24)

+
44login_before + Int + Login Before +

+ Allow user to login only before this hour (0-24)

+
45restrict_ip + Data + Restrict IP +

+ Restrict user from this IP address only. Multiple IP addresses can be added by separating with commas. Also accepts partial IP addresses like (111.111.111)

+
46column_break1 + Column Break + + +
47last_login + Read Only + Last Login + +
48last_ip + Read Only + Last IP + +
49last_known_versions + Text + Last Known Versions +

+ Stores the JSON of last known versions of various installed apps. It is used to show release notes.

+
50third_party_authentication + Section Break + Third Party Authentication + +
51fb_username + Data + Facebook Username + +
52fb_userid + Data + Facebook User ID + +
53google_userid + Data + Google User ID + +
54column_break_49 + Column Break + + +
55github_userid + Data + Github User ID + +
56github_username + Data + Github Username + +
+ + +
+

Controller

+

frappe.core.doctype.user.user

+ + + + + + + +

Class User

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + a_system_manager_should_exist + (self) +

+

No docs

+
+
+ + + + + +

+ + + add_roles + (self) +

+

Add roles to user and save

+
+
+ + + + + +

+ + + add_system_manager_role + (self) +

+

No docs

+
+
+ + + + + +

+ + + after_rename + (self, olddn, newdn, merge=False) +

+

No docs

+
+
+ + + + + +

+ + + append_roles + (self) +

+

Add roles to user

+
+
+ + + + + +

+ + + autoname + (self) +

+

set name as email id

+
+
+ + + + + +

+ + + before_rename + (self, olddn, newdn, merge=False) +

+

No docs

+
+
+ + + + + +

+ + + check_enable_disable + (self) +

+

No docs

+
+
+ + + + + +

+ + + email_new_password + (self, new_password=None) +

+

No docs

+
+
+ + + + + +

+ + + ensure_unique_roles + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_fullname + (self) +

+

get firstname space lastname

+
+
+ + + + + +

+ + + get_other_system_managers + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_trash + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + password_reset_mail + (self, link) +

+

No docs

+
+
+ + + + + +

+ + + password_update_mail + (self, password) +

+

No docs

+
+
+ + + + + +

+ + + remove_all_roles_for_guest + (self) +

+

No docs

+
+
+ + + + + +

+ + + remove_roles + (self) +

+

No docs

+
+
+ + + + + +

+ + + reset_password + (self) +

+

No docs

+
+
+ + + + + +

+ + + send_login_mail + (self, subject, template, add_args) +

+

send mail with login details

+
+
+ + + + + +

+ + + send_password_notifcation + (self, new_password) +

+

No docs

+
+
+ + + + + +

+ + + send_welcome_mail_to_user + (self) +

+

No docs

+
+
+ + + + + +

+ + + share_with_self + (self) +

+

No docs

+
+
+ + + + + +

+ + + update_gravatar + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_email_type + (self, email) +

+

No docs

+
+
+ + + + + +

+ + + validate_rename + (self, olddn, newdn) +

+

No docs

+
+
+ + + + + +

+ + + validate_share + (self, docshare) +

+

No docs

+
+
+ + + + + +

+ + + validate_system_manager_user_type + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.core.doctype.user.user.get_active_users + () +

+

Returns No. of system users who logged in, in the last 3 days

+
+
+ + + + + + + +

+ + + frappe.core.doctype.user.user.get_active_website_users + () +

+

Returns No. of website users who logged in, in the last 3 days

+
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.user.user.get_all_roles +

+

+ + + frappe.core.doctype.user.user.get_all_roles + (arg=None) +

+

return all roles

+
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.user.user.get_languages +

+

+ + + frappe.core.doctype.user.user.get_languages + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.user.user.get_perm_info +

+

+ + + frappe.core.doctype.user.user.get_perm_info + (arg=None) +

+

get permission info

+
+
+ + + + + + + +

+ + + frappe.core.doctype.user.user.get_permission_query_conditions + (user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.core.doctype.user.user.get_system_users + (exclude_users=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.core.doctype.user.user.get_total_users + (exclude_users=None) +

+

Returns total no. of system users

+
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.user.user.get_user_roles +

+

+ + + frappe.core.doctype.user.user.get_user_roles + (arg=None) +

+

get roles for a user

+
+
+ + + + + + + +

+ + + frappe.core.doctype.user.user.get_website_users + () +

+

Returns total no. of website users

+
+
+ + + + + + + +

+ + + frappe.core.doctype.user.user.has_permission + (doc, user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.core.doctype.user.user.notifify_admin_access_to_system_manager + (login_manager=None) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.user.user.reset_password +

+

+ + + frappe.core.doctype.user.user.reset_password + (user) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.user.user.sign_up +

+

+ + + frappe.core.doctype.user.user.sign_up + (email, full_name) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.user.user.update_password +

+

+ + + frappe.core.doctype.user.user.update_password + (new_password, key=None, old_password=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.core.doctype.user.user.user_query + (doctype, txt, searchfield, start, page_len, filters) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.user.user.verify_password +

+

+ + + frappe.core.doctype.user.user.verify_password + (password) +

+

No docs

+
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/userrole.html b/frappe/docs/current/models/core/userrole.html new file mode 100644 index 0000000000..a9e0b6c81b --- /dev/null +++ b/frappe/docs/current/models/core/userrole.html @@ -0,0 +1,84 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabUserRole

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1role + Link + Role + + + + + + +Role + + + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/core/version.html b/frappe/docs/current/models/core/version.html new file mode 100644 index 0000000000..89c10641d5 --- /dev/null +++ b/frappe/docs/current/models/core/version.html @@ -0,0 +1,138 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabVersion

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1ref_doctype + Link + Ref DocType + + + + + + +DocType + + + +
2docname + Data + Docname + +
3doclist_json + Code + Doclist JSON + +
+ + +
+

Controller

+

frappe.core.doctype.version.version

+ + + + + + + +

Class Version

+ +

Inherits from frappe.model.document.Document + +

+
+
+ +
+
+ + + + + + +

Public API +
/api/method/frappe.core.doctype.version.version.restore +

+

+ + + frappe.core.doctype.version.version.restore + (version) +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/custom/custom_field.html b/frappe/docs/current/models/custom/custom_field.html new file mode 100644 index 0000000000..cd421bf3e5 --- /dev/null +++ b/frappe/docs/current/models/custom/custom_field.html @@ -0,0 +1,594 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabCustom Field

+ + +Adds a custom field to a DocType + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1dt + Link + Document + + + + + + +DocType + + + +
2label + Data + Label + +
3label_help + HTML + Label Help + +
4insert_after + Select + Insert After +

+ Select the label after which you want to insert new field.

+
5fieldtype + Select + Field Type + + +
Attach
+Button
+Check
+Code
+Column Break
+Currency
+Data
+Date
+Datetime
+Dynamic Link
+Float
+HTML
+Image
+Int
+Link
+Long Text
+Password
+Percent
+Read Only
+Section Break
+Select
+Small Text
+Table
+Text
+Text Editor
+Time
+
6precision + Select + Precision +

+ Set non-standard precision for a Float or Currency field

+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+
7options_help + HTML + Options Help + +
8options + Text + Options + +
9description + Text + Field Description + +
10fieldname + Data + Fieldname + +
11properties + Column Break + Properties + +
12permlevel + Int + Permission Level + +
13reqd + Check + Is Mandatory Field + +
14unique + Check + Unique + +
15read_only + Check + Read Only + +
16ignore_user_permissions + Check + Ignore User Permissions + +
17width + Data + Width + +
18default + Text + Default Value + +
19hidden + Check + Hidden + +
20depends_on + Small Text + Depends On + +
21print_hide + Check + Print Hide + +
22print_width + Data + Print Width + +
23no_copy + Check + No Copy + +
24allow_on_submit + Check + Allow on Submit + +
25in_filter + Check + In Report Filter + +
26in_list_view + Check + In List View + +
27report_hide + Check + Report Hide + +
28search_index + Check + Index + +
+ + +
+

Controller

+

frappe.custom.doctype.custom_field.custom_field

+ + + + + + + +

Class CustomField

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + autoname + (self) +

+

No docs

+
+
+ + + + + +

+ + + create_property_setter + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_trash + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + set_fieldname + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.custom.doctype.custom_field.custom_field.create_custom_field + (doctype, df) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.custom.doctype.custom_field.custom_field.create_custom_field_if_values_exist + (doctype, df) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.custom.doctype.custom_field.custom_field.get_fields_label +

+

+ + + frappe.custom.doctype.custom_field.custom_field.get_fields_label + (doctype=None) +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/custom/custom_script.html b/frappe/docs/current/models/custom/custom_script.html new file mode 100644 index 0000000000..55ca35adef --- /dev/null +++ b/frappe/docs/current/models/custom/custom_script.html @@ -0,0 +1,178 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabCustom Script

+ + +Adds a custom script (client or server) to a DocType + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1dt + Link + DocType + + + + + + +DocType + + + +
2script_type + Select + Script Type + + +
Client
+
3script + Code + Script + + +
Script
+
4sample + HTML + Sample + +
+ + +
+

Controller

+

frappe.custom.doctype.custom_script.custom_script

+ + + + + + + +

Class CustomScript

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + autoname + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_trash + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/custom/customize_form.html b/frappe/docs/current/models/custom/customize_form.html new file mode 100644 index 0000000000..d0c90d14c8 --- /dev/null +++ b/frappe/docs/current/models/custom/customize_form.html @@ -0,0 +1,471 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ +Single + + + + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1doc_type + Link + Enter Form Type + + + + + + +DocType + + + +
2properties + Section Break + + +
3default_print_format + Link + Default Print Format + + + + + + +Print Format + + + +
4search_fields + Data + Search Fields +

+ Fields separated by comma (,) will be included in the "Search By" list of Search dialog box

+
5column_break_5 + Column Break + + +
6max_attachments + Int + Max Attachments + +
7allow_copy + Check + Hide Copy + +
8section_break_8 + Section Break + + +
9sort_field + Select + Sort Field + +
10column_break_10 + Column Break + + +
11sort_order + Select + Sort Order + + +
ASC
+DESC
+
12fields_section_break + Section Break + Fields +

+ Customize Label, Print Hide, Default etc.

+
13fields + Table + Fields + + + + + + +Customize Form Field + + + +
+ + +
+

Controller

+

frappe.custom.doctype.customize_form.customize_form

+ + + + + + + +

Class CustomizeForm

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + add_custom_field + (self, df) +

+

No docs

+
+
+ + + + + +

+ + + clear_existing_doc + (self) +

+

No docs

+
+
+ + + + + +

+ + + delete_custom_fields + (self) +

+

No docs

+
+
+ + + + + +

+ + + delete_existing_property_setter + (self, property, fieldname=None) +

+

No docs

+
+
+ + + + + +

+ + + fetch_to_customize + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_existing_property_value + (self, property_name, fieldname=None) +

+

No docs

+
+
+ + + + + +

+ + + make_property_setter + (self, property, value, property_type, fieldname=None) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + reset_to_defaults + (self) +

+

No docs

+
+
+ + + + + +

+ + + save_customization + (self) +

+

No docs

+
+
+ + + + + +

+ + + set_idx_property_setter + (self) +

+

No docs

+
+
+ + + + + +

+ + + set_property_setters + (self) +

+

No docs

+
+
+ + + + + +

+ + + update_custom_fields + (self) +

+

No docs

+
+
+ + + + + +

+ + + update_in_custom_field + (self, df) +

+

No docs

+
+
+ + + + + +

+ + + validate_fieldtype_change + (self, df, old_value, new_value) +

+

No docs

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/custom/customize_form_field.html b/frappe/docs/current/models/custom/customize_form_field.html new file mode 100644 index 0000000000..b2a45542e6 --- /dev/null +++ b/frappe/docs/current/models/custom/customize_form_field.html @@ -0,0 +1,484 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabCustomize Form Field

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1label_and_type + Section Break + Label and Type + +
2label + Data + Label + +
3fieldtype + Select + Type + + +
Attach
+Attach Image
+Button
+Check
+Code
+Column Break
+Currency
+Data
+Date
+Datetime
+Dynamic Link
+Float
+Fold
+Heading
+HTML
+Image
+Int
+Link
+Long Text
+Password
+Percent
+Read Only
+Section Break
+Select
+Small Text
+Table
+Text
+Text Editor
+Time
+
4fieldname + Data + Name + +
5reqd + Check + Mandatory + +
6unique + Check + Unique + +
7in_list_view + Check + In List View + +
8column_break_7 + Column Break + + +
9precision + Select + Precision +

+ Set non-standard precision for a Float or Currency field

+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+
10length + Int + Length + +
11options + Text + Options +

+ For Links, enter the DocType as range. +For Select, enter list of Options, each on a new line.

+
12permissions + Section Break + Permissions + +
13depends_on + Data + Depends On +

+ This field will appear only if the fieldname defined here has value OR the rules are true (examples): +myfield +eval:doc.myfield=='My Value' +eval:doc.age>18

+
14permlevel + Int + Perm Level + +
15hidden + Check + Hidden + +
16read_only + Check + Read Only + +
17collapsible + Check + Collapsible + +
18collapsible_depends_on + Data + Collapsible Depends On + +
19column_break_14 + Column Break + + +
20ignore_user_permissions + Check + Ignore User Permissions + +
21allow_on_submit + Check + Allow on Submit + +
22report_hide + Check + Report Hide + +
23display + Section Break + Display + +
24default + Text + Default + +
25in_filter + Check + In Filter + +
26column_break_21 + Column Break + + +
27description + Text + Description + +
28print_hide + Check + Print Hide + +
29print_width + Data + Print Width +

+ Print Width of the field, if the field is a column in a table

+
30width + Data + Width + +
31is_custom_field + Check + Is Custom Field + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/custom/index.html b/frappe/docs/current/models/custom/index.html new file mode 100644 index 0000000000..f52615c25b --- /dev/null +++ b/frappe/docs/current/models/custom/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

DocTypes for custom

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/custom/index.txt b/frappe/docs/current/models/custom/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/custom/property_setter.html b/frappe/docs/current/models/custom/property_setter.html new file mode 100644 index 0000000000..63d1c35562 --- /dev/null +++ b/frappe/docs/current/models/custom/property_setter.html @@ -0,0 +1,324 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabProperty Setter

+ + +Property Setter overrides a standard DocType or Field property + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1help + HTML + Help + +
2sb0 + Section Break + + +
3doctype_or_field + Select + DocType or Field + + +
+DocField
+DocType
+
4value + Text + Set Value +

+ New value to be set

+
5column_break0 + Column Break + + +
6doc_type + Link + DocType + + + + + + +DocType + + + +
7field_name + Data + Field Name +

+ ID (name) of the entity whose property is to be set

+
8property + Data + Property + +
9property_type + Data + Property Type + +
10default_value + Data + Default Value + +
+ + +
+

Controller

+

frappe.custom.doctype.property_setter.property_setter

+ + + + + + + +

Class PropertySetter

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + autoname + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_defaults + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_field_ids + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_property_list + (self, dt) +

+

No docs

+
+
+ + + + + +

+ + + get_setup_data + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

delete other property setters on this, if this is new

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.custom.doctype.property_setter.property_setter.make_property_setter + (doctype, fieldname, property, value, property_type, for_doctype=False, validate_fields_for_doctype=True) +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/desk/event.html b/frappe/docs/current/models/desk/event.html new file mode 100644 index 0000000000..57f80235a0 --- /dev/null +++ b/frappe/docs/current/models/desk/event.html @@ -0,0 +1,536 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabEvent

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1details + Section Break + + +
2subject + Data + Subject + +
3event_type + Select + Event Type + + +
Private
+Public
+Cancel
+
4send_reminder + Check + Send an email reminder in the morning + +
5column_break_4 + Column Break + + +
6starts_on + Datetime + Starts on + +
7ends_on + Datetime + Ends on + +
8all_day + Check + All Day + +
9section_break_8 + Section Break + + +
10repeat_this_event + Check + Repeat this Event + +
11section_break_11 + Section Break + + +
12repeat_on + Select + Repeat On + + +
+Every Day
+Every Week
+Every Month
+Every Year
+
13repeat_till + Date + Repeat Till +

+ Leave blank to repeat always

+
14column_break_11 + Column Break + + +
15monday + Check + Monday + +
16tuesday + Check + Tuesday + +
17wednesday + Check + Wednesday + +
18thursday + Check + Thursday + +
19friday + Check + Friday + +
20saturday + Check + Saturday + +
21sunday + Check + Sunday + +
22section_break_6 + Section Break + + +
23description + Text Editor + Description + +
24participants + Section Break + Participants + +
25groups + Column Break + Groups + +
26roles + Table + Roles + + + + + + +Event Role + + + +
27ref_type + Link + Ref Type + + + + + + +DocType + + + +
28ref_name + Dynamic Link + Ref Name + + +
ref_type
+
+ + +
+

Controller

+

frappe.desk.doctype.event.event

+ + + + + + + +

Class Event

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + get_route + (self) +

+

for test-case

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + +

Public API +
/api/method/frappe.desk.doctype.event.event.get_events +

+

+ + + frappe.desk.doctype.event.event.get_events + (start, end, user=None, for_reminder=False) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.doctype.event.event.get_permission_query_conditions + (user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.doctype.event.event.has_permission + (doc, user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.doctype.event.event.send_event_digest + () +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/desk/event_role.html b/frappe/docs/current/models/desk/event_role.html new file mode 100644 index 0000000000..b28962b637 --- /dev/null +++ b/frappe/docs/current/models/desk/event_role.html @@ -0,0 +1,84 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabEvent Role

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1role + Link + Role + + + + + + +Role + + + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/desk/feed.html b/frappe/docs/current/models/desk/feed.html new file mode 100644 index 0000000000..8d59a50ace --- /dev/null +++ b/frappe/docs/current/models/desk/feed.html @@ -0,0 +1,233 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabFeed

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1feed_type + Select + Feed Type + + +
+Comment
+Login
+Label
+Info
+
2doc_type + Data + Doc Type + +
3doc_name + Data + Doc Name + +
4subject + Small Text + Subject + +
5color + Data + Color + +
6full_name + Data + Full Name + +
+ + +
+

Controller

+

frappe.desk.doctype.feed.feed

+ + + + + + + +

Class Feed

+ +

Inherits from frappe.model.document.Document + +

+
+
+ +
+
+ + + + + + + +

+ + + frappe.desk.doctype.feed.feed.get_permission_query_conditions + (user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.doctype.feed.feed.has_permission + (doc, user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.doctype.feed.feed.login_feed + (login_manager) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.doctype.feed.feed.on_doctype_update + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.doctype.feed.feed.update_feed + (doc, method=None) +

+

adds a new feed

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/desk/index.html b/frappe/docs/current/models/desk/index.html new file mode 100644 index 0000000000..8f309f5645 --- /dev/null +++ b/frappe/docs/current/models/desk/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

DocTypes for desk

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/desk/index.txt b/frappe/docs/current/models/desk/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/desk/note.html b/frappe/docs/current/models/desk/note.html new file mode 100644 index 0000000000..c7e2605268 --- /dev/null +++ b/frappe/docs/current/models/desk/note.html @@ -0,0 +1,173 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabNote

+ + +Note is a free page where users can share documents / notes + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1title + Data + Title + +
2public + Check + Public +

+ Everyone can read

+
3content + Text Editor + Content +

+ Help: To link to another record in the system, use "#Form/Note/[Note Name]" as the Link URL. (don't use "http://")

+
+ + +
+

Controller

+

frappe.desk.doctype.note.note

+ + + + + + + +

Class Note

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + autoname + (self) +

+

No docs

+
+
+ + + + + +

+ + + before_print + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.desk.doctype.note.note.get_permission_query_conditions + (user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.doctype.note.note.has_permission + (doc, ptype, user) +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/desk/todo.html b/frappe/docs/current/models/desk/todo.html new file mode 100644 index 0000000000..54c5ab1b91 --- /dev/null +++ b/frappe/docs/current/models/desk/todo.html @@ -0,0 +1,406 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabToDo

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1description_and_status + Section Break + Description and Status + +
2description + Text + Description + +
3column_break_2 + Column Break + + +
4status + Select + Status + + +
Open
+Closed
+
5priority + Select + Priority + + +
High
+Medium
+Low
+
6date + Date + Due Date + +
7owner + Link + Allocated To + + + + + + +User + + + +
8section_break_6 + Section Break + Reference + +
9reference_type + Link + Reference Type + + + + + + +DocType + + + +
10reference_name + Dynamic Link + Reference Name + + +
reference_type
+
11column_break_10 + Column Break + + +
12role + Link + Role + + + + + + +Role + + + +
13assigned_by + Link + Assigned By + + + + + + +User + + + +
14sender + Data + Sender + +
+ + +
+

Controller

+

frappe.desk.doctype.todo.todo

+ + + + + + + +

Class ToDo

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + add_assign_comment + (self, text, comment_type) +

+

No docs

+
+
+ + + + + +

+ + + on_trash + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + update_in_reference + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.desk.doctype.todo.todo.get_permission_query_conditions + (user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.doctype.todo.todo.has_permission + (doc, user) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.desk.doctype.todo.todo.on_doctype_update + () +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/doctype/index.html b/frappe/docs/current/models/doctype/index.html new file mode 100644 index 0000000000..d970087781 --- /dev/null +++ b/frappe/docs/current/models/doctype/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

DocTypes for doctype

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/doctype/index.txt b/frappe/docs/current/models/doctype/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/email/bulk_email.html b/frappe/docs/current/models/email/bulk_email.html new file mode 100644 index 0000000000..8efd8f1860 --- /dev/null +++ b/frappe/docs/current/models/email/bulk_email.html @@ -0,0 +1,216 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabBulk Email

+ + +Bulk Email records. + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1sender + Data + Sender + +
2recipient + Data + Recipient + +
3message + Code + Message + +
4status + Select + Status + + +
+Not Sent
+Sending
+Sent
+Error
+
5error + Text + Error + +
6reference_doctype + Link + Reference DocType + + + + + + +DocType + + + +
7reference_name + Data + Reference DocName + +
8send_after + Datetime + Send After + +
9priority + Int + Priority + +
+ + +
+

Controller

+

frappe.email.doctype.bulk_email.bulk_email

+ + + + + + + +

Class BulkEmail

+ +

Inherits from frappe.model.document.Document + +

+
+
+ +
+
+ + + + + + +

Public API +
/api/method/frappe.email.doctype.bulk_email.bulk_email.retry_sending +

+

+ + + frappe.email.doctype.bulk_email.bulk_email.retry_sending + (name) +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/email/email_account.html b/frappe/docs/current/models/email/email_account.html new file mode 100644 index 0000000000..b2a5a0b079 --- /dev/null +++ b/frappe/docs/current/models/email/email_account.html @@ -0,0 +1,751 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabEmail Account

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1email_settings + Section Break + + +
2service + Select + Service + + +
+GMail
+Yahoo Mail
+Outlook.com
+
3email_id + Data + Email Id + + +
Email
+
4login_id_is_different + Check + Login Id is Different + +
5login_id + Data + Login Id + +
6password + Password + Password + +
7email_account_name + Data + Email Account Name +

+ e.g. "Support", "Sales", "Jerry Yang"

+
8mailbox_settings + Section Break + + +
9enable_incoming + Check + Enable Incoming +

+ Check this to pull emails from your mailbox

+
10pop3_server + Data + POP3 Server +

+ e.g. pop.gmail.com

+
11use_ssl + Check + Use SSL + +
12attachment_limit + Int + Attachment Limit (MB) +

+ Ignore attachments over this size

+
13append_to + Link + Append To +

+ Append as communication against this DocType (must have fields, "Status", "Subject")

+
+ + + + +DocType + + + +
14default_incoming + Check + Default Incoming +

+ e.g. replies@yourcomany.com. All replies will come to this inbox.

+
15section_break_13 + Section Break + + +
16notify_if_unreplied + Check + Notify if unreplied + +
17unreplied_for_mins + Int + Notify if unreplied for (in mins) + +
18send_notification_to + Small Text + Send Notification to +

+ Email Ids

+
19outgoing_mail_settings + Section Break + + +
20enable_outgoing + Check + Enable Outgoing +

+ SMTP Settings for outgoing emails

+
21smtp_server + Data + SMTP Server +

+ e.g. smtp.gmail.com

+
22use_tls + Check + Use TLS + +
23smtp_port + Data + Port +

+ If non standard port (e.g. 587)

+
24default_outgoing + Check + Default Outgoing +

+ Notifications and bulk mails will be sent from this outgoing server.

+
25always_use_account_email_id_as_sender + Check + Always use Account's Email ID as Sender +

+ Uses the Email ID mentioned in this Account as the Sender for all emails sent using this Account.

+
26signature_section + Section Break + + +
27add_signature + Check + Add Signature + +
28signature + Text Editor + Signature + +
29auto_reply + Section Break + + +
30enable_auto_reply + Check + Enable Auto Reply + +
31auto_reply_message + Text Editor + Auto Reply Message +

+ ProTip: Add Reference: {{ reference_doctype }} {{ reference_name }} to send document reference

+
32set_footer + Section Break + + +
33footer + Text Editor + Footer + +
+ + +
+

Controller

+

frappe.email.doctype.email_account.email_account

+ + + + + + + +

Class EmailAccount

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + autoname + (self) +

+

Set name as email_account_name or make title from email id.

+
+
+ + + + + +

+ + + check_smtp + (self) +

+

Checks SMTP settings.

+
+
+ + + + + +

+ + + get_pop3 + (self) +

+

Returns logged in POP3 connection object.

+
+
+ + + + + +

+ + + get_unreplied_notification_emails + (self) +

+

Return list of emails listed

+
+
+ + + + + +

+ + + insert_communication + (self, raw) +

+

No docs

+
+
+ + + + + +

+ + + on_trash + (self) +

+

Clear communications where email account is linked

+
+
+ + + + + +

+ + + on_update + (self) +

+

Check there is only one default of each type.

+
+
+ + + + + +

+ + + receive + (self, test_mails=None) +

+

Called by scheduler to receive emails from this EMail account using POP3.

+
+
+ + + + + +

+ + + send_auto_reply + (self, communication, email) +

+

Send auto reply if set.

+
+
+ + + + + +

+ + + set_thread + (self, communication, email) +

+

Appends communication to parent based on thread ID. Will extract +parent communication and will link the communication to the reference of that +communication. Also set the status of parent transaction to Open or Replied.

+ +

If no thread id is found and append_to is set for the email account, +it will create a new parent transaction (e.g. Issue)

+
+
+ + + + + +

+ + + there_must_be_only_one_default + (self) +

+

If current Email Account is default, un-default all other accounts.

+
+
+ + + + + +

+ + + validate + (self) +

+

Validate email id and check POP3 and SMTP connections is enabled.

+
+
+ + +
+
+ + + + + +

Class SentEmailInInbox

+ +

Inherits from exceptions.Exception + +

+
+
+ +
+
+ + + + + + +

Public API +
/api/method/frappe.email.doctype.email_account.email_account.get_append_to +

+

+ + + frappe.email.doctype.email_account.email_account.get_append_to + (doctype=None, txt=None, searchfield=None, start=None, page_len=None, filters=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.email.doctype.email_account.email_account.notify_unreplied + () +

+

Sends email notifications if there are unreplied Communications +and notify_if_unreplied is set as true.

+
+
+ + + + + + + +

+ + + frappe.email.doctype.email_account.email_account.pull + (now=False) +

+

Will be called via scheduler, pull emails from all enabled POP3 email accounts.

+
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/email/email_alert.html b/frappe/docs/current/models/email/email_alert.html new file mode 100644 index 0000000000..a06ceef6d0 --- /dev/null +++ b/frappe/docs/current/models/email/email_alert.html @@ -0,0 +1,387 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabEmail Alert

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1enabled + Check + Enabled + +
2filters + Section Break + Filters + +
3subject + Data + Subject +

+ To add dynamic subject, use jinja tags like + +

{{ doc.name }} Delivered

+
4document_type + Link + Document Type + + + + + + +DocType + + + +
5event + Select + Send Alert On + + +
+New
+Save
+Submit
+Cancel
+Days After
+Days Before
+Value Change
+
6date_changed + Select + Reference Date +

+ Send alert if date matches this field's value

+
7days_in_advance + Int + Days Before or After +

+ Send days before or after the reference date

+
8value_changed + Select + Value Changed +

+ Send alert if this field's value changes

+
9condition + Data + Condition +

+ Optional: The alert will be sent if this expression is true

+
10column_break_6 + Column Break + + +
11html_7 + HTML + + +
12column_break_5 + Section Break + Recipients + +
13recipients + Table + Recipients + + + + + + +Email Alert Recipient + + + +
14message_sb + Section Break + Message + +
15message + Text + Message + +
16attach_print + Check + Attach Print + +
17message_examples + HTML + Message Examples + +
18view_properties + Button + View Properties (via Customize Form) + +
+ + +
+

Controller

+

frappe.email.doctype.email_alert.email_alert

+ + + + + + + +

Class EmailAlert

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.email.doctype.email_alert.email_alert.evaluate_alert + (doc, alert, event) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.email.doctype.email_alert.email_alert.trigger_daily_alerts + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.email.doctype.email_alert.email_alert.trigger_email_alerts + (doc, method=None) +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/email/email_alert_recipient.html b/frappe/docs/current/models/email/email_alert_recipient.html new file mode 100644 index 0000000000..d76df655b5 --- /dev/null +++ b/frappe/docs/current/models/email/email_alert_recipient.html @@ -0,0 +1,102 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabEmail Alert Recipient

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1email_by_document_field + Select + Email By Document Field +

+ Optional: Alert will only be sent if value is a valid email id.

+
2cc + Text + CC +

+ Optional: Always send to these ids. Each email id on a new row

+
3condition + Data + Condition +

+ Expression, Optional

+
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/email/email_unsubscribe.html b/frappe/docs/current/models/email/email_unsubscribe.html new file mode 100644 index 0000000000..65ff06af89 --- /dev/null +++ b/frappe/docs/current/models/email/email_unsubscribe.html @@ -0,0 +1,162 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabEmail Unsubscribe

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1email + Data + Email + +
2reference_doctype + Link + Reference DocType + + + + + + +DocType + + + +
3reference_name + Dynamic Link + Reference Name + + +
reference_doctype
+
4global_unsubscribe + Check + Global Unsubscribe + +
+ + +
+

Controller

+

frappe.email.doctype.email_unsubscribe.email_unsubscribe

+ + + + + + + +

Class EmailUnsubscribe

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/email/index.html b/frappe/docs/current/models/email/index.html new file mode 100644 index 0000000000..0a01a8256a --- /dev/null +++ b/frappe/docs/current/models/email/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

DocTypes for email

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/email/index.txt b/frappe/docs/current/models/email/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/email/standard_reply.html b/frappe/docs/current/models/email/standard_reply.html new file mode 100644 index 0000000000..513a6a6d85 --- /dev/null +++ b/frappe/docs/current/models/email/standard_reply.html @@ -0,0 +1,120 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabStandard Reply

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1subject + Data + Subject + +
2response + Text Editor + Response + +
3owner + Link + Owner + + + + + + +User + + + +
+ + +
+

Controller

+

frappe.email.doctype.standard_reply.standard_reply

+ + + + + + + +

Class StandardReply

+ +

Inherits from frappe.model.document.Document + +

+
+
+ +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/geo/country.html b/frappe/docs/current/models/geo/country.html new file mode 100644 index 0000000000..e60f23ba9e --- /dev/null +++ b/frappe/docs/current/models/geo/country.html @@ -0,0 +1,123 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabCountry

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1country_name + Data + Country Name + +
2date_format + Data + Date Format + +
3time_zones + Text + Time Zones + +
4code + Data + Code + +
+ + +
+

Controller

+

frappe.geo.doctype.country.country

+ + + + + + + +

Class Country

+ +

Inherits from frappe.model.document.Document + +

+
+
+ +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/geo/currency.html b/frappe/docs/current/models/geo/currency.html new file mode 100644 index 0000000000..bc09023262 --- /dev/null +++ b/frappe/docs/current/models/geo/currency.html @@ -0,0 +1,178 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabCurrency

+ + +**Currency** Master + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1currency_name + Data + Currency Name + +
2enabled + Check + Enabled + +
3fraction + Data + Fraction +

+ Sub-currency. For e.g. "Cent"

+
4fraction_units + Int + Fraction Units +

+ 1 Currency = [?] Fraction +For e.g. 1 USD = 100 Cent

+
5symbol + Data + Symbol +

+ A symbol for this currency. For e.g. $

+
6number_format + Select + Number Format +

+ How should this currency be formatted? If not set, will use system defaults

+
+
+#,###.##
+#.###,##
+# ###.##
+# ###,##
+#'###.##
+#, ###.##
+#,##,###.##
+#,###.###
+#.###
+#,###
+
+ + +
+

Controller

+

frappe.geo.doctype.currency.currency

+ + + + + + + +

Class Currency

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/geo/index.html b/frappe/docs/current/models/geo/index.html new file mode 100644 index 0000000000..c39a362f8b --- /dev/null +++ b/frappe/docs/current/models/geo/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

DocTypes for geo

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/geo/index.txt b/frappe/docs/current/models/geo/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/index.html b/frappe/docs/current/models/index.html new file mode 100644 index 0000000000..6b35ed9694 --- /dev/null +++ b/frappe/docs/current/models/index.html @@ -0,0 +1,21 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

Browse DocTypes by Module

+ +

Contents

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/index.txt b/frappe/docs/current/models/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/integrations/dropbox_backup.html b/frappe/docs/current/models/integrations/dropbox_backup.html new file mode 100644 index 0000000000..d6f88c46ef --- /dev/null +++ b/frappe/docs/current/models/integrations/dropbox_backup.html @@ -0,0 +1,326 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ +Single + + + + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1send_backups_to_dropbox + Check + Send Backups to Dropbox + +
2upload_backups_to_dropbox + Select + Upload Frequency + + +
Daily
+Weekly
+
3send_notifications_to + Data + Send Notifications To + +
4dropbox_access_key + Data + Dropbox Access Key + +
5dropbox_access_secret + Data + Dropbox Access Secret + +
6dropbox_access_allowed + Data + Dropbox Access Allowed + +
7allow_dropbox_access + Button + Allow Dropbox Access + +
+ + +
+

Controller

+

frappe.integrations.doctype.dropbox_backup.dropbox_backup

+ + + + + + + +

Class DropboxBackup

+ +

Inherits from frappe.model.document.Document + +

+
+
+ +
+
+ + + + + + + +

+ + + frappe.integrations.doctype.dropbox_backup.dropbox_backup.backup_to_dropbox + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.integrations.doctype.dropbox_backup.dropbox_backup.dropbox_callback +

+

+ + + frappe.integrations.doctype.dropbox_backup.dropbox_backup.dropbox_callback + (oauth_token=None, not_approved=False) +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.integrations.doctype.dropbox_backup.dropbox_backup.get_dropbox_authorize_url +

+

+ + + frappe.integrations.doctype.dropbox_backup.dropbox_backup.get_dropbox_authorize_url + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.integrations.doctype.dropbox_backup.dropbox_backup.get_dropbox_session + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.integrations.doctype.dropbox_backup.dropbox_backup.send_email + (success, service_name, error_status=None) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_daily + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_dropbox +

+

+ + + frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_dropbox + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_if + (freq) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_weekly + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.integrations.doctype.dropbox_backup.dropbox_backup.upload_file_to_dropbox + (filename, folder, dropbox_client) +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/integrations/index.html b/frappe/docs/current/models/integrations/index.html new file mode 100644 index 0000000000..6a659b4aed --- /dev/null +++ b/frappe/docs/current/models/integrations/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

DocTypes for integrations

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/integrations/index.txt b/frappe/docs/current/models/integrations/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/integrations/social_login_keys.html b/frappe/docs/current/models/integrations/social_login_keys.html new file mode 100644 index 0000000000..2cab015f1d --- /dev/null +++ b/frappe/docs/current/models/integrations/social_login_keys.html @@ -0,0 +1,181 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ +Single + + + + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1facebook + Section Break + Facebook + +
2facebook_client_id + Data + Facebook Client ID + +
3facebook_client_secret + Data + Facebook Client Secret + +
4google + Section Break + Google + +
5google_client_id + Data + Google Client ID + +
6google_client_secret + Data + Google Client Secret + +
7github + Section Break + GitHub + +
8github_client_id + Data + GitHub Client ID + +
9github_client_secret + Data + GitHub Client Secret + +
+ + +
+

Controller

+

frappe.integrations.doctype.social_login_keys.social_login_keys

+ + + + + + + +

Class SocialLoginKeys

+ +

Inherits from frappe.model.document.Document + +

+
+
+ +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/models/index.html b/frappe/docs/current/models/models/index.html new file mode 100644 index 0000000000..f2c2481179 --- /dev/null +++ b/frappe/docs/current/models/models/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

DocTypes for models

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/models/index.txt b/frappe/docs/current/models/models/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/print/index.html b/frappe/docs/current/models/print/index.html new file mode 100644 index 0000000000..8b58f880d7 --- /dev/null +++ b/frappe/docs/current/models/print/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

DocTypes for print

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/print/index.txt b/frappe/docs/current/models/print/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/print/letter_head.html b/frappe/docs/current/models/print/letter_head.html new file mode 100644 index 0000000000..372510c0ae --- /dev/null +++ b/frappe/docs/current/models/print/letter_head.html @@ -0,0 +1,167 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabLetter Head

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1letter_head_name + Data + Letter Head Name + +
2disabled + Check + Disabled + +
3is_default + Check + Is Default +

+ Check this to make this the default letter head in all prints

+
4content + Text Editor + Content +

+ Letter Head in HTML

+
+ + +
+

Controller

+

frappe.print.doctype.letter_head.letter_head

+ + + + + + + +

Class LetterHead

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + set_as_default + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/print/print_format.html b/frappe/docs/current/models/print/print_format.html new file mode 100644 index 0000000000..10d1cfb677 --- /dev/null +++ b/frappe/docs/current/models/print/print_format.html @@ -0,0 +1,408 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabPrint Format

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1doc_type + Link + DocType + + + + + + +DocType + + + +
2disabled + Check + Disabled + +
3column_break_3 + Column Break + + +
4standard + Select + Standard + + +
No
+Yes
+
5custom_format + Check + Custom Format + +
6section_break_6 + Section Break + + +
7print_format_type + Select + Print Format Type + + +
Server
+Client
+
8html + Code + HTML + + +
HTML
+
9section_break_9 + Section Break + + +
10edit_format + Button + Edit Format + +
11column_break_11 + Column Break + + +
12font + Select + Font + + +
Default
+Arial
+Helvetica
+Verdana
+Monospace
+
13css_section + Section Break + + +
14css + Code + Custom CSS + +
15custom_html_help + HTML + Custom HTML Help + +
16section_break_13 + Section Break + + +
17print_format_help + HTML + Print Format Help + +
18format_data + Code + Format Data + +
19print_format_builder + Check + Print Format Builder + +
+ + +
+

Controller

+

frappe.print.doctype.print_format.print_format

+ + + + + + + +

Class PrintFormat

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + export_doc + (self) +

+

No docs

+
+
+ + + + + +

+ + + extract_images + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_trash + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/print/print_settings.html b/frappe/docs/current/models/print/print_settings.html new file mode 100644 index 0000000000..238b4abad0 --- /dev/null +++ b/frappe/docs/current/models/print/print_settings.html @@ -0,0 +1,236 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ +Single + + + + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1pdf_settings + Section Break + PDF Settings + +
2send_print_as_pdf + Check + Send Print as PDF +

+ Send Email Print Attachments as PDF (Recommended)

+
3pdf_page_size + Select + PDF Page Size + + +
A4
+Letter
+
4print_style_section + Section Break + Print Style + +
5print_style + Select + Print Style + + +
Modern
+Classic
+Standard
+Monochrome
+
6font + Select + Font + + +
Default
+Arial
+Helvetica
+Verdana
+Monospace
+
7font_size + Float + Font Size +

+ In points. Default is 9.

+
8column_break_6 + Column Break + + +
9with_letterhead + Check + With Letterhead +

+ Print with Letterhead, unless unchecked in a particular Document

+
10section_break_8 + Section Break + + +
11print_style_preview + HTML + Print Style Preview + +
+ + +
+

Controller

+

frappe.print.doctype.print_settings.print_settings

+ + + + + + + +

Class PrintSettings

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/about_us_settings.html b/frappe/docs/current/models/website/about_us_settings.html new file mode 100644 index 0000000000..ca611fbb61 --- /dev/null +++ b/frappe/docs/current/models/website/about_us_settings.html @@ -0,0 +1,233 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ +Single + + + + +Settings for the About Us Page + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1help + HTML + Help + +
2company_introduction + Text Editor + Company Introduction +

+ Introduce your company to the website visitor.

+
3sb0 + Section Break + Org History + +
4company_history_heading + Data + Org History Heading +

+ "Company History"

+
5company_history + Table + Org History + + + + + + +Company History + + + +
6sb1 + Section Break + Team Members + +
7team_members_heading + Data + Team Members Heading +

+ "Team Members" or "Management"

+
8team_members + Table + Team Members + + + + + + +About Us Team Member + + + +
9footer + Text Editor + Footer +

+ More content for the bottom of the page.

+
+ + +
+

Controller

+

frappe.website.doctype.about_us_settings.about_us_settings

+ + + + + + + +

Class AboutUsSettings

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.website.doctype.about_us_settings.about_us_settings.get_args + () +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/about_us_team_member.html b/frappe/docs/current/models/website/about_us_team_member.html new file mode 100644 index 0000000000..c3e5d6cdee --- /dev/null +++ b/frappe/docs/current/models/website/about_us_team_member.html @@ -0,0 +1,99 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabAbout Us Team Member

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1full_name + Data + Full Name + +
2image_link + Attach + Image Link + +
3bio + Small Text + Bio + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/blog_category.html b/frappe/docs/current/models/website/blog_category.html new file mode 100644 index 0000000000..e0dc3c2f44 --- /dev/null +++ b/frappe/docs/current/models/website/blog_category.html @@ -0,0 +1,189 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabBlog Category

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1category_name + Data + Category Name + +
2title + Data + Title + +
3published + Check + Published + +
4parent_website_route + Read Only + Parent Website Route + +
5page_name + Data + Page Name + +
+ + +
+

Controller

+

frappe.website.doctype.blog_category.blog_category

+ + + + + + + +

Class BlogCategory

+ +

Inherits from frappe.website.website_generator.WebsiteGenerator + +

+
+
+ + + + +

+ + + autoname + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/blog_post.html b/frappe/docs/current/models/website/blog_post.html new file mode 100644 index 0000000000..0e3ec434f4 --- /dev/null +++ b/frappe/docs/current/models/website/blog_post.html @@ -0,0 +1,374 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabBlog Post

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1title + Data + Title + +
2published_on + Date + Published On + +
3published + Check + Published + +
4column_break_3 + Column Break + + +
5blog_category + Link + Blog Category + + + + + + +Blog Category + + + +
6blogger + Link + Blogger + + + + + + +Blogger + + + +
7parent_website_route + Read Only + Parent Website Route + +
8section_break_5 + Section Break + + +
9blog_intro + Small Text + Blog Intro +

+ Description for listing page, in plain text, only a couple of lines. (max 140 characters)

+
10content + Text Editor + Content + +
11page_name + Data + Page Name + +
12email_sent + Check + Email Sent + +
+ + +
+

Controller

+

frappe.website.doctype.blog_post.blog_post

+ + + + + + + +

Class BlogPost

+ +

Inherits from frappe.website.website_generator.WebsiteGenerator + +

+
+
+ + + + +

+ + + get_context + (self, context) +

+

No docs

+
+
+ + + + + +

+ + + get_feed + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.website.doctype.blog_post.blog_post.clear_blog_cache + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.doctype.blog_post.blog_post.get_blog_category + (page_name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.doctype.blog_post.blog_post.get_blog_list + (doctype, txt=None, filters=None, limit_start=0, limit_page_length=20) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.doctype.blog_post.blog_post.get_children + () +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.doctype.blog_post.blog_post.get_list_context + (context=None) +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/blog_settings.html b/frappe/docs/current/models/website/blog_settings.html new file mode 100644 index 0000000000..8e37245a9d --- /dev/null +++ b/frappe/docs/current/models/website/blog_settings.html @@ -0,0 +1,123 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ +Single + + + + +Blog Settings + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1blog_title + Data + Blog Title + +
2blog_introduction + Small Text + Blog Introduction + +
3writers_introduction + Small Text + Writers Introduction + +
+ + +
+

Controller

+

frappe.website.doctype.blog_settings.blog_settings

+ + + + + + + +

Class BlogSettings

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/blogger.html b/frappe/docs/current/models/website/blogger.html new file mode 100644 index 0000000000..63ccbdb91f --- /dev/null +++ b/frappe/docs/current/models/website/blogger.html @@ -0,0 +1,209 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabBlogger

+ + +User ID of a Blogger + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1disabled + Check + Disabled + +
2short_name + Data + Short Name +

+ Will be used in url (usually first name).

+
3full_name + Data + Full Name + +
4user + Link + User + + + + + + +User + + + +
5bio + Small Text + Bio + +
6avatar + Attach + Avatar + +
7posts + Int + Posts + +
+ + +
+

Controller

+

frappe.website.doctype.blogger.blogger

+ + + + + + + +

Class Blogger

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + on_update + (self) +

+

if user is set, then update all older blogs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/company_history.html b/frappe/docs/current/models/website/company_history.html new file mode 100644 index 0000000000..1ab5847189 --- /dev/null +++ b/frappe/docs/current/models/website/company_history.html @@ -0,0 +1,87 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabCompany History

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1year + Data + Year + +
2highlight + Text + Highlight + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/contact_us_settings.html b/frappe/docs/current/models/website/contact_us_settings.html new file mode 100644 index 0000000000..2b02d6acee --- /dev/null +++ b/frappe/docs/current/models/website/contact_us_settings.html @@ -0,0 +1,247 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ +Single + + + + +Settings for Contact Us Page + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1introduction_section + Section Break + Introduction + +
2forward_to_email + Data + Forward To Email Address +

+ Send enquiries to this email address

+
3heading + Data + Heading +

+ Default: "Contact Us"

+
4introduction + Text Editor + Introduction +

+ Introductory information for the Contact Us Page

+
5query_options + Small Text + Query Options +

+ Contact options, like "Sales Query, Support Query" etc each on a new line or separated by commas.

+
6address + Section Break + Address + +
7address_title + Data + Address Title + +
8address_line1 + Data + Address Line 1 + +
9address_line2 + Data + Address Line 2 + +
10city + Data + City + +
11state + Data + State + +
12pincode + Data + Pincode + +
13country + Data + Country + +
+ + +
+

Controller

+

frappe.website.doctype.contact_us_settings.contact_us_settings

+ + + + + + + +

Class ContactUsSettings

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/index.html b/frappe/docs/current/models/website/index.html new file mode 100644 index 0000000000..d895033774 --- /dev/null +++ b/frappe/docs/current/models/website/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

DocTypes for website

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/index.txt b/frappe/docs/current/models/website/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/website/top_bar_item.html b/frappe/docs/current/models/website/top_bar_item.html new file mode 100644 index 0000000000..9b034ef8b4 --- /dev/null +++ b/frappe/docs/current/models/website/top_bar_item.html @@ -0,0 +1,144 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabTop Bar Item

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1label + Data + Label + +
2parent_label + Select + Parent Label +

+ If you set this, this Item will come in a drop-down under the selected parent.

+
3url + Data + URL +

+ Link to the page you want to open. Leave blank if you want to make it a group parent.

+
4target + Select + Target +

+ Select target = "_blank" to open in a new page.

+
+
+target = "_blank"
+
5right + Check + Right +

+ For top bar

+
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/web_form.html b/frappe/docs/current/models/website/web_form.html new file mode 100644 index 0000000000..b97ba3e159 --- /dev/null +++ b/frappe/docs/current/models/website/web_form.html @@ -0,0 +1,436 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabWeb Form

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1title + Data + Title + +
2page_name + Data + Page Name +

+ Website URL

+
3doc_type + Link + Select DocType + + + + + + +DocType + + + +
4column_break_4 + Column Break + + +
5published + Check + Published + +
6login_required + Check + Login Required + +
7allow_edit + Check + Allow Edit + +
8allow_multiple + Check + Allow Multiple + +
9allow_delete + Check + Allow Delete + +
10allow_comments + Check + Allow Comments + +
11fields + Section Break + Fields + +
12introduction_text + Text + Introduction + +
13web_form_fields + Table + Web Form Fields + + + + + + +Web Form Field + + + +
14actions + Section Break + Actions + +
15success_message + Text + Success Message +

+ Message to be displayed on successful completion

+
16success_url + Data + Success URL +

+ Go to this url after completing the form.

+
17advanced + Section Break + Advanced + +
18web_page_link_text + Data + Web Page Link Text +

+ Text to be displayed for Link to Web Page if this form has a web page. Link route will be automatically generated based on `page_name` and `parent_website_route`

+
19breadcrumbs + Small Text + Breadcrumbs +

+ In JSON as [{"title":"Jobs", "name":"jobs"}]

+
+ + +
+

Controller

+

frappe.website.doctype.web_form.web_form

+ + + + + + + +

Class WebForm

+ +

Inherits from frappe.website.website_generator.WebsiteGenerator + +

+
+
+ + + + +

+ + + get_context + (self, context) +

+

No docs

+
+
+ + + + + +

+ + + get_layout + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_parents + (self, context) +

+

No docs

+
+
+ + +
+
+ + + + + + +

Public API +
/api/method/frappe.website.doctype.web_form.web_form.accept +

+

+ + + frappe.website.doctype.web_form.web_form.accept + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.website.doctype.web_form.web_form.delete +

+

+ + + frappe.website.doctype.web_form.web_form.delete + (web_form, name) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.doctype.web_form.web_form.get_web_form_list + (doctype, txt, filters, limit_start, limit_page_length=20) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.doctype.web_form.web_form.has_web_form_permission + (doctype, name, ptype=read) +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/web_form_field.html b/frappe/docs/current/models/website/web_form_field.html new file mode 100644 index 0000000000..2964146158 --- /dev/null +++ b/frappe/docs/current/models/website/web_form_field.html @@ -0,0 +1,218 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabWeb Form Field

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1fieldname + Select + Fieldname + +
2fieldtype + Select + Fieldtype + + +
Attach
+Check
+Data
+Date
+Datetime
+HTML
+Select
+Text
+Section Break
+Column Break
+
3label + Data + Label + +
4reqd + Check + Mandatory + +
5read_only + Check + Read Only + +
6hidden + Check + Hidden + +
7column_break_4 + Column Break + + +
8options + Text + Options + +
9section_break_6 + Section Break + + +
10description + Text + Description + +
11column_break_8 + Column Break + + +
12default + Data + Default + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/web_page.html b/frappe/docs/current/models/website/web_page.html new file mode 100644 index 0000000000..b56cd38546 --- /dev/null +++ b/frappe/docs/current/models/website/web_page.html @@ -0,0 +1,575 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabWeb Page

+ + +Page to show on the website + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1section_title + Section Break + Title + +
2title + Data + Title +

+ Title / headline of your page

+
3show_title + Check + Show Title + +
4slideshow + Link + Slideshow +

+ Begin this page with a slideshow of images

+
+ + + + +Website Slideshow + + + +
5cb1 + Column Break + + +
6page_name + Data + Page Name +

+ Page url name (auto-generated)

+
7published + Check + Published + +
8sb1 + Section Break + Content +

+ Page content

+
9main_section + Text Editor + Main Section +

+ Content in markdown format that appears on the main side of your page

+
10fold_10 + Fold + + +
11custom_javascript + Section Break + Custom Javascript + +
12insert_code + Check + Insert Code +

+ Add code as <script>

+
13javascript + Code + Javascript + + +
Javascript
+
14custom_css + Section Break + Custom CSS + +
15insert_style + Check + Insert Style + +
16css + Code + CSS + + +
CSS
+
17section_break_17 + Section Break + + +
18enable_comments + Check + Enable Comments + +
19text_align + Select + Text Align + + +
Left
+Center
+Right
+
20column_break_20 + Column Break + + +
21parent_web_page + Link + Parent Web Page + + + + + + +Web Page + + + +
22parent_website_route + Read Only + Parent Website Route + +
23idx + Int + Priority +

+ 0 is highest

+
24template_path + Data + Template Path + +
25sb2 + Section Break + + +
26description + Small Text + Description +

+ Description for search engine optimization.

+
27header + Text + Header +

+ HTML for header section. Optional

+
+ + +
+

Controller

+

frappe.website.doctype.web_page.web_page

+ + + + + + + +

Class WebPage

+ +

Inherits from frappe.website.website_generator.WebsiteGenerator + +

+
+
+ + + + +

+ + + check_for_redirect + (self, context) +

+

No docs

+
+
+ + + + + +

+ + + get_context + (self, context) +

+

No docs

+
+
+ + + + + +

+ + + get_dynamic_context + (self, context) +

+

update context from .py and load sidebar from _sidebar.json if either exists

+
+
+ + + + + +

+ + + get_feed + (self) +

+

No docs

+
+
+ + + + + +

+ + + get_static_content + (self, context) +

+

No docs

+
+
+ + + + + +

+ + + render_dynamic + (self, context) +

+

No docs

+
+
+ + + + + +

+ + + set_metatags + (self, context) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.website.doctype.web_page.web_page.check_broken_links + () +

+

No docs

+
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/website_script.html b/frappe/docs/current/models/website/website_script.html new file mode 100644 index 0000000000..3be1fd426f --- /dev/null +++ b/frappe/docs/current/models/website/website_script.html @@ -0,0 +1,101 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ +Single + + + + +Script to attach to all web pages. + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1javascript + Code + Javascript + + +
Javascript
+
+ + +
+

Controller

+

frappe.website.doctype.website_script.website_script

+ + + + + + + +

Class WebsiteScript

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + on_update + (self) +

+

clear cache

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/website_settings.html b/frappe/docs/current/models/website/website_settings.html new file mode 100644 index 0000000000..44e241bd2c --- /dev/null +++ b/frappe/docs/current/models/website/website_settings.html @@ -0,0 +1,698 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ +Single + + + + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1sb0 + Section Break + Landing Page + +
2home_page + Data + Home Page +

+ Link that is the website home page. Standard Links (index, login, products, blog, about, contact)

+
3home_page_is_products + Check + Home Page is Products +

+ If checked, the Home page will be the default Item Group for the website.

+
4cb4 + Column Break + + +
5title_prefix + Data + Title Prefix +

+ Show title in browser window as "Prefix - title"

+
6section_break_6 + Section Break + + +
7website_theme + Link + Website Theme + + + + + + +Website Theme + + + +
8website_theme_image + Image + Website Theme Image + + +
website_theme_image_link
+
9website_theme_image_link + Small Text + Website Theme Image Link + +
10banner + Section Break + Banner +

+ Add a banner to the site. (small banners are usually good)

+
11banner_image + Attach Image + Banner Image +

+ Select an image of approx width 150px with a transparent background for best results.

+
12set_banner_from_image + Button + Set Banner from Image + +
13column_break_14 + Column Break + + +
14banner_html + Small Text + Banner HTML +

+ Banner is above the Top Menu Bar.

+
15top_bar + Section Break + Top Bar +

+ Menu items in the Top Bar. For setting the color of the Top Bar, go to selected Website Theme.

+
16brand_html + Small Text + Brand HTML +

+ Brand is what appears on the top-left of the toolbar. If it is an image, make sure it +has a transparent background and use the <img /> tag. Keep size as 200px x 30px

+
17top_bar_items + Table + Top Bar Items + + + + + + +Top Bar Item + + + +
18sidebar + Section Break + Sidebar +

+ Sidebar Links for Home Page only

+
19sidebar_items + Table + Sidebar Items + + + + + + +Top Bar Item + + + +
20footer + Section Break + Footer + +
21copyright + Data + Copyright + +
22address + Text Editor + Address +

+ Address and other legal information you may want to put in the footer.

+
23footer_items + Table + Footer Items + + + + + + +Top Bar Item + + + +
24hide_footer_signup + Check + Hide Footer Signup + +
25integrations + Section Break + Integrations + +
26google_analytics_id + Data + Google Analytics ID +

+ Add Google Analytics ID: eg. UA-89XXX57-1. Please search help on Google Analytics for more information.

+
27column_break_17 + Column Break + + +
28google_plus_one + Check + Google Plus One + +
29facebook_share + Check + Facebook Share + +
30linked_in_share + Check + Linked In Share + +
31twitter_share + Check + Twitter Share + +
32twitter_share_via + Data + Twitter Share via +

+ Tweet will be shared via your user account (if specified)

+
33misc_section + Section Break + More Information + +
34favicon + Attach + FavIcon +

+ An icon file with .ico extension. Should be 16 x 16 px. Generated using a favicon generator. [favicon-generator.org]

+
35subdomain + Text + Subdomain +

+ Sub-domain provided by erpnext.com

+
36column_break_28 + Column Break + + +
37disable_signup + Check + Disable Signup +

+ Disable Customer Signup link in Login page

+
38section_break_38 + Section Break + + +
39head_html + Code + <head> HTML +

+ Added HTML in the <head> section of the web page, primarily used for website verification and SEO

+
+
HTML
+
+ + +
+

Controller

+

frappe.website.doctype.website_settings.website_settings

+ + + + + + + +

Class WebsiteSettings

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + clear_cache + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_footer_items + (self) +

+

clear parent label in footer

+
+
+ + + + + +

+ + + validate_home_page + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_top_bar_items + (self) +

+

validate url in top bar items

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.website.doctype.website_settings.website_settings.get_website_settings + () +

+

No docs

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/website_slideshow.html b/frappe/docs/current/models/website/website_slideshow.html new file mode 100644 index 0000000000..e52643f645 --- /dev/null +++ b/frappe/docs/current/models/website/website_slideshow.html @@ -0,0 +1,176 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabWebsite Slideshow

+ + +Slideshow like display for the website + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1slideshow_name + Data + Slideshow Name + +
2sb0 + Section Break + +

+ Note: For best results, images must be of the same size and width must be greater than height.

+
3slideshow_items + Table + Slideshow Items + + + + + + +Website Slideshow Item + + + +
4header + Text Editor + Header +

+ This goes above the slideshow.

+
+ + +
+

Controller

+

frappe.website.doctype.website_slideshow.website_slideshow

+ + + + + + + +

Class WebsiteSlideshow

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.website.doctype.website_slideshow.website_slideshow.get_slideshow + (doc) +

+

No docs

+
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/website_slideshow_item.html b/frappe/docs/current/models/website/website_slideshow_item.html new file mode 100644 index 0000000000..646e277011 --- /dev/null +++ b/frappe/docs/current/models/website/website_slideshow_item.html @@ -0,0 +1,99 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabWebsite Slideshow Item

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1image + Attach + Image + +
2heading + Data + Heading + +
3description + Text + Description + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/website/website_theme.html b/frappe/docs/current/models/website/website_theme.html new file mode 100644 index 0000000000..73669c8c3c --- /dev/null +++ b/frappe/docs/current/models/website/website_theme.html @@ -0,0 +1,627 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabWebsite Theme

+ + + + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1theme + Data + Theme + +
2module + Link + Module + + + + + + +Module Def + + + +
3apply_style + Check + Apply Style +

+ This must be checked if the below style settings are applicable

+
4custom + Check + Custom? + +
5column_break_2 + Column Break + + +
6bootstrap + Small Text + Link to Bootstrap CSS +

+ Link to your Bootstrap theme

+
7section_break_14 + Section Break + + +
8font_size + Select + Font Size + + +
+12px
+13px
+14px
+15px
+16px
+17px
+18px
+
9text_webfont + Data + Google Font (Text) +

+ Add the name of a "Google Web Font" e.g. "Open Sans"

+
10heading_webfont + Data + Google Font (Heading) +

+ Add the name of a "Google Web Font" e.g. "Open Sans"

+
11column_break_18 + Column Break + + +
12text_color + Data + Text Color + +
13link_color + Data + Link Color + +
14heading_style + Select + Heading Style + + +
+UPPERCASE
+Title Case
+lowercase
+
15section_break_8 + Section Break + + +
16top_bar_color + Data + Top Bar Color + +
17top_bar_text_color + Data + Top Bar Text Color + +
18no_sidebar + Check + Hide Sidebar + +
19column_break_11 + Column Break + + +
20footer_color + Data + Footer Color + +
21footer_text_color + Data + Footer Text Color + +
22section_break_4 + Section Break + + +
23background_color + Data + Background Color + +
24column_break_6 + Column Break + + +
25background_image + Attach Image + Background Image +

+ If image is selected, color will be ignored.

+
26section_break_21 + Section Break + + +
27css + Code + Style using CSS + +
28js + Code + JavaScript + +
+ + +
+

Controller

+

frappe.website.doctype.website_theme.website_theme

+ + + + + + + +

Class WebsiteTheme

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + clear_cache_if_current_theme + (self) +

+

No docs

+
+
+ + + + + +

+ + + export_doc + (self) +

+

Export to standard folder [module]/website_theme/[name]/[name].json.

+
+
+ + + + + +

+ + + is_standard_and_not_valid_user + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_trash + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + use_theme + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_colors + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_if_customizable + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + +

+ + + frappe.website.doctype.website_theme.website_theme.add_website_theme + (context) +

+

No docs

+
+
+ + + + + + + +

+ + + frappe.website.doctype.website_theme.website_theme.get_active_theme + () +

+

No docs

+
+
+ + + + + + +

Public API +
/api/method/frappe.website.doctype.website_theme.website_theme.use_theme +

+

+ + + frappe.website.doctype.website_theme.website_theme.use_theme + (theme) +

+

No docs

+
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/workflow/index.html b/frappe/docs/current/models/workflow/index.html new file mode 100644 index 0000000000..b961bda07c --- /dev/null +++ b/frappe/docs/current/models/workflow/index.html @@ -0,0 +1,19 @@ + + + +
+ + + Version 6.6.1 + + + Source + +
+ +

DocTypes for workflow

+ +{index} + + \ No newline at end of file diff --git a/frappe/docs/current/models/workflow/index.txt b/frappe/docs/current/models/workflow/index.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/docs/current/models/workflow/workflow.html b/frappe/docs/current/models/workflow/workflow.html new file mode 100644 index 0000000000..fdeb52727a --- /dev/null +++ b/frappe/docs/current/models/workflow/workflow.html @@ -0,0 +1,290 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabWorkflow

+ + +Defines workflow states and rules for a document. + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1workflow_name + Data + Workflow Name + +
2document_type + Link + Document Type +

+ DocType on which this Workflow is applicable.

+
+ + + + +DocType + + + +
3is_active + Check + Is Active +

+ If checked, all other workflows become inactive.

+
4states_head + Section Break + States +

+ Different "States" this document can exist in. Like "Open", "Pending Approval" etc.

+
5states + Table + Document States +

+ All possible Workflow States and roles of the workflow. +Docstatus Options: 0 is"Saved", 1 is "Submitted" and 2 is "Cancelled"

+
+ + + + +Workflow Document State + + + +
6transition_rules + Section Break + Transition Rules +

+ Rules for how states are transitions, like next state and which role is allowed to change state etc.

+
7transitions + Table + Transitions +

+ Rules defining transition of state in the workflow.

+
+ + + + +Workflow Transition + + + +
8workflow_state_field + Data + Workflow State Field +

+ Field that represents the Workflow State of the transaction (if field is not present, a new hidden Custom Field will be created)

+
+ + +
+

Controller

+

frappe.workflow.doctype.workflow.workflow

+ + + + + + + +

Class Workflow

+ +

Inherits from frappe.model.document.Document + +

+
+
+ + + + +

+ + + create_custom_field_for_workflow_state + (self) +

+

No docs

+
+
+ + + + + +

+ + + on_update + (self) +

+

No docs

+
+
+ + + + + +

+ + + set_active + (self) +

+

No docs

+
+
+ + + + + +

+ + + update_default_workflow_status + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate + (self) +

+

No docs

+
+
+ + + + + +

+ + + validate_docstatus + (self) +

+

No docs

+
+
+ + +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/workflow/workflow_action.html b/frappe/docs/current/models/workflow/workflow_action.html new file mode 100644 index 0000000000..353e5b9b8c --- /dev/null +++ b/frappe/docs/current/models/workflow/workflow_action.html @@ -0,0 +1,99 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabWorkflow Action

+ + +Workflow Action Master + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1workflow_action_name + Data + Workflow Action Name + +
+ + +
+

Controller

+

frappe.workflow.doctype.workflow_action.workflow_action

+ + + + + + + +

Class WorkflowAction

+ +

Inherits from frappe.model.document.Document + +

+
+
+ +
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/workflow/workflow_document_state.html b/frappe/docs/current/models/workflow/workflow_document_state.html new file mode 100644 index 0000000000..6d67c86747 --- /dev/null +++ b/frappe/docs/current/models/workflow/workflow_document_state.html @@ -0,0 +1,158 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabWorkflow Document State

+ + +Represents the states allowed in one document and role assigned to change the state. + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1state + Link + State + + + + + + +Workflow State + + + +
2doc_status + Select + Doc Status +

+ 0 - Draft; 1 - Submitted; 2 - Cancelled

+
+
0
+1
+2
+
3update_field + Select + Update Field + +
4update_value + Data + Update Value + +
5allow_edit + Link + Only Allow Edit For + + + + + + +Role + + + +
6message + Text + Message + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/workflow/workflow_state.html b/frappe/docs/current/models/workflow/workflow_state.html new file mode 100644 index 0000000000..9830023c98 --- /dev/null +++ b/frappe/docs/current/models/workflow/workflow_state.html @@ -0,0 +1,282 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + + + + +

Table Name: tabWorkflow State

+ + +Workflow state represents the current state of a document. + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1workflow_state_name + Data + State + +
2icon + Select + Icon +

+ Icon will appear on the button

+
+
+glass
+music
+search
+envelope
+heart
+star
+star-empty
+user
+film
+th-large
+th
+th-list
+ok
+remove
+zoom-in
+zoom-out
+off
+signal
+cog
+trash
+home
+file
+time
+road
+download-alt
+download
+upload
+inbox
+play-circle
+repeat
+refresh
+list-alt
+lock
+flag
+headphones
+volume-off
+volume-down
+volume-up
+qrcode
+barcode
+tag
+tags
+book
+bookmark
+print
+camera
+font
+bold
+italic
+text-height
+text-width
+align-left
+align-center
+align-right
+align-justify
+list
+indent-left
+indent-right
+facetime-video
+picture
+pencil
+map-marker
+adjust
+tint
+edit
+share
+check
+move
+step-backward
+fast-backward
+backward
+play
+pause
+stop
+forward
+fast-forward
+step-forward
+eject
+chevron-left
+chevron-right
+plus-sign
+minus-sign
+remove-sign
+ok-sign
+question-sign
+info-sign
+screenshot
+remove-circle
+ok-circle
+ban-circle
+arrow-left
+arrow-right
+arrow-up
+arrow-down
+share-alt
+resize-full
+resize-small
+plus
+minus
+asterisk
+exclamation-sign
+gift
+leaf
+fire
+eye-open
+eye-close
+warning-sign
+plane
+calendar
+random
+comment
+magnet
+chevron-up
+chevron-down
+retweet
+shopping-cart
+folder-close
+folder-open
+resize-vertical
+resize-horizontal
+hdd
+bullhorn
+bell
+certificate
+thumbs-up
+thumbs-down
+hand-right
+hand-left
+hand-up
+hand-down
+circle-arrow-right
+circle-arrow-left
+circle-arrow-up
+circle-arrow-down
+globe
+wrench
+tasks
+filter
+briefcase
+fullscreen
+
3style + Select + Style +

+ Style represents the button color: Success - Green, Danger - Red, Inverse - Black, Primary - Dark Blue, Info - Light Blue, Warning - Orange

+
+
+Primary
+Info
+Success
+Warning
+Danger
+Inverse
+
+ + +
+

Controller

+

frappe.workflow.doctype.workflow_state.workflow_state

+ + + + + + + +

Class WorkflowState

+ +

Inherits from frappe.model.document.Document + +

+
+
+ +
+
+ + + + + + +

Linked In:

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/current/models/workflow/workflow_transition.html b/frappe/docs/current/models/workflow/workflow_transition.html new file mode 100644 index 0000000000..c8f622fe8a --- /dev/null +++ b/frappe/docs/current/models/workflow/workflow_transition.html @@ -0,0 +1,147 @@ + + + + + + +
+ + + Version 6.6.1 + + + Source + +
+ + +Child Table + + +

Table Name: tabWorkflow Transition

+ + +Defines actions on states and the next step and allowed roles. + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SrFieldnameTypeLabelOptions
1state + Link + State + + + + + + +Workflow State + + + +
2action + Link + Action + + + + + + +Workflow Action + + + +
3next_state + Link + Next State + + + + + + +Workflow State + + + +
4allowed + Link + Allowed + + + + + + +Role + + + +
+ + + + +

Child Table Of

+ + + + + + + \ No newline at end of file diff --git a/frappe/docs/index.html b/frappe/docs/index.html new file mode 100644 index 0000000000..401721880f --- /dev/null +++ b/frappe/docs/index.html @@ -0,0 +1,36 @@ + + + +
+

Full stack web framework to build complex apps

+

Build extensions to ERPNext or make your own database driven app

+
+ +
+
+ +
+
+ + +
+

The Frappe Framework is a server side and client side +framework and is built with the philosophy make it "battries included". +It has libraries and API for authentication, MVC, permissions, REST API, +templating, admin interface, forms, reports and much more.

+ +

Frappe Framework was designed to build ERPNext, open source +ERP for managing small and medium sized businesses.

+ +
+ + +
+ Table of Contents +
+ + + + + \ No newline at end of file diff --git a/frappe/docs/index.txt b/frappe/docs/index.txt new file mode 100644 index 0000000000..4bdfdc4ac8 --- /dev/null +++ b/frappe/docs/index.txt @@ -0,0 +1,6 @@ +assets +user +contents +current +install +license diff --git a/frappe/docs/install.md b/frappe/docs/install.md new file mode 100644 index 0000000000..7350f8f4ab --- /dev/null +++ b/frappe/docs/install.md @@ -0,0 +1,30 @@ + + +# Installation + +Frappe Framework is based on the Frappe Framework, a full stack web framework based on Python, MariaDB, Redis, Node. + +To intall Frappe Framework, you will have to install the Frappe Bench, the command-line, package manager and site manager for Frappe Framework. For more details, read the Bench README. + +After you have installed Frappe Bench, go to you bench folder, which is `frappe.bench` by default and setup **frappe**. + + bench get-app frappe {{ source_link }} + +Then create a new site to install the app. + + bench new-site mysite + +This will create a new folder in your `/sites` directory and create a new database for this site. + +Next, install frappe in this site + + bench --site mysite install-app frappe + +To run this locally, run + + bench start + +Fire up your browser and go to http://localhost:8000 and you should see the login screen. Login as **Administrator** and **admin** (or the password you set at the time of `new-site`) and you are set. + + + \ No newline at end of file diff --git a/frappe/docs/license.html b/frappe/docs/license.html new file mode 100644 index 0000000000..c462cdba43 --- /dev/null +++ b/frappe/docs/license.html @@ -0,0 +1,16 @@ + + +

MIT

+ +

The MIT License (MIT)

+ +

Copyright (c) 2015 Frappe Technologies Pvt. Ltd.

+ +

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

+ +

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

+ +

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ + + \ No newline at end of file diff --git a/frappe/docs/user/guides/adding-module-icons-on-desktop.md b/frappe/docs/user/guides/adding-module-icons-on-desktop.md new file mode 100644 index 0000000000..e6e0156bf6 --- /dev/null +++ b/frappe/docs/user/guides/adding-module-icons-on-desktop.md @@ -0,0 +1,34 @@ +To create a module icon for a Page, List or Module, you will have to edit the `config/desktop.py` file in your app. + +In this file you will have to write the `get_data` method that will return a dict object with the module icon parameters + +### Example 1: Module Icon + + def get_data(): + return { + "Accounts": { + "color": "#3498db", + "icon": "octicon octicon-repo", + "type": "module" + }, + } + +### Example 2: List Icon + + def get_data(): + return { + "To Do": { + "color": "#f1c40f", + "icon": "icon-check", + "icon": "octicon octicon-check", + "label": _("To Do"), + "link": "List/ToDo", + "doctype": "ToDo", + "type": "list" + }, + } + + +Note: Module views are visible based on permissions. + + \ No newline at end of file diff --git a/frappe/docs/user/guides/apps.md b/frappe/docs/user/guides/apps.md new file mode 100644 index 0000000000..9f89df75c8 --- /dev/null +++ b/frappe/docs/user/guides/apps.md @@ -0,0 +1,116 @@ +# Frappe Apps + +Frappe Apps are Python packages which use the Frappe platform. They can live +anywhere on the [Python +path](https://docs.python.org/2/tutorial/modules.html#the-module-search-path) +and must have an entry in the `apps.txt` file. + + +### Creating an app + +Frappe ships with a boiler plate for a new app. The command `bench make-app +app-name` helps you start a new app by starting an interactive shell. + + + % bench make-app sample_app + App Name: sample_app + App Title: Sample App + App Description: This is a sample app. + App Publisher: Acme Inc. + App Icon: icon-linux + App Color: #6DAFC9 + App Email: info@example.com + App URL: http://example.com + App License: MIT + +The above command would create an app with the following directory structure. + + sample_app + ├── license.txt + ├── MANIFEST.in + ├── README.md + ├── sample_app + │   ├── __init__.py + │   ├── sample_app + │   │   └── __init__.py + │   ├── config + │   │   ├── desktop.py + │   │   └── __init__.py + │   ├── hooks.py + │   ├── modules.txt + │   ├── patches.txt + │   └── templates + │   ├── generators + │   │   └── __init__.py + │   ├── __init__.py + │   ├── pages + │   │   └── __init__.py + │   └── statics + └── setup.py + +Here, "App Icon" is a font awesome class that you can select from +[http://fortawesome.github.io/Font-Awesome/icons/](http://fortawesome.github.io/Font-Awesome/icons/). + +The boiler plate contains just enough files to show your app icon on the [Desk]. + +### Files in the app + +#### `hooks.py` + +The `hooks.py` file defines the metadata of your app and integration points +with other parts of Frappe or Frappe apps. Examples of such parts include task +scheduling or listening to updates to different documents in the system. For +now, it just contains the details you entered during app creation. + + + app_name = "sample-app" + app_title = "Sample App" + app_publisher = "Acme Inc." + app_description = "This is a sample app." + app_icon = "fa-linux" + app_color = "black" + app_email = "info@example.com" + app_url = "http://example.com" + app_version = 0.0.1 + +#### `modules.txt` + +Modules in Frappe help you organize Documents in Frappe and they are defined in +the `modules.txt` file in your app. It is necessary for every [DocType] to be +attached to a module. By default a module by the name of your app is added. +Also, each module gets an icon on the [Desk]. For example, the [ERPNext] app is +organized in the following modules. + + accounts + buying + home + hr + manufacturing + projects + selling + setup + stock + support + utilities + contacts + +### Adding app to a site + +Once you have an app, whether it's the one you just created or any other you +downloaded, you are required to do the following things. + +1. Add to Python path. It is recommend to do this using a package manager called + [pip]. `pip install -e src/sample_app` would add the `sample_app` in editable + mode ie. it will be linked to the source from wherefyou install and + reinstalling everytime you make a change is not required. This method is + highly recommended if you are developing the app yourself. + + If you just want to use pip can install packages in a variety of other ways. + TODO: add link + +2. Add line with your app name to apps.txt (in your sites directory) as + explained in [sites](/help/sites) + + +TODO: Add screenshot + diff --git a/frappe/docs/user/guides/checking-problems-in-bench.md b/frappe/docs/user/guides/checking-problems-in-bench.md new file mode 100644 index 0000000000..60edb8d5b4 --- /dev/null +++ b/frappe/docs/user/guides/checking-problems-in-bench.md @@ -0,0 +1,15 @@ + + +If you're experiencing delays in scheduled jobs or they don't seem to run, you run run the following command to diagnose the issue. + +`bench frappe --doctor` + +A desirable output is like below + + + Workers online: True + Pending tasks 0 + Timed out locks: + + +We'll be adding more health checks soon. \ No newline at end of file diff --git a/frappe/docs/user/guides/configuring-https.md b/frappe/docs/user/guides/configuring-https.md new file mode 100644 index 0000000000..4fb90be226 --- /dev/null +++ b/frappe/docs/user/guides/configuring-https.md @@ -0,0 +1,43 @@ + +### Get the required files + +You can buy a SSL certificate from a trusted Certificate Authority or generate your own. For self signed certificates the browser will show a warning that the certificate is not trusted. + +The files required are + +* Certificate (usually with extension .crt) +* Decrypted private key + +If you have multiple certificates (primary and intermediate), you will have to concatenate them. For example, + + cat your_certificate.crt CA.crt >> certificate_bundle.crt + +Also make sure that your private key is not world readable. Generally, it is owned and readable only by root + + chown root private.key + chmod 600 private.key + +### Move the two files to an appropriate location + + mkdir /etc/nginx/conf.d/ssl + mv private.key /etc/nginx/conf.d/ssl/private.key + mv certificate_bundle.crt /etc/nginx/conf.d/ssl/certificate_bundle.crt + +### Setup nginx config + +Set the paths to the certificate and private key for your site + + bench set-ssl-certificate site1.local /etc/nginx/ssl/certificate_bundle.crt + bench set-ssl-key site1.local /etc/nginx/ssl/private.key + +### Generate nginx config + + bench setup nginx + +### Reload nginx + + service nginx reload + +or + + systemctl reload nginx # for CentOS 7 \ No newline at end of file diff --git a/frappe/docs/user/guides/custom-module-icon.md b/frappe/docs/user/guides/custom-module-icon.md new file mode 100644 index 0000000000..609f7f3803 --- /dev/null +++ b/frappe/docs/user/guides/custom-module-icon.md @@ -0,0 +1,21 @@ +If you want to create a custom icon for your module, you will have to create an SVG file for your module and set the path to this file in the `desktop/config.py` of your app.
+ +This icon is loaded via AJAX first time, then it will be rendered. + +Example: + + from frappe import _ + + def get_data(): + return { + "Frappe Apps": { + "color": "orange", + "icon": "assets/frappe/images/frappe.svg", + "label": _("Frappe.io Portal"), + "type": "module" + } + } + +> PS: A great place to buy SVG icons for a low cost is the awesome [Noun Project](http://thenounproject.com/) + + \ No newline at end of file diff --git a/frappe/docs/user/guides/dialogs-types.md b/frappe/docs/user/guides/dialogs-types.md new file mode 100644 index 0000000000..6b17121dd0 --- /dev/null +++ b/frappe/docs/user/guides/dialogs-types.md @@ -0,0 +1,118 @@ +Frappe provide a group of standard dialogs that are very usefull while coding. + +## Alert Dialog + +![Alert](/files/show_alert.png) + +Is helpfull for show a non-obstrutive message. + +This dialog have 2 parameters `txt`that is the message and `seconds` that is the time that the message will be showed for the user, the standard is `3 seconds`. + +### Example + + show_alert('Hi, do you have a new message', 5); + +--- + +## Prompt Dialog + +![Prompt](/files/promp_dialog.png) + +Is helpful for ask a value for the user + +This dialog have 4 parameters, they are: + +- **fields:** a list with the fields objects +- **callback:** the function that manage the received values +- **title:** the title of the dialog +- **primary_label:** the label of the primary button + +### Example + + frappe.prompt([ + {'fieldname': 'birth', 'fieldtype': 'Date', 'label': 'Birth Date', 'reqd': 1} + ], + function(values){ + show_alert(values, 5); + }, + 'Age verification', + 'Subscribe me' + ) + +--- +## Confirm Dialog + +![Confirm](/files/confirm_dialog.png) + +Usefull to get a confirmation from the user before do an action + +This dialog have 3 arguments, they are: + +- **mesage:** The message content +- **onyes:** The callback on positive confirmation +- **oncancel:** The callback on negative confirmation + +### Example + + frappe.confirm( + 'Are you sure to leave this page?', + function(){ + window.close(); + }, + function(){ + show_alert('Thanks for continue here!') + } + ) + +--- + +## Message Print + +![MSGPrint](/files/msgprint_dialog.png) + +Is helpfull for show a informational dialog for the user; + +This dialog have 2 arguments, they are: + +- **message:** The message content, can be a HTML string too +- **title:** The title of the dialog + +### Example + + msgprint("Server Status" + + "
" + + "", 'Server Info') + +--- + +### Custom Dialog + +![Class](/files/dialog_constructor.png) + +Frappé provide too a `Class` that you can extend and build your own custom dialogs + +`frappe.ui.Dialog` + +### Example + + var d = new frappe.ui.Dialog({ + 'fields': [ + {'fieldname': 'ht', 'fieldtype': 'HTML'}, + {'fieldname': 'today', 'fieldtype': 'Date', 'default': frappe.datetime.nowdate()} + ], + primary_action: function(){ + d.hide(); + show_alert(d.get_values()); + } + }); + d.fields_dict.ht.$wrapper.html('Hello World'); + d.show(); + + + + + \ No newline at end of file diff --git a/frappe/docs/user/guides/email-notifications-for-failed-background-jobs.md b/frappe/docs/user/guides/email-notifications-for-failed-background-jobs.md new file mode 100644 index 0000000000..3c582762ec --- /dev/null +++ b/frappe/docs/user/guides/email-notifications-for-failed-background-jobs.md @@ -0,0 +1,23 @@ + + +

Frappe handles failure of jobs in the following way,

1) If a job fails, (raises exception), it's logged in Scheduler Log and  logs/worker.error.log.
2) Keeps a lock file and would not run anymore if lock file is there.
3) Raises LockTimeoutError in case the lock file is more than 10 minutes old.

+ +

You can configure email notification for scheduler errors. By writing a file, sites/common_site_config.json with content

+ +
{
+  "celery_error_emails": {
+    "ADMINS": [
+      [
+        "Person 1",
+        "person1@example.com"
+      ],
+      [
+        "Person2 ",
+        "person2@example.com"
+      ]
+    ],
+    "SERVER_EMAIL": "exceptions@example.com"
+  }
+}
+ +

One limitation is that it'll use local mailserver on port 25 to send the emails.

\ No newline at end of file diff --git a/frappe/docs/user/guides/executing-code-on-doctype-events.md b/frappe/docs/user/guides/executing-code-on-doctype-events.md new file mode 100644 index 0000000000..a5b57e0920 --- /dev/null +++ b/frappe/docs/user/guides/executing-code-on-doctype-events.md @@ -0,0 +1,29 @@ +To execute code when a DocType is inserted, validated (before saving), updated, submitted, cancelled, deleted, you must write in the DocType's controller module. + +#### 1. Controller Module + +The controller module exists in the `doctype` folder in the Module of the `DocType`. For example, the controller for **ToDo** exists in `frappe/desk/doctype/todo/todo.py` (version 5). A controller template is created when the DocType is created. which looks like + + from __future__ import unicode_literals + + import frappe + from frappe.model.document import Document + + class CustomType(Document): + pass + +#### 2. Document Properties + +All the fields and child tables are available to the class as attributes. For example the **name** property is `self.name` + +#### 3. Adding Methods + +In this module, you can add standard methods to the class that are called when a document of that type is created. Standard Handlers are: + +1. `autoname`: Called while naming. You can set the `self.name` property in the method. +1. `before_insert`: Called before a document is inserted. +1. `validate`: Called before document is saved. You can throw an exception if you don't want the document to be saved +1. `on_update`: Called after the document is inserted or updated in the database. +1. `on_submit`: Called after submission. +1. `on_cancel`: Called after cancellation. +1. `on_trash`: Called after document is deleted. diff --git a/frappe/docs/user/guides/fetch-custom-field-value-from-master-to-all-related-transactions.md b/frappe/docs/user/guides/fetch-custom-field-value-from-master-to-all-related-transactions.md new file mode 100644 index 0000000000..bbf1c863c7 --- /dev/null +++ b/frappe/docs/user/guides/fetch-custom-field-value-from-master-to-all-related-transactions.md @@ -0,0 +1,20 @@ +Let's say, there is a custom field "VAT Number" in Supplier master, which should be fetched in Purchase Order document. +
+
Steps: +
1. Create a Custom Field "VAT Number" for Supplier document with Field Type as Data. +
   +
2. Create another Custom Field "VAT Number" for Purchase Order document. But in this case, enter Field Type as Read Only and Options as supplier.vat_number. +
 
3. Refresh the system using Help -> Clear Cache. +
4. Now on selection of Supplier in new Purchase Order form, "VAT Number" will be fetched automatically from Supplier master. +
5. The above procedure should be replicated, for all other supplier related transactions. +
+
Note: +
+
If field type of "VAT Number" in Purchase Order is other than `Read Only`, then to fetch the value, a small piece of Custom Script need to be written. +
i. Go to Setup -> Customize -> Custom Script. +
ii. Select DocType as `Purchase Order`. +
iii. Add Script `cur_frm.add_fetch('supplier', 'vat_number', 'vat_number')` +
iv. Save the Custom Script. +
v. Clear cache before testing. +
+
\ No newline at end of file diff --git a/frappe/docs/user/guides/form-architecture.md b/frappe/docs/user/guides/form-architecture.md new file mode 100644 index 0000000000..30b59da7f4 --- /dev/null +++ b/frappe/docs/user/guides/form-architecture.md @@ -0,0 +1,171 @@ + +ERPNext is built on top of framework called **Frappe**. In this framework, each form is created as a table called 'Doctype'. Each Doctype has fields listed as a row, with properties define for them assigned like [field type](https://erpnext.com/kb/setup/field-types), print show/hide, Mandatory etc. + +For an instance, Sales order is a table, in which sales order fields are defined as a rows. + +Doctype - Sales Order + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field IDField TypePrint HideMandatoryHidden
SeriesSelect1 (checked)1 0 (unchecked)
CustomerLink0 1 0
ItemTable0 1 0
+
+To capture more details of sales order, like item detail, separate table is created called "Sales Order Item" table. Likewise, taxes are the separate table in a Sales Order. So, for Sales Order form, Sales Order Doctype becomes parent, and Sales Order Item and Sales Taxes Charges and Sales Person Docytpe becomes child table. + +Following is the Doctype structure for few important transaction of ERPNext. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TransactionTableDoctype Name
Quotation QuotationQuotation

Quotation Item tableQuotation Item

Quotation TaxesSales Taxes and Charges
Sales OrderSales OrderSales Order

Sales Order Item tableSales Order Item

Sales Order TaxesSales Taxes and Charges
Delivery NoteDelivery noteDelivery Note

Delivery Note Item tableDelivery Note Item

Delivery Note TaxesSales Taxes and Charges
Sales Invoicesales invoiceSales Invoice
Sales Invoice Item tableSales Invoice Item
Sales Invoice Tax tableSales Taxes and Charges
Purchase OrderPurchase OrderPurchase Order
Purchase Order Item tablePurchase Order Item
Purchase ReceiptPurchase ReceiptPurchase Receipt
Purchase Receipt Item tablePurchase Receipt Item
Purchase InvoicePurchase InvoicePurchase Invoice
Purchase Invoice Item tablePurchase Invoice Item
Purchase Invoice Tax tablePurchase Taxes and Charges
Journal VoucherJournal VoucherJournal Voucher
Journal Voucher Accounts tableJournal Voucher Detail
+ + \ No newline at end of file diff --git a/frappe/docs/user/guides/getting-information-from-another-document-in-print-format.md b/frappe/docs/user/guides/getting-information-from-another-document-in-print-format.md new file mode 100644 index 0000000000..321028d7af --- /dev/null +++ b/frappe/docs/user/guides/getting-information-from-another-document-in-print-format.md @@ -0,0 +1,7 @@ +In a print format, you can get data from another document. For example in if you have a fields called `sales_order` in Sales Invoice, then you can get the sales order details using `frappe.get_doc`: + +{% raw %} + {% set sales_order_doc = frappe.get_doc("Sales Order", sales_order) %} + + {{ sales_order_doc.customer }} +{% endraw %} diff --git a/frappe/docs/user/guides/hooks.md b/frappe/docs/user/guides/hooks.md new file mode 100644 index 0000000000..be2bd01ad8 --- /dev/null +++ b/frappe/docs/user/guides/hooks.md @@ -0,0 +1,273 @@ +# Hooks + + +Hooks are the duct tape of the Frappe system. Hooks allow you to "hook" in to +functionality and events of other parts of the Frappe system. Following are the +official hooks from Frappe. + +### Application Name and Details + +1. `app_name` - slugified name with underscores e.g. "shopping\_cart" +2. `app_title` - full title name e.g. "Frappe" +3. `app_publisher` +4. `app_description` +5. `app_version` +6. `app_icon` - font-awesome icon or image url +7. `app_color` - hex colour background of the app icon + +### Install Events + +1. `before_install` +2. `after_install` + +The above hooks are called before and after installation of the app they are in. +For example, [ERPNext](/apps/erpnext)'s hooks contains a line, + + after_install = "erpnext.setup.install.after_install" + +So, the function after\_install is imported and called after ERPNext is installed. + +Note, the `before_install` and `after_install` hooks are called with no arguments. + +### Boot Session + +After a successful login, the Frappe JS Client requests for a resource called +`bootinfo`. The `bootinfo` is available as a global in Javascript via +`frappe.boot`. By default, the `bootinfo` contains + +* System defaults +* Notification status +* Permissions +* List of icons on desktop +* User settings +* Language and timezone info + +If your app wants to modify bootinfo, it can declare a hook `boot_session`. The +value is assumed to be a dotted path to a function and is called with one +argument, bootinfo which it can modify and return. + +Eg, + + boot_session = "erpnext.startup.boot.boot_session" + +### Notification configurations + +The notification configuration hook is expected to return a Python dictionary. + + { + "for_doctype": { + "Issue": {"status":"Open"}, + "Customer Issue": {"status":"Open"}, + }, + "for_module_doctypes": { + "ToDo": "To Do", + "Event": "Calendar", + "Comment": "Messages" + }, + "for_module": { + "To Do": "frappe.core.notifications.get_things_todo", + "Calendar": "frappe.core.notifications.get_todays_events", + "Messages": "frappe.core.notifications.get_unread_messages" + } + } + + +The above configuration has three parts, + +1. `for_doctype` part of the above configuration marks any "Issue" + or "Customer Issue" as unread if its status is Open +2. `for_module_doctypes` maps doctypes to module's unread count. +3. `for_module` maps modules to functions to obtain its unread count. The + functions are called without any argument. + +### Javascript / CSS Assets + +The following hooks allow you to bundle built assets to your app for serving. +There are two types of assets, app and web. The app assets are loaded in the +Desk and web assets are loaded in the website. + +1. `app_include_js` +2. `app_include_css` +3. `web_include_js` +4. `web_include_css` + +Eg, + + app_include_js = "assets/js/erpnext.min.js" + web_include_js = "assets/js/erpnext-web.min.js" + +Note: to create an asset bundle (eg, assets/js/erpnext.min.js) the target file +should be in build.json of your app. + +### Configuring Reports + +In the report view, you can force filters as per doctype using `dump_report_map` +hook. The hook should be a dotted path to a Python function which will be called +without any arguments. Example of output of this function is below. + + + "Warehouse": { + "columns": ["name"], + "conditions": ["docstatus < 2"], + "order_by": "name" + } + +Here, for a report with Warehouse doctype, would include only those records that +are not cancelled (docstatus < 2) and will be ordered by name. + +### Modifying Website Context + +Context used in website pages can be modified by adding +a `update_website_context` hook. This hook should be a dotted path to a function +which will be called with a context (dictionary) argument. + +### Customizing Email footer + +By default, for every email, a footer with content, "Sent via Frappe" is sent. +You can customize this globally by adding a `mail_footer` hook. The hook should +be a dotted path to a variable. + +### Session Creation Hook + +You can attach custom logic to the event of a successful login using +`on_session_creation` hook. The hook should be a dotted path to a Python +function that takes login\_manager as an argument. + +Eg, + + def on_session_creation(login_manager): + """make feed""" + if frappe.session['user'] != 'Guest': + # log to timesheet + pass + +### Website Clear Cache + +If you cache values in your views, the `website_clear_cache` allows you to hook +methods that invalidate your caches when Frappe tries to clear cache for all +website related pages. + +### Document hooks + +#### Permissions + +#### Query Permissions +You can customize how permissions are resolved for a DocType by hooking custom +permission match conditions using the `permission_query_conditions` hook. This +match condition is expected to be fragment for a where clause in an sql query. +Structure for this hook is as follows. + + + permission_query_conditions = { + "{doctype}": "{dotted.path.to.function}", + } + +The output of the function should be a string with a match condition. +Example of such a function, + + + def get_permission_query_conditions(): + return "(tabevent.event_type='public' or tabevent.owner='{user}'".format(user=frappe.session.user) + +The above function returns a fragment that permits an event to listed if it's +public or owned by the current user. + +#### Document permissions +You can hook to `doc.has_permission` for any DocType and add special permission +checking logic using the `has_permission` hook. Structure for this hook is, + + has_permission = { + "{doctype}": "{dotted.path.to.function}", + } + +The function will be passed the concerned document as an argument. It should +True or a falsy value after running the required logic. + +For Example, + + def has_permission(doc): + if doc.event_type=="Public" or doc.owner==frappe.session.user: + return True + +The above function permits an event if it's public or owned by the current user. + +#### CRUD Events + +You can hook to various CRUD events of any doctype, the syntax for such a hook +is as follows, + + doc_events = { + "{doctype}": { + "{event}": "{dotted.path.to.function}", + } + } + +To hook to events of all doctypes, you can use the follwing syntax also, + + doc_events = { + "*": { + "on_update": "{dotted.path.to.function}", + } + } + +The hook function will be passed the doc in concern as the only argument. + +##### List of events + +* `validate` +* `before_save` +* `before_insert` +* `after_insert` +* `validate` +* `before_submit` +* `before_cancel` +* `before_update_after_submit` +* `on_update` +* `on_submit` +* `on_cancel` +* `on_update_after_submit` + + +Eg, + + doc_events = { + "Cab Request": { + "after_insert": topcab.schedule_cab", + } + } + +### Scheduler Hooks + +Scheduler hooks are methods that are run periodically in background. Structure for such a hook is, + + scheduler_events = { + "{event_name}": [ + "{dotted.path.to.function}" + ], + } + +#### Events + +* `daily` +* `daily_long` +* `weekly` +* `weekly_long` +* `monthly` +* `monthly_long` +* `hourly` +* `all` + +The scheduler events require celery, celerybeat and redis (or a supported and +configured broker) to be running. The events with suffix '\_long' are for long +jobs. The `all` event is triggered everytime (as per the celerybeat interval). + +Example, + + scheduler_events = { + "{daily}": [ + "erpnext.accounts.doctype.sales_invoice.sales_invoice.manage_recurring_invoices" + ], + "{daily_long}": [ + "erpnext.setup.doctype.backup_manager.backup_manager.take_backups_daily" + ], + } diff --git a/frappe/docs/user/guides/how-enable-developer-mode-in-frappe.md b/frappe/docs/user/guides/how-enable-developer-mode-in-frappe.md new file mode 100644 index 0000000000..3a176d4c15 --- /dev/null +++ b/frappe/docs/user/guides/how-enable-developer-mode-in-frappe.md @@ -0,0 +1,15 @@ +When you are in application design mode and you want the changes in your DocTypes, Reports etc to affect the app repository, you must be in **Developer Mode**. + +To enable developer mode, update the `site_config.json` file of your site in the sites folder for example: + + frappe-bench/sites/site1/site_config.json + +Add this to the JSON object + + "developer_mode": 1 + +After setting developer mode, clear the cache: + + $ bench frappe --clear_cache + + \ No newline at end of file diff --git a/frappe/docs/user/guides/how-to-add-customizations-to-app.md b/frappe/docs/user/guides/how-to-add-customizations-to-app.md new file mode 100644 index 0000000000..0c98f2a180 --- /dev/null +++ b/frappe/docs/user/guides/how-to-add-customizations-to-app.md @@ -0,0 +1,18 @@ +If you want to add **Custom Fields** to your app so that they are automatically created when you app is installed on a new site, you will have to add them as **Fixtures** in the `hooks.py` file of your app. + +In your `hooks.py` file, add `"Custom Fields"` + + fixtures = ["Custom Field"] + +Export fixtures before you commit your app with: + + $ bench --site mysite export-fixtures + +This will create a new folder called `fixtures` in your app folder and a `.csv` or `.json` file will be created with the custom fields. + +This file will be automatically imported when the app is installed in a new site or updated via `bench update`. + +Note: You can also add single DocTypes like "Website Settings" as fixtures + + + \ No newline at end of file diff --git a/frappe/docs/user/guides/how-to-change-host-name-from-localhost.md b/frappe/docs/user/guides/how-to-change-host-name-from-localhost.md new file mode 100644 index 0000000000..39d0008ec8 --- /dev/null +++ b/frappe/docs/user/guides/how-to-change-host-name-from-localhost.md @@ -0,0 +1,18 @@ +While using a virtual machine, links within emails will be point to your host, e.g. localhost, like **http://localhost/set-password** etc. + +Frappe will automatically extract the host name from the incoming request, or from the `host_name` property from `site_config`. + +### bench set-config + +To fix this, you can use **bench set-config** to set your public IP or domain name as the host name. + +#### Example: + + bench --site mysite.com set-config host_name mysite.com + +--- + +Or edit the `frappe-bench/sites/mysite.com/site_config.json` and add a `host_name` property. + + + \ No newline at end of file diff --git a/frappe/docs/user/guides/how-to-enable-social-logins.md b/frappe/docs/user/guides/how-to-enable-social-logins.md new file mode 100644 index 0000000000..847cf78ea3 --- /dev/null +++ b/frappe/docs/user/guides/how-to-enable-social-logins.md @@ -0,0 +1,67 @@ +Use Facebook, Google or GitHub authentication to login to Frappe, and your users will be spared from remembering another password. + +The system uses the **Email ID** supplied by these services to **match with an existing user** in Frappe. If no such user is found, **a new user is created** of the default type **Website User**, if Signup is not disabled in Website Settings. Any System Manager can later change the user type from **Website User** to **System User**, so that the user can access the Desktop. + +
+ Login screen with Social Logins enabled +
Login screen with Social Logins enabled
+
+ +To enable these signups, you need to have **Client ID** and **Client Secret** from these authentication services for your Frappe site. The Client ID and Client Secret are to be set in Website > Setup > Social Login Keys. Here are the steps to obtain these credentials. + +> Use **https://{{ yoursite }}** if your site is HTTPS enabled. + +--- + +### Facebook + +1. Go to [https://developers.facebook.com](https://developers.facebook.com) +1. Click on Apps (topbar) > New App, fill in the form. +1. Go to Settings > Basic, set the **Contact Email** and save the changes. +1. Go to Settings > Advanced, find the field **Valid OAuth redirect URIs**, and enter: + **http://{{ yoursite }}/api/method/frappe.templates.pages.login.login\_via\_facebook** +1. Save the changes in Advance tab. +1. Go to Status & Review and switch on "Do you want to make this app and all its live features available to the general public?" +1. Go to Dashboard, click on the show button besides App Secret, and copy the App ID and App Secret into **Desktop > Website > Setup > Social Login Keys** + +
+ +
+ +--- + +### Google + +1. Go to [https://console.developers.google.com](https://console.developers.google.com) +1. Create a new Project and fill in the form. +1. Click on APIs & Auth > Credentials > Create new Client ID +1. Fill the form with: + - Web Application + - Authorized JavaScript origins as **http://{{ yoursite }}** + - Authorized redirect URI as + **http://{{ yoursite }}/api/method/frappe.templates.pages.login.login\_via\_google** +1. Go to the section **Client ID for web application** and copy the Client ID and Client Secret into **Desktop > Website > Setup > Social Login Keys** + +
+ +
+ +--- + +### GitHub + +1. Go to [https://github.com/settings/applications](https://github.com/settings/applications) +1. Click on **Register new application** +1. Fill the form with: + - Homepage URL as **http://{{ yoursite }}** + - Authorization callback URL as + **http://{{ yoursite }}/api/method/frappe.templates.pages.login.login\_via\_github** +1. Click on Register application. +1. Copy the generated Client ID and Client Secret into **Desktop > Website > Setup > Social Login Keys** + +
+ +
+ + \ No newline at end of file diff --git a/frappe/docs/user/guides/how-to-improve-a-standard-control.md b/frappe/docs/user/guides/how-to-improve-a-standard-control.md new file mode 100644 index 0000000000..bfbf320612 --- /dev/null +++ b/frappe/docs/user/guides/how-to-improve-a-standard-control.md @@ -0,0 +1,102 @@ +Frappé has a couple of elegant and useful widgets, but some times we need to edit them to add small improvements. This small article will describe how to add new resources to the standard widgets. + +Let me explain first our goal: + +> Add `many` alternative translations in `numerous records` and in a `lot of doctypes` + +Look the highlighted sections in the __goal__, we have _many translations_ to add in _many records_ and in _many doctypes_, so, we heave a **many of work**, so we have a lot to do right? + +The answer for this question is: _-Of course not! Because we know that if one element exists in many records and in many doctypes, this element is the `Control` or `Widget`_ + +So, what we need do, is improve your goal based on the `Control`, to reduce our quantity of work. + +But, where will we find this magic element, the control? _-For now, we can look it in the JavaScript sources - let's look now at [Github](https://github.com/frappe/frappe/blob/develop/frappe/public/js/frappe/form/control.js#L13)_ + +> Don't worry if you don't understand the code for now, our goal there is simplify our work. + +Let's go ahead with the thought! + +We know where we need to make the changes, but how will we dismember which are the controls that are affected by our feature and which aren't ? + +We need to keep in mind, that `Control` are instance of `DocFields` and the `DocFields` have a field that is very important for us in this case, the field that will help us to dismember which are affected by our feature and which aren't is the field `options` in the `DocField`. + +_-Wait!, we understood that the field `options` can help us, but, how will it help us?_ + +Good question, we will define a word to put in the `options` of the `DocFields` that we need to include the feature, this world will be **`Translatable`.** + +> If you forget how to customize the options of a field look [this article](https://kb.erpnext.com/kb/customize/creating-custom-link-field), it can refresh your knowledge. + +Well, with the defined word in `options` of our selected `DocFields`, now is time to code: + +_-At last, we think we would never stop talking!_ + + frappe.ui.form.ControlData = frappe.ui.form.ControlData.$extend({ + make_input: function(){ + var options = this.df.options; + if (!options || options!=="Translatable"){ + this._super(); + return; + } + var me = this; + $('').prependTo(this.input_area); + this.$input_area = $(this.input_area); + this.$input = this.$input_area.find('input'); + this.$btn = this.$input_area.find('.dialog-btn'); + this.set_input_attributes(); + this.$input.on("focus", function(){ + me.$btn.toggle(true); + }); + this.$input.on("blur", function(){ + setTimeout(function(){ me.$btn.toggle(false) }, 500); + }); + this.input = $this.input.get(0); + this.has_input = true; + var me = this; + this.setup_button(); + }, + setup_button: function(){ + var me = this; + if (this.only_input){ + this.$btn.remove(); + return; + } + this.$btn.on("click", function(){ + var value = me.get_value(); + var options = me.df.options; + if (value && options && options==="Translatable"){ + this.open_dialog(); + } + }); + }, + open_dialog: function(){ + var doc = this.doc; + if (!doc.__unsaved){ + new frappe.ui.form.TranslationSelector({ + doc: doc, + df: this.doc, + text: this.value + }); + } + } + }); + +_-Other letter soup, for my gosh!_ + +In fact, it IS a soup of letters, for a newbie, but we are not a beginner. + +Let me explain what this code does; + + - At line 1 the code overrides the `ControlData` by one extended `Class` of itself. + - The method `make_input` checks if the docfield is **`Translatable`** to make the new `Control` if not, it calls the *original* `make_input` using `_super()` + - The method `setup_button` checks if the docfield is **`Translatable`** to enable it show a `dialog` + - The method `open_dialog` invokes a new instance of the `TranslationSelector` that we will create in the code below. + + + + \ No newline at end of file diff --git a/frappe/docs/user/guides/how-to-make-query-report.md b/frappe/docs/user/guides/how-to-make-query-report.md new file mode 100644 index 0000000000..92ea7d4b2e --- /dev/null +++ b/frappe/docs/user/guides/how-to-make-query-report.md @@ -0,0 +1,56 @@ +You can create tabulated reports using complex SQL queries by creating a new Report. These reports can be created by a System Manager and are stored in the Database + +> Note: You will need System Manager Permissions for this. + +To create a new Query Report: + +### 1. Create a new Report + +![Query Report](/assets/frappe_io/images/how-to/query-report.png) + +1. Set type as "Query Report" +1. Set the reference DocType - Users that have access to the reference DocType will have access to the report +1. Set the module - The report will appear in the "Custom Reports" section of the module. +1. Add your Query + +### 2. Set the Query + +You can define complex queries such as: + + + SELECT + `tabProduction Order`.name as "Production Order:Link/Production Order:200", + `tabProduction Order`.creation as "Date:Date:120", + `tabProduction Order`.production_item as "Item:Link/Item:150", + `tabProduction Order`.qty as "To Produce:Int:100", + `tabProduction Order`.produced_qty as "Produced:Int:100" + FROM + `tabProduction Order` + WHERE + `tabProduction Order`.docstatus=1 + AND ifnull(`tabProduction Order`.produced_qty,0) < `tabProduction Order`.qty + AND EXISTS (SELECT name from `tabStock Entry` where production_order =`tabProduction Order`.name) + +1. To format the columns, set labels for each column in the format: [Label]:[Field Type]/[Options]:[Width] + +### 3. Check the Report + +![Query Report](/assets/frappe_io/images/how-to/query-report-out.png) + +### 4. Advanced (adding filters) + +If you are making a standard report, you can add filters in your query report just like [script reports](https://frappe.io/kb/reports/how-to-make-script-reports) by adding a `.js` file in your query report folder. To include filters in your query, use `%(filter_key)s` where your filter value will be shown. + +For example + + SELECT ... FROM ... WHERE item_code = %(item_code)s ORDER BY ... + +--- + +### Note: Standard Script Report + +If you are developing a standard report for an app, make sure to set "Is Standard" as "Yes" + + + + \ No newline at end of file diff --git a/frappe/docs/user/guides/how-to-make-script-reports.md b/frappe/docs/user/guides/how-to-make-script-reports.md new file mode 100644 index 0000000000..4f097b34d5 --- /dev/null +++ b/frappe/docs/user/guides/how-to-make-script-reports.md @@ -0,0 +1,51 @@ +# Script Report + +You can create tabulated reports using server side scripts by creating a new Report. + +> Note: You will need Administrator Permissions for this. + +Since these reports give you unrestricted access via Python scripts, they can only be created by Administrators. The script part of the report becomes a part of the repository of the application. If you have not created an app, [read this](/developers/guide). + +> Note: You must be in [Developer Mode](/developers/how-to/enable-developer-mode) to do this + +### 1. Create a new Report + +![Query Report](/assets/frappe_io/images/how-to/script-report.png) + +1. Set Report Type as "Script Report" +1. Set "Is Standard" as "Yes" +1. Select the Module in which you want to add this report +1. In the module folder (for example if it is Accounts in ERPnext the folder will be `erpnext/accounts/report/[report-name]`) you will see that templates for the report files will be created. +1. In the `.js` file, you can set filters for the reports +1. In the `.py` file, you can write the script that will generate the report + +### 2. Add Filters + +You can add filters in the `.js`. See an example below: + + frappe.query_reports["Accounts Receivable"] = { + "filters": [ + { + "fieldname":"company", + "label": __("Company"), + "fieldtype": "Link", + "options": "Company", + "default": frappe.defaults.get_user_default("company") + }, + ] + } + +1. These properties are the same as you would set in a DocField in a DocType + +### 3. Add the Script + +In the `.py` file you can add the script for generating the report. + +1. In the `execute` method, two lists `columns` and `data` are returned +2. Columns must be a list of labels in the same format as query report. **[Label]:[Field Type]/[Options]:[Width]**. For example `Item:Link/Item:150` +3. You can use all server side modules to build your report. +4. For example see existing reports. ([Balance Sheet](https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/report/balance_sheet/balance_sheet.py)) + +### 4. Commit and Push the app + +Don't forget to commit and push your app. diff --git a/frappe/docs/user/guides/how-to-migrate-doctype-changes-to-production.md b/frappe/docs/user/guides/how-to-migrate-doctype-changes-to-production.md new file mode 100644 index 0000000000..35a15645ab --- /dev/null +++ b/frappe/docs/user/guides/how-to-migrate-doctype-changes-to-production.md @@ -0,0 +1,13 @@ +#### 1. DocType / Schema Changes + +If you are in `developer_mode`, the `.json` files for each **DocType** are automatically updated. + +When you update in your production using `--latest` or `bench update`, these changes are updated in the site's schema too! + +#### 2. Permissions + +Permissions do not get updated because the user may have changed them. To update permissions, you can add a new patch in the `patches.txt` of your app. + + execute:frappe.permissions.reset_perms("[docype]") + + \ No newline at end of file diff --git a/frappe/docs/user/guides/import-large-csv-file.md b/frappe/docs/user/guides/import-large-csv-file.md new file mode 100644 index 0000000000..5194ebd98d --- /dev/null +++ b/frappe/docs/user/guides/import-large-csv-file.md @@ -0,0 +1,23 @@ +To import very large CSV files, you can use the bench utility `import-csv`. + +The benefit is that this is not subject to timeouts if you use the web interface. + +Here is an example: + + bench --site test.erpnext.com import-csv ~/Downloads/Activity_Type.csv + +### Help + + $ bench import-csv --help + Usage: bench import-csv [OPTIONS] PATH + + Import CSV using data import tool + + Options: + --only-insert Do not overwrite existing records + --submit-after-import Submit document after importing it + --ignore-encoding-errors Ignore encoding errors while coverting to unicode + --help Show this message and exit. + + + \ No newline at end of file diff --git a/frappe/docs/user/guides/index.md b/frappe/docs/user/guides/index.md new file mode 100644 index 0000000000..9eeed8baa8 --- /dev/null +++ b/frappe/docs/user/guides/index.md @@ -0,0 +1,7 @@ +# Guides + +The Frappe Framework is a server side and client side framework and is built with the philosophy make it a "battries included" framework. It has libraries and API for everything from authentication to reports. + +In this section we will try and cover the most commonly used API on client and server side that will be useful for app development. + +{index} diff --git a/frappe/docs/user/guides/index.txt b/frappe/docs/user/guides/index.txt new file mode 100644 index 0000000000..9344dbf4b3 --- /dev/null +++ b/frappe/docs/user/guides/index.txt @@ -0,0 +1,35 @@ +install +apps +sites +hooks +rest_api +translations +migrations +writing-tests +how-to-change-host-name-from-localhost +import-large-csv-file +adding-module-icons-on-desktop +how-to-add-customizations-to-app +how-to-improve-a-standard-control +dialogs-types +trigger-event-on-deletion-of-grid-row +overriding-link-query-by-custom-script +where-do-i-find-standard-print-formats +fetch-custom-field-value-from-master-to-all-related-transactions +how-to-make-script-reports +how-to-enable-social-logins +total-fixed-cost-in-manufacturing +email-notifications-for-failed-background-jobs +insert-a-document-via-api +executing-code-on-doctype-events +getting-information-from-another-document-in-print-format +print-format-for-reports +single-type-doctype +using-html-templates-in-javascript +configuring-https +custom-module-icon +how-to-migrate-doctype-changes-to-production +how-to-make-query-report +form-architecture +checking-problems-in-bench +how-enable-developer-mode-in-frappe diff --git a/frappe/docs/user/guides/insert-a-document-via-api.md b/frappe/docs/user/guides/insert-a-document-via-api.md new file mode 100644 index 0000000000..aab15b4ac9 --- /dev/null +++ b/frappe/docs/user/guides/insert-a-document-via-api.md @@ -0,0 +1,53 @@ +You can insert documents via a script using the `frappe.get_doc` method + +### Examples: + +#### 1. Insert a ToDo + + todo = frappe.get_doc({"doctype":"ToDo", "description": "test"}) + todo.insert() + +--- + +#### 2. Insert without the user's permissions being checked: + + todo = frappe.get_doc({"doctype":"ToDo", "description": "test"}) + todo.insert(ignore_permissions = True) + + +--- + +#### 3. Submit after inserting + + todo = frappe.get_doc({"doctype":"ToDo", "description": "test"}) + todo.insert(ignore_permissions=True) + todo.submit() + +--- + +#### 4. Insert a document on saving of another document + + class MyType(Document): + def on_update(self): + todo = frappe.get_doc({"doctype":"ToDo", "description": "test"}) + todo.insert() + +---- + +#### 5. Insert a document with child tables: + + sales_order = frappe.get_doc({ + "doctype": "Sales Order", + "company": "_Test Company", + "customer": "_Test Customer", + "delivery_date": "2013-02-23", + "sales_order_details": [ + { + "item_code": "_Test Item Home Desktop 100", + "qty": 10.0, + "rate": 100.0, + "warehouse": "_Test Warehouse - _TC" + } + ] + }) + sales_order.insert() diff --git a/frappe/docs/user/guides/install.md b/frappe/docs/user/guides/install.md new file mode 100644 index 0000000000..3afa43a37c --- /dev/null +++ b/frappe/docs/user/guides/install.md @@ -0,0 +1,10 @@ +# Installing Frappe + +## Frappe bench + +The following steps help you setup an isolated environment (bench) to run and +develop Frappe apps. A virtualenv is installed in the env directory. You can +activate it by running `source ./env/bin/activate` or use execute using +absolute/relative path (eg, `./env/bin/frappe`). + +For more info, see [Frappe Bench](https://github.com/frappe/bench/) diff --git a/frappe/docs/user/guides/migrations.md b/frappe/docs/user/guides/migrations.md new file mode 100644 index 0000000000..c40a2a7c4b --- /dev/null +++ b/frappe/docs/user/guides/migrations.md @@ -0,0 +1,69 @@ +# Migrations + +A project often undergoes changes related to database schema during course of +its life. It may also be required patch existing data. Frappe bundles tools to +handle these schenarios. + +When you pull updates from any Frappe app (including Frappe), you should run +`bench migrate` to apply schema changes and data migrations if any. + +## Schema changes + +You can edit a DocType to add, remove or change fields. On saving a DocType, +a JSON file containing the DocType data is added to source tree of your app. +When you add an app to a site, the DocTypes are installed using this JSON file. +For making schema changes, it's required to set `developer_mode` in the +configuration. + +On running a sync (`bench migrate`), doctypes in the system are synced to +their latest version from the JSON files in the app. + +Note: Fields are soft deleted ie. the columns are not removed from the database +table and however, they will not be visible in the documents. This is done to +avoid any potential data loss situations and to allow you write related data +migrations which might need values from deleted fields. + +Note: Frappe doesn't support reverse schema migrations. + +## Data Migrations + +On introducing data related changes, you might want to run one off scripts to +change existing data to match expectations as per new code. + +To add a data migration to your code, you will have to write an `execute` +function to a python module and add it to `patches.txt` of your app. + +It is recommended to make a file with a patch number and name in its path and +add it to a patches package (directory) in your app. You can then add a line +with dotted path to the patch module to `patches.txt`. + +The directory structure followed in Frappe is as below + + + frappe + └── patches + └── 4_0 + └── my_awesome_patch.py + +The patch can be added to `patches.txt` by adding a line like + + frappe.patches.4_0.my_awesome_patch + +The metadata ie. DocType available in the execute function will be the latest as +per JSON files in the apps. However, you will not be able to access metadata of +any previous states of the system. + +#### One off Python statements + +You can also add one off python statements in `patches.txt` using the syntax, + execute:{python statement} + +For example, + execute:frappe.get_doc("User", "Guest").save() + +Note: All lines in patches.txt have to be unique. If you want to run a line +twice, you can make it unique by adding a distinct comment. + +For Example, + + execute:frappe.installer.make_site_dirs() #2014-02-19 diff --git a/frappe/docs/user/guides/overriding-link-query-by-custom-script.md b/frappe/docs/user/guides/overriding-link-query-by-custom-script.md new file mode 100644 index 0000000000..cc8c8058fd --- /dev/null +++ b/frappe/docs/user/guides/overriding-link-query-by-custom-script.md @@ -0,0 +1,87 @@ +You can override the standard link query by using `set_query` + +### 1. Adding Fitlers + +You can add filters to the query: + + frappe.ui.form.on("Bank Reconciliation", "onload", function(frm) { + cur_frm.set_query("bank_account", function() { + return { + "filters": { + "account_type": "Bank", + "group_or_ledger": "Ledger" + } + }; + }); + }); + +A more complex query: + + frappe.ui.form.on("Bank Reconciliation", "onload", function(frm){ + cur_frm.set_query("bank_account", function(){ + return { + "filters": [ + ["Bank Account": "account_type", "=", "Bank"], + ["Bank Account": "group_or_ledger", "!=", "Group"] + ] + } + }); + }); + +--- + +### 2. Calling a Different Method to Generate Results + +You can also set a server side method to be called on the query: + + frm.set_query("item_code", "items", function() { + return { + query: "erpnext.controllers.queries.item_query", + filters: frm.doc.enquiry_type === "Maintenance" ? + {"is_service_item": "Yes"} : {"is_sales_item": "Yes"} + }; + }); + + + +#### Custom Method + +The custom method should return a list of items for auto select. If you want to send additional data, you can send multiple columns in the list. + +Parameters to the custom method are: + +`def custom_query(doctype, txt, searchfield, start, page_len, filters)` + +**Example:** + + # searches for leads which are not converted + def lead_query(doctype, txt, searchfield, start, page_len, filters): + return frappe.db.sql("""select name, lead_name, company_name from `tabLead` + where docstatus < 2 + and ifnull(status, '') != 'Converted' + and ({key} like %(txt)s + or lead_name like %(txt)s + or company_name like %(txt)s) + {mcond} + order by + if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999), + if(locate(%(_txt)s, lead_name), locate(%(_txt)s, lead_name), 99999), + if(locate(%(_txt)s, company_name), locate(%(_txt)s, company_name), 99999), + name, lead_name + limit %(start)s, %(page_len)s""".format(**{ + 'key': searchfield, + 'mcond':get_match_cond(doctype) + }), { + 'txt': "%%%s%%" % txt, + '_txt': txt.replace("%", ""), + 'start': start, + 'page_len': page_len + }) + + + +For more examples see: + +[https://github.com/frappe/erpnext/blob/develop/erpnext/controllers/queries.py](https://github.com/frappe/erpnext/blob/develop/erpnext/controllers/queries.py) + + \ No newline at end of file diff --git a/frappe/docs/user/guides/print-format-for-reports.md b/frappe/docs/user/guides/print-format-for-reports.md new file mode 100644 index 0000000000..dd582169c0 --- /dev/null +++ b/frappe/docs/user/guides/print-format-for-reports.md @@ -0,0 +1,70 @@ +# Report Print Formats + +In version 4.1 we introduce Report Print Formats. These are HTML templates that you can use to format Query Report data for printing. + +### 1. Creating New Print Formats + +To create a new Print Format, just drop in a `.html` file in the folder of the query report. For example, for the [General Ledger](https://github.com/frappe/erpnext/tree/develop/erpnext/accounts/report/general_ledger) report in ERPNext, you can drop in a file called `general_ledger.html` along side the `.js` and `.py` files. + +##### Tree Of `erpnext/accounts/general_ledger` + + general_ledger/ + ├── __init__.py + ├── general_ledger.html + ├── general_ledger.js + ├── general_ledger.json + └── general_ledger.py + + +### 2. Templating + +For templating, we use an adapted version of [John Resig's microtemplating script](http://ejohn.org/blog/javascript-micro-templating/). If you know Javascript, it is very easy to follow this templating language. + +##### Here are some examples (from John Resig's Blog): + +Example: Properities: + +
"> +
+ +
+
+
+ <%=from_user%>: <%=text%>
+
+
+ +Example: Code structures, Loops + + <% for ( var i = 0; i < users.length; i++ ) { %> +
  • <%=users[i].name%>
  • + <% } %> + +> **Note**: It is important to note that you should not use single quotes (') in your template as the engine cannot handle them effectively. + +### 3. Data + +Data is available to the template as: + +- `data`: this is a list of records, with each record as an object with slugified properties from labels. For example "Posting Date" becomes "posting_date" +- `filters`: filters set in the report +- `report`: reportview object + +### 4. Example + +Here is how the General Ledger Report is built: + +[General Ledger Print Format Template](https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/report/general_ledger/general_ledger.html) + +Here is what the report looks like: + +![General Ledger](/assets/frappe_io/images/how-to/general-ledger.png) + +##### Comments: + +1. [Bootstrap Stylesheet](http://getbootstrap.com) is pre-loaded. +1. You can use all global functions like `fmt_money` and dateutil. +1. Translatable strings should be written as `__("text")` +1. You can create modules and import using `{% include "templates/includes/formats/common_format" %}` + + \ No newline at end of file diff --git a/frappe/docs/user/guides/rest_api.md b/frappe/docs/user/guides/rest_api.md new file mode 100644 index 0000000000..7f28f82b38 --- /dev/null +++ b/frappe/docs/user/guides/rest_api.md @@ -0,0 +1,283 @@ +# REST API + +Frappe ships with an HTTP API. There are two parts of this API. + +1. Remote Procedure Calls (RPC) +2. REST + +## 1. RPC + +A request to an endpoint `/api/method/{dotted.path.to.function}` will call +a whitelisted python function. A function can be whitelisted using the +`frappe.whitelist` decorator. + +For example, Add the following to sample\_app/\_\_init\_\_.py + + @frappe.whitelist(allow_guest=True) + def ping(): + return 'pong' + +GET http://frappe.local:8000**/api/method/sample_app.ping** + +_Response:_ + + { + "message": "pong" + } + + +## 2. REST + +All documents in Frappe are available via a RESTful API with prefix +`/api/resource/`. + +### Login + +To login, you will have to send a POST request to the login method. + +POST http://frappe.local:8000**/api/method/login** + + usr=Administrator&pwd=admin + +_Response:_ + + { + "full_name": "Administrator", + "message": "Logged In" + } + + +Try to make an authenticated request + +GET http://frappe.local:8000**/api/method/frappe.auth.get\_logged\_user** + +_Response:_ + + { + "message": "Administrator" + } + + +### Listing Documents + +To list documents, the URL endpoint is `/api/resource/{doctype}` and the +expected HTTP verb is GET. + +Response is returned as JSON Object and the listing is an array in with the key `data`. + +GET http://frappe.local:8000**/api/resource/Person** + +_Response:_ + + { + "data": [ + { + "name": "000000012" + }, + { + "name": "000000008" + } + ] + } + + +#### Fields + +By default, only name field is included in the listing, to add more fields, you +can pass the fields param to GET request. The param has to be a JSON array. + +GET http://frappe.local:8000**/api/resource/Person/?fields=["name", "first\_name"]** + +_Response:_ + + { + "data": [ + { + "first_name": "Jane", + "name": "000000012" + }, + { + "first_name": "John", + "name": "000000008" + } + ] + } + + +#### Filters + +You can filter the listing using sql conditions by passing them as the `filters` +GET param. Each condition is an array of the format, [{doctype}, {field}, +{operator}, {operand}]. + +Eg, to filter persons with name Jane, pass a param `filters=[["Person", "first_name", "=", "Jane"]]` + +GET http://frappe.local:8000**/api/resource/Person/** + +_Response:_ + { + "data": [ + { + "name": "000000012" + } + ] + } + + +#### Pagination + +All listings are returned paginated by 20 items. To change the page size, you +can pass `limit_page_length`. To request succesive pages, pass `limit_start` as +per your `limit_page_length`. + +For Example, to request second page, pass `limit_start` as 20. + +GET http://frappe.local:8000**/api/resource/DocType** + +_Response:_ + + { + "data": [ + { + "name": "testdoc" + }, + { + "name": "Person" + }, + + ...... + + { + "name": "Website Template" + } + ] + } + + +GET http://frappe.local:8000**/api/resource/DocType?limit_start=20** + +_Response:_ + + { + "data": [ + { + "name": "Website Route" + }, + { + "name": "Version" + }, + { + "name": "Blog Post" + }, + + ...... + + { + "name": "Custom Field" + } + ] + } + + +### CRUD + +#### Create + +You can create a document by sending a `POST` request to the url, `/api/resource/{doctype}`. + +POST http://frappe.local:8000**/api/resource/Person** + +_Body_: + + data={"first_name": "Robert"} + +_Response:_ + + { + "data": { + "first_name": "Robert", + "last_name": null, + "modified_by": "Administrator", + "name": "000000051", + "parent": null, + "creation": "2014-05-04 17:22:38.037685", + "modified": "2014-05-04 17:22:38.037685", + "doctype": "Person", + "idx": null, + "parenttype": null, + "owner": "Administrator", + "docstatus": 0, + "parentfield": null + } + } + +#### Read + +You can get a document by its name using the url, `/api/resource/{doctype}/{name}` + +For Example, + +GET http://frappe.local:8000**/api/resource/Person/000000012** + +_Response:_ + + { + "data": { + "first_name": "Jane", + "last_name": "Doe", + "modified_by": "Administrator", + "name": "000000012", + "parent": null, + "creation": "2014-04-25 17:56:51.105372", + "modified": "2014-04-25 17:56:51.105372", + "doctype": "Person", + "idx": null, + "parenttype": null, + "owner": "Administrator", + "docstatus": 0, + "parentfield": null + } + } + +### Update + +You can create a document by sending a `PUT` request to the url, +`/api/resource/{doctype}`. This acts like a `PATCH` HTTP request in which you do +not have to send the whole document but only the parts you want to change. + +For Example, + +PUT http://frappe.local:8000**/api/resource/Person/000000008** + +_Body:_ + + data={"last_name": "Watson"} + +_Response:_ + + { + "data": { + "first_name": "John ", + "last_name": "Watson", + "modified_by": "Administrator", + "name": "000000008", + "creation": "2014-04-25 17:26:22.728327", + "modified": "2014-05-04 18:21:45.385995", + "doctype": "Person", + "owner": "Administrator", + "docstatus": 0 + } + } + +### Delete + +You can delete a document by its name by sending a `DELETE` request to the url, +`/api/resource/{doctype}/{name}`. + +For Example, + +DELETE http://frappe.local:8000**/api/resource/Person/000000008** + +_Response:_ + + {"message":"ok"} diff --git a/frappe/docs/user/guides/single-type-doctype.md b/frappe/docs/user/guides/single-type-doctype.md new file mode 100644 index 0000000000..ee5c24b492 --- /dev/null +++ b/frappe/docs/user/guides/single-type-doctype.md @@ -0,0 +1,9 @@ +DocTypes have a table associated with them. For example DocType **Customer** will have a table `tabCustomer` associated with it. + +**Single** type DocTypes have no table associated and there is only one Document for it. This is similar to the Singleton pattern in Java. Single DocTypes are ideal for saving Settings (that are globally applicable) and for wizard / helper type forms that have no documents, but when the DocType is used for the Form UI. + +The data in Single DocType is stored in `tabSingles` (`doctype`, `field`, `value`) + +#### Examples + +In Frappe, Single types are **System Settings** and **Customize Form** \ No newline at end of file diff --git a/frappe/docs/user/guides/site_config.md b/frappe/docs/user/guides/site_config.md new file mode 100644 index 0000000000..322cc1937c --- /dev/null +++ b/frappe/docs/user/guides/site_config.md @@ -0,0 +1,40 @@ +# Site Config + +Settings for `sites/[site]/site_config.json` + +`site_config.json` stores global settings for a particular site and is present in the site directory. Here is a list of properties you can set in `site_config.json`. + +Example: + + { + "db_name": "test_frappe", + "db_password": "test_frappe", + "admin_password": "admin", + } + +### Mandatory Settings + +- `db_name`: Database Name. +- `db_password`: Database password. + +### Optional Settings + +- `db_host`: Database host if not `localhost`. +- `admin_password`: Default Password for "Administrator". +- `mute_emails`: Stops email sending if true. +- `deny_multiple_logins`: Stop users from having more than one active session. +- `root_password`: MariaDB root password. + +### Defaut Outgoing Email Settings + +- `mail_server`: SMTP server hostname. +- `mail_port`: STMP port. +- `use_ssl`: Connect via SSL / TLS. +- `mail_login`: Login id for SMTP server. +- `mail_password`: Password for SMTP server. + +### Developer Settings + +- `developer_mode`: If developer mode is set, DocType changes are automatically updated in files. +- `disable_website_cache`: Don't cache website pages. +- `logging`: writes logs if **1**, writes queries also if set to **2**. diff --git a/frappe/docs/user/guides/sites.md b/frappe/docs/user/guides/sites.md new file mode 100644 index 0000000000..81f51aa599 --- /dev/null +++ b/frappe/docs/user/guides/sites.md @@ -0,0 +1,82 @@ +# Sites + +## Sites Directory + +Frappe is a multitenant platform and each tenant is called a site. Sites exist +in a directory called `sites_dir`, assumed as the current working directory when +running a frappe command or other services like Celery worker or a WSGI server. + +You can set `sites_dir` with an environment variable `SITES_DIR` or pass +`--sites_dir` option to the frappe command. + +Apart from the sites, the `sites_dir` should contain the following. + +#### apps.txt + +`apps.txt` contain a list of Python packages to treat as Frappe apps. Every +frappe app that you intend to use in you site should have an entry in this file. +Also, they should be in the `PYTHONPATH`. For more information, refer +[Frappe Apps](/help/apps). + +#### common\_site\_config.json + +`common_site_config.json` is an optional file. Configuration common to all sites +can be put in this file. + +#### assets + +Assets contain files that are required to be served for the browser client. +These generally include *.js, *.css, *.png files. This directory is auto +generated using the `bench build` command. + +#### languages.txt + +`languages.txt` is an autogenerated file which maps every language to it's code. + +## Site + +A site is a directory in `sites_dir` which represents a tenant in Frappe Platform. + + +### Directory Structure + + site + ├── locks + ├── private + │   └── backups + ├── public + │   └── files + │ └── testfile.txt + └── site_config.json + +* `locks` directory is used by the scheduler to synchronize various jobs using +the [file locking concept](http://en.wikipedia.org/wiki/File_locking). + +* `private` directory contains files that require authentication to access. +Presently, it is limited only to backups. + +* `public` directory contains files that can directly served. In the above + example, `testfile.txt` can be accessed by the URL, + http://site/files/testfile.txt + +* `site_config.json` contains site specific configuration + +### Site Config + +[See configuration options for `site_config.json`](/docs/user-guide/site_config.md) + +### Site Resolution + +While responding to an HTTP request, a site is automatically selected based on, + +* `Host` header in the HTTP request matches a site +* `X-Frappe-Site-Name` header in the HTTP request matches a site + +It is also possible to force the development server to serve a specific site by +starting it with the following command. + `bench --site SITENAME serve` + + +### Adding a new site + +`frappe new-site SITENAME` diff --git a/frappe/docs/user/guides/total-fixed-cost-in-manufacturing.md b/frappe/docs/user/guides/total-fixed-cost-in-manufacturing.md new file mode 100644 index 0000000000..28bf0b1ab2 --- /dev/null +++ b/frappe/docs/user/guides/total-fixed-cost-in-manufacturing.md @@ -0,0 +1 @@ +Some manufacturing processes have a fixed cost associated with them irrespective of the quantity. This feature helps such manufacturing processes.

    1. In the workstation doctype we can set 'Fixed Cycle Cost' that is associated with a workstation.

    2. While making a BOM with operations, if we associate a workstation with an operation, the fixed cycle cost is automatically fetched. You can modify it here if required.

    3. Now the system will compute the total cost of the operation as "Operating Cost" + "Total Cycle Cost". Here "Operating Cost" computed as "Hour Rate" * "Operating Time"
    \ No newline at end of file diff --git a/frappe/docs/user/guides/translations.md b/frappe/docs/user/guides/translations.md new file mode 100644 index 0000000000..e5ff22e9f2 --- /dev/null +++ b/frappe/docs/user/guides/translations.md @@ -0,0 +1,86 @@ + + + +This document shows how to translations are managed in ERPNext and how to add +a new language or update translations of an existing language. + +### 1. Source + +Translatable text exists in 3 main sources: + + 1. Javascript Code Files (both framework and application) + 2. Python Code Files + 3. DocTypes (names, labels and select options) + +#### Strings in Code Files + +Strings in code files are annotated using the `_` (underscore) method + + 1. In Python it is the `frappe._` method. Example: + +`frappe._("String {0} must be translated".format(txt))` + + 2. In Javascript it is the `__` method. Example: + +`__("String {0} must be translated", [txt])` + +**Note:** If you find translatable strings are not properly annotated using the `_` +method, you can add them in the code and rebuild the translations. + +### 2. How Translations Are Picked up During Execution + +Whenever a translation is called via the _ method, the entire translation +dictionaries from all apps are built and stored in memcache. + +Based on the user preferences or request preferences, the appropriate +translations are loaded at the time of request on the server side. Or if +metadata (DocType) is queried, then the appropriate translations are appended +when the DocType data is requested. + +The underscore `_` method will replace the strings based on the available +translations loaded at the time. + +### 3. Adding New Translations + +1. To find untranslated strings, run `bench get-untranslated [lang] [path]` +1. Add the translated strings in another file in the same order +1. run `bench update-translations [lang] [path of untranslated strings] [path of translated strings]` + +### 4. Improving Translations: + +For updating translations, please go to the to [the translation portal](https://frappe.io/translator). + +If you want to do it directly via code: + +To improve an existing translation, just edit the master translation files in +the `translations` of each app + +> Please contribute your translations back to ERPNext by sending us a Pull +Request. + +### 5. Bootstrapping a New Language + +If you want to add a new language it is similar to adding new translations. You need to first export all the translations strings in one file, get them translated via Google Translate Tool or Bing Translate Tool and then import the translations into individual apps. + +**Step 1: Export to a file** + + $ bench get-untranslated [lang] [path] + +**Step 2: Translate** + +Create another file with updated translations (in the same order as the source file). For this you can use the [Google Translator Toolkit](https://translate.google.com/toolkit) or [Bing Translator](http://www.bing.com/translator/). + +**Step 3: Import your translations** + + $ bench update-translations [lang] [source path] [translated path] + +**Step 4: Update `languages.txt`** + +Add your language in `apps/languages.txt` and also `frappe/data/languages.txt` (fore new bench installs) + +**Step 5: Commit each app and push** + +A new file will be added to the `translations` folder in each app. You need to add that file and push to your repo. Then send us a pull-request. + +--- + diff --git a/frappe/docs/user/guides/trigger-event-on-deletion-of-grid-row.md b/frappe/docs/user/guides/trigger-event-on-deletion-of-grid-row.md new file mode 100644 index 0000000000..68f1b77129 --- /dev/null +++ b/frappe/docs/user/guides/trigger-event-on-deletion-of-grid-row.md @@ -0,0 +1,22 @@ + +To trigger an event when a row from a grid has been deleted, you need to add a handler the `fieldname_remove` event, where fieldname is the fieldname of the grid (Table) + +

    Example for add

    + +

    Recalculate totals when a Journal Entry row has been added

    + + frappe.ui.form.on("Journal Entry Account", "accounts_add", function(frm){ + cur_frm.cscript.update_totals(frm.doc); + }); + + + +

    Example for delete

    + +

    Recalculate totals when a Journal Entry row has been deleted

    + + frappe.ui.form.on("Journal Entry Account", "accounts_remove", function(frm){ + cur_frm.cscript.update_totals(frm.doc); + }); + + \ No newline at end of file diff --git a/frappe/docs/user/guides/using-html-templates-in-javascript.md b/frappe/docs/user/guides/using-html-templates-in-javascript.md new file mode 100644 index 0000000000..db0cd90b4c --- /dev/null +++ b/frappe/docs/user/guides/using-html-templates-in-javascript.md @@ -0,0 +1,42 @@ +Often while building javascript interfaces, there is a need to render DOM as an HTML template. Frappe Framework uses John Resig's Microtemplate script to render HTML templates in the Desk application. + +> Note 1: In Frappe we use the Jinja-like `{%` tags to embed code rather than the standard `<%` + +> Note 2: Never use single quotes `'` inside the HTML template. + +To render a template, + +1. Create a template `html` file in your app. e.g. `address_list.html` +1. Add it to `build.json` for your app (you can include it in `frappe.min.js` or your own javascript file). +1. To render it in your app, use `frappe.render(frappe.templates.address_list, {[context]})` + +#### Example Template: + +From `erpnext/public/js/templates/address_list.js` + + +

    + {% for(var i=0, l=addr_list.length; i + + {%= __("Edit") %} +

    {%= addr_list[i].address_type %}

    +
    +
    + {% if(addr_list[i].is_primary_address) { %} + {%= __("Primary") %}{% } %} + {% if(addr_list[i].is_shipping_address) { %} + {%= __("Shipping") %}{% } %} +
    +

    {%= addr_list[i].display %}

    +
    + {% } %} + {% if(!addr_list.length) { %} +

    {%= __("No address added yet.") %}

    + {% } %} + + + + + \ No newline at end of file diff --git a/frappe/docs/user/guides/where-do-i-find-standard-print-formats.md b/frappe/docs/user/guides/where-do-i-find-standard-print-formats.md new file mode 100644 index 0000000000..00e351c615 --- /dev/null +++ b/frappe/docs/user/guides/where-do-i-find-standard-print-formats.md @@ -0,0 +1,40 @@ +Standard Print formats are auto generated from the layout of the DocType. You can customize the standard format by +
    +
    + +

    1. Customizing Standard Print

    +Go to Setup > Customize > Customize Form View and you can: +
    +
      +
    1. Re-arranging fields by dragging and dropping
    2. +
    3. Add static elements by adding HTML type fields and adding your HTML in Options + +
    4. +
    5. Hiding fields by setting the Print Hide property
    6. +
    +
    + +

    2. Creating new layouts based on Print Formats

    + +

    As there are not templates that are generated for standard Print Formats, you will have to create new templates from scratch using the Jinja Templating Language via

    +

    Setup > Printing and Branding > Print Format + +

    +
      +
    1. See Print Format help. +
      +
    2. +
    3. You can use the Bootstrap CSS framework to layout your print formats +
      +
    4. +
    +
    +

    Tip: You can import Standard Template macros for building your print formats. + +

    +

    Example, adding the standard header: +
    +

    +
    {% raw %}{%- from "templates/print_formats/standard_macros.html" import add_header -%}
    +{{ add_header() }}{% endraw %}
    +
    diff --git a/frappe/docs/user/guides/writing-tests.md b/frappe/docs/user/guides/writing-tests.md new file mode 100644 index 0000000000..f151416ccd --- /dev/null +++ b/frappe/docs/user/guides/writing-tests.md @@ -0,0 +1,109 @@ +# Writing Tests + +### Introduction + +Frappe provides some basic tooling to quickly write automated tests. There are some basic rules: + +1. Test can be anywhere in your repository but must begin with `test_` and should be a `.py` file. +1. Tests must run on a site that starts with `test_`. This is to prevent accidental loss of data. +1. Test stubs are automatically generated for new DocTypes. +1. Frappe test runner will automatically build test records for dependant DocTypes identified by the `Link` type field (Foreign Key) +1. Tests can be executed using `bench run-tests` +1. For non-DocType tests, you can write simple unittests and prefix your file names with `test_`. + +### Tests for a DocType + +#### Writing DocType Tests: + +1. Records that are used for testing are stored in a file `test_records.json` in the doctype folder. [For example see the Event Tests](https://github.com/frappe/frappe/blob/develop/frappe/core/doctype/event/test_records.json). +1. Test cases are in a file named `test_[doctype].py` +1. To provide the test records (and dependencies) call `test_records = frappe.get_test_records('Event')` in your test case file. + +#### Example (for `test_records.json`): + + [ + { + "doctype": "Event", + "subject":"_Test Event 1", + "starts_on": "2014-01-01", + "event_type": "Public" + }, + { + "doctype": "Event", + "starts_on": "2014-01-01", + "subject":"_Test Event 2", + "event_type": "Private" + }, + { + "doctype": "Event", + "starts_on": "2014-01-01", + "subject":"_Test Event 3", + "event_type": "Private", + "event_individuals": [{ + "person": "test1@example.com" + }] + } + ] + + +#### Example (for `test_event.py`): + + # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors + # MIT License. See license.txt + + import frappe + import frappe.defaults + import unittest + + # load test records and dependencies + test_records = frappe.get_test_records('Event') + + class TestEvent(unittest.TestCase): + def tearDown(self): + frappe.set_user("Administrator") + + def test_allowed_public(self): + frappe.set_user("test1@example.com") + doc = frappe.get_doc("Event", frappe.db.get_value("Event", {"subject":"_Test Event 1"})) + self.assertTrue(frappe.has_permission("Event", doc=doc)) + + def test_not_allowed_private(self): + frappe.set_user("test1@example.com") + doc = frappe.get_doc("Event", frappe.db.get_value("Event", {"subject":"_Test Event 2"})) + self.assertFalse(frappe.has_permission("Event", doc=doc)) + + def test_allowed_private_if_in_event_user(self): + frappe.set_user("test1@example.com") + doc = frappe.get_doc("Event", frappe.db.get_value("Event", {"subject":"_Test Event 3"})) + self.assertTrue(frappe.has_permission("Event", doc=doc)) + + def test_event_list(self): + frappe.set_user("test1@example.com") + res = frappe.get_list("Event", filters=[["Event", "subject", "like", "_Test Event%"]], fields=["name", "subject"]) + self.assertEquals(len(res), 2) + subjects = [r.subject for r in res] + self.assertTrue("_Test Event 1" in subjects) + self.assertTrue("_Test Event 3" in subjects) + self.assertFalse("_Test Event 2" in subjects) + +#### Running Tests + +To run a test for a doctype + + bench run-tests --doctype [doctype] + +This function will build all the test dependencies and run your tests. + +### Running All Tests + +To run all tests: + + bench run-tests + +--- + +## Client Side Testing (Using Selenium) + +> This feature is still under development. + +For an example see, [https://github.com/frappe/erpnext/blob/develop/erpnext/tests/sel_tests.py](https://github.com/frappe/erpnext/blob/develop/erpnext/tests/sel_tests.py) diff --git a/frappe/docs/user/index.md b/frappe/docs/user/index.md new file mode 100644 index 0000000000..a25785e59e --- /dev/null +++ b/frappe/docs/user/index.md @@ -0,0 +1,3 @@ +# Develop Apps with Frappe + +{index} diff --git a/frappe/docs/user/index.txt b/frappe/docs/user/index.txt new file mode 100644 index 0000000000..dfc33261aa --- /dev/null +++ b/frappe/docs/user/index.txt @@ -0,0 +1,2 @@ +tutorial +guides diff --git a/frappe/docs/user/tutorial/app.md b/frappe/docs/user/tutorial/app.md new file mode 100644 index 0000000000..4352ddee88 --- /dev/null +++ b/frappe/docs/user/tutorial/app.md @@ -0,0 +1,9 @@ +# What is an Application + +An Application in Frappe in just a standard Python application. You can structure a Frappe Application the same way you structure a standard Python Application. For deployment, Frappe uses the standard Python Setuptools, so you can easily port and install the application on any machine. + +Frappe Framework provides a WSGI interface and for development you can use the built-in Werkzeug server. For implementing in production, we recommend using nginx and gunicorn. + +Frappe also has a multi-tenant architecture, grounds up. This means that you can run multiple "sites" in your setup, each could be serving a different set of applications and users. The database for each site is separate. + +{next} diff --git a/frappe/docs/user/tutorial/before.md b/frappe/docs/user/tutorial/before.md new file mode 100644 index 0000000000..71df8823de --- /dev/null +++ b/frappe/docs/user/tutorial/before.md @@ -0,0 +1,48 @@ +# Before You Start + +

    A list of tools, technologies that will be very helpful for building apps in Frappe.

    + +There are a number of good tutorials online and we found [CodeAcademy](http://www.codecademy.com/) to be the most beautiful ones out there here bunch of lessons you can learn from CodeAcademy + +--- + +#### 1. Python + +Server side Frappe is written in Python and its a good idea to [quickly learn Python](http://www.codecademy.com/tracks/python) before you started digging into Frappe. Another good place to learn Python is the [tutorial on docs.python.org](https://docs.python.org/2.7/tutorial/index.html). Note that Frappe uses Python 2.7 + +To write quality server side code, you must include automatic tests. You can learn the [basics of test driven development here](http://code.tutsplus.com/tutorials/beginning-test-driven-development-in-python--net-30137). + +--- + +#### 2. Databases MariaDB / MySQL + +You need to understand the basics of databases, like how to install, login, create new databases, and basic SQL queries. Here is a [very quick introduction to MySQL](https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial) or head to [the MariaDB site for a more detailed understanding](https://mariadb.com/kb/en/mariadb/documentation/getting-started/) + +--- + +#### 3. HTML / CSS + +If you are building user interfaces, you will need to [learn basic HTML / CSS](http://www.codecademy.com/tracks/web) and the [Boostrap CSS Framework](http://getbootstrap.com) + +--- + +#### 4. Building UI with Javascript and JQuery + +To customize forms and create new rich user interfaces, it is best to [learn Javacsript](http://www.codecademy.com/tracks/javascript) and the [popular library JQuery](http://www.codecademy.com/tracks/jquery). + +--- + +#### 5. Customizing Prints and Web pages with Jinja Templating + +If you are customizing Print templates, you need to learn the [Jinja Templating language](http://jinja.pocoo.org/). It is an easy way to create dynamic web pages (HTML). + +--- + +#### 6. Git and GitHub + +[Learn how to contribute back to an open source project usign Git and GitHub](https://guides.github.com/activities/contributing-to-open-source/), two great tools to help you manage your code and share it with others. + +--- + +When you are ready, [try building a sample application on Frappe](/tutorial/app) + diff --git a/frappe/docs/user/tutorial/bench.md b/frappe/docs/user/tutorial/bench.md new file mode 100644 index 0000000000..e720d9dc98 --- /dev/null +++ b/frappe/docs/user/tutorial/bench.md @@ -0,0 +1,11 @@ +# Installing the Frappe Bench + +Easiest way to setup frappe on a Unix Like system is to use frappe-bench. Read the detailed instructions on how to install using Frappe Bench. + +> [https://github.com/frappe/bench](https://github.com/frappe/bench) + +With Frappe Bench you will be able to setup and host multiple applications and sites and it will also setup a Python Virtualenv so that you can have an isolated environment to run your applications (and will not have version conflict with other development environments). + +The `bench` command line tool will also be installed that will help you in development and management of the installation. + +{next} diff --git a/frappe/docs/user/tutorial/conclusion.md b/frappe/docs/user/tutorial/conclusion.md new file mode 100644 index 0000000000..f45b64ba23 --- /dev/null +++ b/frappe/docs/user/tutorial/conclusion.md @@ -0,0 +1,7 @@ +# Conclusion + + +We hope this will give you an overview of how applications are developed in Frappe. The objective was to briefly touch on the various aspects of application development and give a broad overview. To get help on specific issues, look at the API. + +For help, join the community at the [chat channel on Gitter](https://gitter.im/frappe/erpnext) or the [developer forum](https://discuss.erpnext.com) + diff --git a/frappe/docs/user/tutorial/controllers.md b/frappe/docs/user/tutorial/controllers.md new file mode 100644 index 0000000000..5397268941 --- /dev/null +++ b/frappe/docs/user/tutorial/controllers.md @@ -0,0 +1,59 @@ +# Controllers + +Next step would be adding methods and event handlers to models. In your app, we sould like to ensure that if a Library Tranasction is made, the Artilce in question must be in stock and the member loaning the Article must have a valid membership. + +For this, we can write a validation just before the Library Transaction object is saved. To do this, open the `library_management/doctype/library_transaction/library_transaction.py` template. + +This file is the controller for the Library Transaction object. In this you can write methods for: + +1. `before_insert` +1. `validate` (before inserting or updating) +1. `on_update` (after saving) +1. `on_submit` (when document is set as submitted) +1. `on_cancel` +1. `on_trash` (before it is about to be deleted) + +You can write methods for these events and they will be called by the framework when the document is saved etc. + +Here is the finished controller: + + from __future__ import unicode_literals + import frappe + from frappe import _ + from frappe.model.document import Document + + class LibraryTransaction(Document): + def validate(self): + last_transaction = frappe.get_list("Library Transaction", + fields=["transaction_type", "transaction_date"], + filters = { + "article": self.article, + "transaction_date": ("<=", self.transaction_date), + "name": ("!=", self.name) + }) + if self.transaction_type=="Issue": + msg = _("Article {0} {1} has not been recorded as returned since {2}") + if last_transaction and last_transaction[0].transaction_type=="Issue": + frappe.throw(msg.format(self.article, self.article_name, + last_transaction[0].transaction_date)) + else: + if not last_transaction or last_transaction[0].transaction_type!="Issue": + frappe.throw(_("Cannot return article not issued")) + +In this script: + +1. We get the last trasaction before the current transaction date using the query function `frappe.get_list` +1. If the last transaction is something we don't like we throw an exception using `frappe.throw` +1. We use `_("text")` method to identify translatable strings. + +Check if your validations work by creating new records + +Transaction + +#### Debugging + +To Debug, always keep your JS Console open. Lookout for both Javascript and server tracebacks. + +Also check your terminal window for exceptions. Any **500 Internal Server Errors** will get printed in your terminal where on which your server is running. + +{next} diff --git a/frappe/docs/user/tutorial/doctype-directory-structure.md b/frappe/docs/user/tutorial/doctype-directory-structure.md new file mode 100644 index 0000000000..bcb53d9541 --- /dev/null +++ b/frappe/docs/user/tutorial/doctype-directory-structure.md @@ -0,0 +1,31 @@ +# DocType Directory Structure + +After saving the DocTypes, check that the model `.json` and `.py` files are created in the `library_management/library_management` module. The directory structure after creating the models should look like this: + + . + ├── MANIFEST.in + ├── README.md + ├── library_management + .. + │   ├── library_management + │   │   ├── __init__.py + │   │   └── doctype + │   │   ├── __init__.py + │   │   ├── article + │   │   │   ├── __init__.py + │   │   │   ├── article.json + │   │   │   └── article.py + │   │   ├── library_member + │   │   │   ├── __init__.py + │   │   │   ├── library_member.json + │   │   │   └── library_member.py + │   │   ├── library_membership + │   │   │   ├── __init__.py + │   │   │   ├── library_membership.json + │   │   │   └── library_membership.py + │   │   └── library_transaction + │   │   ├── __init__.py + │   │   ├── library_transaction.json + │   │   └── library_transaction.py + +{next} diff --git a/frappe/docs/user/tutorial/doctypes.md b/frappe/docs/user/tutorial/doctypes.md new file mode 100644 index 0000000000..7cf2aa5ce4 --- /dev/null +++ b/frappe/docs/user/tutorial/doctypes.md @@ -0,0 +1,94 @@ +# DocType + +After creating the Roles, let us create the **DocTypes** + +To create a new **DocType**, go to: + +> Core > Documents > Doctype > New + +New Doctype + +In the DocType, first the Module, which in our case is **Library Managment** + +#### Adding Fields + +In the Fields Table, you can add the fields (properties) of the DocType (Article). + +Fields are much more than database columns, they can be: + +1. Columns in the database +1. For Layout (section / column breaks) +1. Child tables (Table type field) +1. HTML +1. Actions (button) +1. Attachments or Images + +Let us add the fields of the Article. + +Adding Fields + +When you add fields, you need to enter the **Type**. **Label** is optional for Section Break and Column Break. **Name** (`fieldname`) is the name of the database table column and also the property of the controller. This has to be *code friendly*, i.e. it has to have small cases are _ instead of " ". If you leave the Fieldname blank, it will be automatically set when you save it. + +You can also set other properties of the field like whether it is mandatory, read only etc. + +We can add the following fields: + +1. Article Name (Data) +1. Author (Data) +1. Status (Select): For Select fields, you will enter the Options. Enter **Issued** and **Available** each on a new line in the Options box. See diagram below +1. Publisher (Data) +1. Language (Data) +1. Image (Attach) +1. Image View (Image) + +#### Add Permissions + +After adding the fields, add Permissions. For now, let us give Read, Write, Create, Delete and Report access to **Librarian**. Frappe has a finely grained Role based permission model. You can also change permissions later using the **Role Permissions Manager** from **Setup**. + +Adding Permissions + +#### Saving + +Click on the **Save** button. When the button is clicked, a popup will ask you for the name. Enter it and save the DocType. + +Now login into mysql and check the database table created: + + $ bench mysql + Welcome to the MariaDB monitor. Commands end with ; or \g. + Your MariaDB connection id is 3931 + Server version: 5.5.36-MariaDB-log Homebrew + + Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. + + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + + MariaDB [library]> desc `tabArticle`; + +--------------+--------------+------+-----+---------+-------+ + | Field | Type | Null | Key | Default | Extra | + +--------------+--------------+------+-----+---------+-------+ + | name | varchar(255) | NO | PRI | NULL | | + | creation | datetime(6) | YES | | NULL | | + | modified | datetime(6) | YES | | NULL | | + | modified_by | varchar(40) | YES | | NULL | | + | owner | varchar(60) | YES | | NULL | | + | docstatus | int(1) | YES | | 0 | | + | parent | varchar(255) | YES | MUL | NULL | | + | parentfield | varchar(255) | YES | | NULL | | + | parenttype | varchar(255) | YES | | NULL | | + | idx | int(8) | YES | | NULL | | + | article_name | varchar(255) | YES | | NULL | | + | status | varchar(255) | YES | | NULL | | + | description | text | YES | | NULL | | + | image | varchar(255) | YES | | NULL | | + | publisher | varchar(255) | YES | | NULL | | + | isbn | varchar(255) | YES | | NULL | | + | language | varchar(255) | YES | | NULL | | + | author | varchar(255) | YES | | NULL | | + +--------------+--------------+------+-----+---------+-------+ + 18 rows in set (0.00 sec) + + +As you can see, along with the DocFields, a bunch of standard columns have also been added to the table. Important to note here are, the primary key, `name`, `onwer` is the user who has created the record, `creation` and `modified` are timestamps for creation and last modification. + +{next} + diff --git a/frappe/docs/user/tutorial/form-client-scripting.md b/frappe/docs/user/tutorial/form-client-scripting.md new file mode 100644 index 0000000000..a2afd1033c --- /dev/null +++ b/frappe/docs/user/tutorial/form-client-scripting.md @@ -0,0 +1,37 @@ +## Scripting Forms + +Now we have created a basic system that works out of the box without us having to write any code. Let us now write some scripts to make the application richer and add validations so that the user does not enter wrong data. + +### Client Side Scripting + +In the **Library Transaction** DocType, we have only field for Member Name. We have not made two fields. Now this could well be two fields (and probably should), but for the sake of example, let us consider we have to implement this. To do this we would have to write a event handler for the event when the user selects the `library_member` field and then access the member resource from the server using REST API and set the values in the form. + +To start the script, in the `library_management/doctype/library_transaction` folder, create a new file `library_transaction.js`. This file will be automatically executed when the first Library Transaction is opened by the user. So in this file, we can bind events and write other functions. + +#### library_transaction.js + + frappe.ui.form.on("Library Transaction", "library_member", + function(frm) { + frappe.call({ + "method": "frappe.client.get", + args: { + doctype: "Library Member", + name: frm.doc.library_member + }, + callback: function (data) { + frappe.model.set_value(frm.doctype, + frm.docname, "member_name", + data.message.first_name + + (data.message.last_name ? + (" " + data.message.last_name) : "")) + } + }) + }); + +1. **frappe.ui.form.on(*doctype*, *fieldname*, *handler*)** is used to bind a handler to the event when the property library_member is set. +1. In the handler, we trigger an AJAX call to `frappe.client.get`. In response we get the requested object as JSON. [Learn more about the API](/help/rest_api). +1. Using **frappe.model.set_value(*doctype*, *name*, *fieldname*, *value*)** we set the value in the form. + +**Note:** To check if your script works, remember to 'reload' the page before testing your script. Client script changes are not automatically picked up when you are in developer mode. + +{next} diff --git a/frappe/docs/user/tutorial/index.md b/frappe/docs/user/tutorial/index.md new file mode 100644 index 0000000000..13015b7b9e --- /dev/null +++ b/frappe/docs/user/tutorial/index.md @@ -0,0 +1,33 @@ +# Frappe Tutorial + +In this guide we will show you how to create an application from scratch using **Frappe**. Using the example of a Library Management System, we will cover: + +1. Installation +1. Making a New App +1. Making Models +1. Creating Users and Records +1. Creating Controllers +1. Creating Web Views +1. Setting Hooks and Tasks + +## Who is This For? + +This guide is intended for software developers who are familiar with how the web applications are built and served. Frappe Framework is built on Python and uses MariaDB database and for creating web views, HTML/CSS/Javascript is used. So it would be great if you are familiar with all these techonlogies. At minimum if you have never used Python before, you should take a quick tutorial before your use this Guide. + +Frappe uses the git version control system on GitHub. It is also important that you are familiar with basic git and have an account on GitHub to manage your applications. + +## Example + +For this guide book, we will build a simple **Library Management** application. In this application we will have models: + +1. Article (Book or any other item that can be loaned) +1. Library Member +1. Library Transaction (Issue or Return of an article) +1. Library Membership (A period in which a member is allowed to transact) +1. Library Management Setting (Global settings like period of loan) + +The user interface (UI) for the librarian will be the **Frappe Desk**, a built-in browser based UI enviornment where forms are automatically generated from the models and roles and permissions are also applied. + +We will also create web views for library where users can browser articles from a website. + +{index} diff --git a/frappe/docs/user/tutorial/index.txt b/frappe/docs/user/tutorial/index.txt new file mode 100644 index 0000000000..1fed6aed93 --- /dev/null +++ b/frappe/docs/user/tutorial/index.txt @@ -0,0 +1,19 @@ +before +app +bench +new-app +setting-up-the-site +start +models +roles +doctypes +naming-and-linking +doctype-directory-structure +users-and-records +form-client-scripting +controllers +reports +web-views +single-doctypes +task-runner +conclusion diff --git a/frappe/docs/user/tutorial/models.md b/frappe/docs/user/tutorial/models.md new file mode 100644 index 0000000000..63acac9bde --- /dev/null +++ b/frappe/docs/user/tutorial/models.md @@ -0,0 +1,19 @@ +# Making Models + +The next step is to create the models as we discussed in the introduction. In Frappe, models are called **DocType**. You can create new DocTypes from the Desk UI. **DocTypes** are made of fields called **DocField** and role based permissions are integrated into the models, these are called **DocPerms**. + +When a DocType is saved, a new table is created in the database. This table is named as `tab[doctype]`. + +When you create a **DocType** a new folder is created in the **Module** and a model JSON file and a controller template in Python are automatically created. When you update the DocType, the JSON model file is updated and whenever `bench migrate` is executed, it is synced with the database. This makes it easy to propagate schema changes and migrate. + +### Developer Mode + +To create models, you must set `developer_mode` as 1 in the `site_config.json` file. + + { + "db_name": "library", + "db_password": "v3qHDeVKvWVi7s97", + "developer_mode": 1 + } + +{next} diff --git a/frappe/docs/user/tutorial/naming-and-linking.md b/frappe/docs/user/tutorial/naming-and-linking.md new file mode 100644 index 0000000000..9cfacfe7f1 --- /dev/null +++ b/frappe/docs/user/tutorial/naming-and-linking.md @@ -0,0 +1,71 @@ +# DocType Naming and Linking + +Then let us create the other DocType and save it too: + +1. Library Member (First Name, Last Name, Email ID) + +Doctype Saved + + +#### Naming of DocTypes + +DocTypes can be named in different ways: + +1. Based on a field +1. Based on a series +1. By controller (code) +1. Prompt + +This can be set by entering the **Autoname** field. For controller, leave blank. + +> **Search Fields**: A DocType may be named on a series but it still needs to be searched by name. In our case, the Article will be searched by the title or the author name. So this can be entered in search field. + +Autonaming and Search Field + +#### Link and Select Fields + +Foreign keys are specified in Frappe as **Link** type fields. The target DocType must be mentioned in the Options table. + +In our example, in the Library Transaction DocType, we have to link both the Library Member and the Article. + +**Note:** Remeber that Link fields are not automatically set as Foreign Keys in the MariaDB database, because that will implicitly index the column. This may not be optimum hence the Foreign Key validation is done by the Framework. + +Link Field + +For select fields, as we mentioned earlier, add the various options in the **Options** input box, each option on a new row. + +Select Field + +Similary complete making the other models. + +#### Linked Values + +A standard pattern is when you select an ID, say **Library Member** in **Library Membership**, then the Member's first and last names should be copied into relevant fields in the Library Membership Transaction. + +To do this, we can use Read Only fields and in options, we can set the the name of the link and the fieldname of the property we want to fetch. For this example in **Member First Name** we can set `library_member.first_name` + +Fetch values + +### Complete the Models + +In the same way, you can complete all the models so that the final fields look like this: + +#### Article + +Article + +#### Library Member + +Library Member + +#### Library Membership + +Library Membership + +#### Library Transaction + +Library Transaction + +> Make sure to give permissions to **Librarian** on each DocType + +{next} diff --git a/frappe/docs/user/tutorial/new-app.md b/frappe/docs/user/tutorial/new-app.md new file mode 100644 index 0000000000..63f4b63a08 --- /dev/null +++ b/frappe/docs/user/tutorial/new-app.md @@ -0,0 +1,54 @@ +# Make a New App + +After the bench is installed, there are two main folders, `apps` and `sites`. All the applications will be installed in apps. + +To make a new application, go to your bench folder and run, `bench new-app {app_name}` and fill in details about the application. This will create a boilerplate application for your. + + $ bench new-app library_management + App Title (defaut: Lib Mgt): Liblary Management + App Description: App for managing Articles, Members, Memberships and Transactions for Libraries + App Publisher: Frappe + App Email: info@frappe.io + App Icon (default 'octicon octicon-file-directory'): octicon octicon-book + App Color (default 'grey'): #589494 + App License (default 'MIT'): GNU General Public License + +### App Structure + +The application will be created in a folder called `library_management` and will have the following structure: + + . + ├── MANIFEST.in + ├── README.md + ├── library_management + │   ├── __init__.py + │   ├── config + │   │   ├── __init__.py + │   │   └── desktop.py + │   ├── hooks.py + │   ├── library_management + │   │   └── __init__.py + │   ├── modules.txt + │   ├── patches.txt + │   └── templates + │   ├── __init__.py + │   ├── generators + │   │   └── __init__.py + │   ├── pages + │   │   └── __init__.py + │   └── statics + ├── license.txt + ├── requirements.txt + └── setup.py + +1. `config` folder contains application configuration info +1. `desktop.py` is where desktop icons can be added to the Desk +1. `hooks.py` is where integrations with the environment and other applications is mentioned. +1. `library_management` (inner) is a **module** that is bootstrapped. In Frappe, a **module** is where model and controller files reside. +1. `modules.txt` contains list of **modules** in the app. When you create a new module, it is required that you update it in this file. +1. `patches.txt` is where migration patches are written. They are python module references using the dot notation. +1. `templates` is the folder where web view templates are maintained. Templates for **Login** and other standard pages are bootstrapped in frappe. +1. `generators` are where templates for models are maintained, where each model instance has a separte web route, for example a **Blog Post** where each post has its unique web url. In Frappe, the templating engine used is Jinja2 +1. `pages` is where single route templates are maintained. For example for a "/blog" type of page. + +{next} diff --git a/frappe/docs/user/tutorial/reports.md b/frappe/docs/user/tutorial/reports.md new file mode 100644 index 0000000000..383058e9e3 --- /dev/null +++ b/frappe/docs/user/tutorial/reports.md @@ -0,0 +1,7 @@ +# Reports + +You can also click on the Reports Icon on the toolbar (right) to see tabulated records + +Report + +{next} diff --git a/frappe/docs/user/tutorial/roles.md b/frappe/docs/user/tutorial/roles.md new file mode 100644 index 0000000000..060f220bbe --- /dev/null +++ b/frappe/docs/user/tutorial/roles.md @@ -0,0 +1,14 @@ +# Creating Roles + +Before creating Models, we must create Roles so that we can set permissions on the Model. There are two Roles we will create: + +1. Librarian +1. Library Member + +To create a new Role, go to: + +> Core > Documents > Role > New + +Adding Roles + +{next} diff --git a/frappe/docs/user/tutorial/setting-up-the-site.md b/frappe/docs/user/tutorial/setting-up-the-site.md new file mode 100644 index 0000000000..acc13cc8dc --- /dev/null +++ b/frappe/docs/user/tutorial/setting-up-the-site.md @@ -0,0 +1,53 @@ +# Setting up the Site + +Let us create a new site and call it `library`. + +You can install a new site, by the command `bench new-site library` + +This will create a new database and site folder and install `frappe` (which is also an application!) in the new site. The `frappe` application has two built-in modules **Core** and **Website**. The Core module contains the basic models for the application. Frappe is a batteries included framework and comes with a lot of built-in models. These models are called **DocTypes**. More on that later. + + $ bench new-site library + MySQL root password: + Installing frappe... + Updating frappe : [========================================] + Updating country info : [========================================] + Set Administrator password: + Re-enter Administrator password: + Installing fixtures... + *** Scheduler is disabled *** + +### Site Structure + +A new folder called `library` will be created in the `sites` folder. Here is the standard folder structure for a site. + + . + ├── locks + ├── private + │   └── backups + ├── public + │   └── files + └── site_config.json + +1. `public/files` is where user uploaded files are stored. +1. `private/backups` is where backups are dumped +1. `site_config.json` is where site level configurations are maintained. + +### Setting Default Site + +In case you have multiple sites on you bench use `bench use [site_name]` to set the default site. + +Example: + + $ bench use library + +### Install App + +Now let us install our app `library_management` in our site `library` + +1. Install library_management in library with: `bench --site [site_name] install_app [app_name]` + +Example: + + $ bench install-app library_management + +{next} diff --git a/frappe/docs/user/tutorial/single-doctypes.md b/frappe/docs/user/tutorial/single-doctypes.md new file mode 100644 index 0000000000..53c37cd1d8 --- /dev/null +++ b/frappe/docs/user/tutorial/single-doctypes.md @@ -0,0 +1,9 @@ +# Single DocTypes + +A application will usually have a Settings page. In our application, we can define a page where we can set the loan period. We also need to save this property. In Frappe, this can be done using a **Single** type DocType. A Single DocType is like the Singleton pattern in Java. It is an object with only one instance. Let us call this as **Library Managment Settings**. + +To create an new Single DocType, mark the **Is Single** property as checked. + +Single Doctypes + +{next} diff --git a/frappe/docs/user/tutorial/start.md b/frappe/docs/user/tutorial/start.md new file mode 100644 index 0000000000..1294c35f8c --- /dev/null +++ b/frappe/docs/user/tutorial/start.md @@ -0,0 +1,30 @@ +# Starting the Bench + +Now we can login and check if everything works. + +To start the development server, run `bench start` + + $ bench start + 13:58:51 web.1 | started with pid 22135 + 13:58:51 worker.1 | started with pid 22136 + 13:58:51 workerbeat.1 | started with pid 22137 + 13:58:52 web.1 | * Running on http://0.0.0.0:8000/ + 13:58:52 web.1 | * Restarting with reloader + 13:58:52 workerbeat.1 | [2014-09-17 13:58:52,343: INFO/MainProcess] beat: Starting... + +You can now open your browser and go to `http://localhost:8000`. You should see this login page if all goes well: + +Login Screen + +Now login as the default user "Administrator" + +Login ID: **Administrator** +Password: **admin** + +When you login, you should see the "Desk" home page + +Desk + +As you can see, the Frappe basic system comes with a bunch of pre-loaded applications and screens like To Do, Calendar etc. These apps can integrated in your app workflow as we progress. + +{next} diff --git a/frappe/docs/user/tutorial/task-runner.md b/frappe/docs/user/tutorial/task-runner.md new file mode 100644 index 0000000000..cb704c12bd --- /dev/null +++ b/frappe/docs/user/tutorial/task-runner.md @@ -0,0 +1,77 @@ +# Scheduled Tasks + +Finally, an application also has to send email notifications and do other kind of scheduled tasks. In Frappe, if you have setup the bench, the task / scheduler is setup via Celery using Redis Queue. + +To add a new task handler, go to `hooks.py` and add a new handler. Default handlers are `all`, `daily`, `weekly`, `monthly`. The `all` handler is called every 3 minutes by default. + + # Scheduled Tasks + # --------------- + + scheduler_events = { + "daily": [ + "library_management.tasks.daily" + ], + } + +Here we can point to a Python function and that function will be executed every day. Let us look what this function looks like: + + # Copyright (c) 2013, Frappe + # For license information, please see license.txt + + from __future__ import unicode_literals + import frappe + from frappe.utils import datediff, nowdate, format_date, add_days + + def daily(): + loan_period = frappe.db.get_value("Library Management Settings", + None, "loan_period") + + overdue = get_overdue(loan_period) + + for member, items in overdue.iteritems(): + content = """

    Following Items are Overdue

    +

    Please return them as soon as possible

      """ + + for i in items: + content += "
    1. {0} ({1}) due on {2}
    2. ".format(i.article_name, + i.article, + format_date(add_days(i.transaction_date, loan_period))) + + content += "
    " + + recipient = frappe.db.get_value("Library Member", member, "email_id") + frappe.sendmail(recipients=[recipient], + sender="test@example.com", + subject="Library Articles Overdue", content=content, bulk=True) + + def get_overdue(loan_period): + # check for overdue articles + today = nowdate() + + overdue_by_member = {} + articles_transacted = [] + + for d in frappe.db.sql("""select name, article, article_name, + library_member, member_name + from `tabLibrary Transaction` + order by transaction_date desc, modified desc""", as_dict=1): + + if d.article in articles_transacted: + continue + + if d.transaction_type=="Issue" and \ + datediff(today, d.transaction_date) > loan_period: + overdue_by_member.setdefault(d.library_member, []) + overdue_by_member[d.library_member].append(d) + + articles_transacted.append(d.article) + +We can place the above code code in any accessible Python module. The route is defined in `hooks.py`, so for our purposes we would place this code in `library_management/tasks.py`. + +Note: + +1. We get the loan period from **Library Management Settings** by using `frappe.db.get_value`. +1. We run a query in the database with `frappe.db.sql` +1. Email is sent via `frappe.sendmail` + +{next} diff --git a/frappe/docs/user/tutorial/users-and-records.md b/frappe/docs/user/tutorial/users-and-records.md new file mode 100644 index 0000000000..ad615eec01 --- /dev/null +++ b/frappe/docs/user/tutorial/users-and-records.md @@ -0,0 +1,55 @@ +# Making Users and Records + +Now that we have created the models, we can directly start making records using Frappe Desk UI. You do not have to create views! Views in Frappe are automatically made based on the DocType properties. + +### 4.1 Creating User + +To make records, we will first create a User. To create a user, go to: + +> Setup > Users > User > New + +Create a new User and set the name and first name and new password. + +Also give the Librarian and Library Member Roles to this user + +Add User Roles + +Now logout and login using the new user id and password. + +### 4.2 Creating Records + +You will now see an icon for the Library Management module. Click on that icon and you will see the Module page: + +Library Management Module + +Here you can see the DocTypes that we have created for the application. List us start creating a few records. + +First let us create a new Article: + +New Article + +Here you will see that the the DocType you had created has been rendered as a form. The validations and other rules will also apply as designed. Let us fill out one Article. + +New Article + +You can also add an image. + +Attach Image + +Now let us create a new member: + +New Library Member + +After this, let us create a new membership record for the member. + +Here if you remember we had set the values of Member First Name and Member Last Name to be directly fetched from the Member records and as soon as you will select the member id, the names will be updated. + +New Library Membership + +As you can see that the date is formatted as year-month-day which is a system format. To set / change date, time and number formats, go to + +> Setup > System Settings + +System Settings + +{next} diff --git a/frappe/docs/user/tutorial/web-views.md b/frappe/docs/user/tutorial/web-views.md new file mode 100644 index 0000000000..a9794bae88 --- /dev/null +++ b/frappe/docs/user/tutorial/web-views.md @@ -0,0 +1,64 @@ +# Web Views + +Frappe has two main user environments, the Desk and Web. Desk is a controlled UI environment with a rich AJAX application and the web is more traditional HTML templates served for public consumption. Web views can also be generated to create more controlled views for users who may login but still do not have access to the Desk. + +In Frappe, Web Views are managed by templates and they are usually in the `templates` folder. There are 2 main types of templates. + +1. Pages: These are Jinja templates where a single view exists for a single web route e.g. `/blog`. +2. Generators: These are templates where each instance of a DocType has a separate web route `/blog/a-blog`, `blog/b-blog` etc. +3. Lists and Views: These are standard lists and views with the route `[doctype]/[name]` and are rendered based on permission. + +### Standard Web Views + +> This features is still under development. + +Let us look at the standard Web Views: + +If you are logged in as the test user, go to `/article` and you should see the list of articles: + +![Web List]({{url_prefix}}/assets/img/guide/26-web-list.png) + +Click on one article and you will see the default web view + +![Web List]({{url_prefix}}/assets/img/guide/26-web-view.png) + +Now if you want to make a better list view for the article, drop a file called `list_item.html` in the `library_management/doctype/article` folder. Here is an example file: + +
    +
    + + + +
    +
    +

    {{ doc.article_name }}

    +

    {{ doc.author }}

    +

    {{ (doc.description[:200] + "...") + if doc.description|length > 200 else doc.description }}

    +

    Publisher: {{ doc.publisher }}

    +
    +
    + + +Here, you will get all the properties of the article in the `doc` object. + +The updated list view looks like this! + +![Web List]({{url_prefix}}/assets/img/guide/27-web-view-list.png) + +#### Home Page + +Frappe also has a built-in signup workflow which also includes 3rd party signups via Google, Facebook and GitHub. When a user signs up on the web, she does not have access to the desk interface by default. + +> To allow user access into the Desk, open set the user from Setup > User and set the User Type as "System User" + +Now for the non system users, we can set a home page when they login via `hooks.py` based on the role. + +To when library members sign in, they must be redirected to the `article` page, to set this open `library_management/hooks.py` and add this: + + role_home_page = { + "Library Member": "article" + } + +{next} diff --git a/frappe/hooks.py b/frappe/hooks.py index 3dbd6b96f9..35bc62754b 100644 --- a/frappe/hooks.py +++ b/frappe/hooks.py @@ -30,6 +30,7 @@ app_icon = "octicon octicon-circuit-board" app_version = "6.6.1" app_color = "orange" source_link = "https://github.com/frappe/frappe" +app_license = "MIT" app_email = "info@frappe.io" diff --git a/frappe/templates/autodoc/api_home.html b/frappe/templates/autodoc/api_home.html index fc34d64263..4c6d8218b6 100644 --- a/frappe/templates/autodoc/api_home.html +++ b/frappe/templates/autodoc/api_home.html @@ -9,4 +9,6 @@

    Contents

    + + {index} diff --git a/frappe/templates/autodoc/base_template.html b/frappe/templates/autodoc/base_template.html index 5bacffc3e6..5a07b7a5c1 100644 --- a/frappe/templates/autodoc/base_template.html +++ b/frappe/templates/autodoc/base_template.html @@ -62,6 +62,7 @@ {% block content %}
    {{ content }} +
    {% endblock %} diff --git a/frappe/templates/autodoc/contents.html b/frappe/templates/autodoc/contents.html index 02f357465a..59d0b4459d 100644 --- a/frappe/templates/autodoc/contents.html +++ b/frappe/templates/autodoc/contents.html @@ -5,5 +5,6 @@ {% include "templates/includes/full_index.html" %} + diff --git a/frappe/templates/autodoc/contents.py b/frappe/templates/autodoc/contents.py index 2402d213dc..131d4102a3 100644 --- a/frappe/templates/autodoc/contents.py +++ b/frappe/templates/autodoc/contents.py @@ -6,5 +6,4 @@ import frappe from frappe.website.utils import get_full_index def get_context(context): - context.full_index = get_full_index(base_url=getattr(frappe.local, "docs_base_url"), - extn = True) + context.full_index = get_full_index(extn = True) diff --git a/frappe/templates/autodoc/dev_home.html b/frappe/templates/autodoc/dev_home.html index 4eb1ca7313..cfe2d5755d 100644 --- a/frappe/templates/autodoc/dev_home.html +++ b/frappe/templates/autodoc/dev_home.html @@ -44,4 +44,6 @@ - + + + diff --git a/frappe/templates/autodoc/docs_home.html b/frappe/templates/autodoc/docs_home.html index 2e70e5bb00..9ba30927fa 100644 --- a/frappe/templates/autodoc/docs_home.html +++ b/frappe/templates/autodoc/docs_home.html @@ -3,7 +3,7 @@

    {{ app.headline }}

    -

    {{ app.description }}

    +

    {{ app.sub_heading }}

    @@ -13,10 +13,17 @@
    +{% if app.long_description %} +
    + {{ app.long_description|markdown }} +
    +{% endif %} +
    Table of Contents
    +{% if not app.hide_install %}

    Install

    @@ -42,4 +49,7 @@ $ bench --site testsite install-app {{app.name}}

    {{ app.publisher }} ({{ app.email }})

    +{% endif %} + + diff --git a/frappe/templates/autodoc/doctype.html b/frappe/templates/autodoc/doctype.html index 4ce642a989..83792cde59 100644 --- a/frappe/templates/autodoc/doctype.html +++ b/frappe/templates/autodoc/doctype.html @@ -83,4 +83,6 @@ {% endif %} {% endif %} - + + + diff --git a/frappe/templates/autodoc/install.md b/frappe/templates/autodoc/install.md index 689640ae18..63d2a17a38 100644 --- a/frappe/templates/autodoc/install.md +++ b/frappe/templates/autodoc/install.md @@ -27,3 +27,4 @@ To run this locally, run Fire up your browser and go to http://localhost:8000 and you should see the login screen. Login as **Administrator** and **admin** (or the password you set at the time of `new-site`) and you are set. + diff --git a/frappe/templates/autodoc/license.html b/frappe/templates/autodoc/license.html index 78b0af897e..de9a5e2314 100644 --- a/frappe/templates/autodoc/license.html +++ b/frappe/templates/autodoc/license.html @@ -3,3 +3,5 @@

    {{ app.license}}

    {{ license_text }} + + diff --git a/frappe/templates/autodoc/macros.html b/frappe/templates/autodoc/macros.html index 4c1944b961..5d0151d9ea 100644 --- a/frappe/templates/autodoc/macros.html +++ b/frappe/templates/autodoc/macros.html @@ -52,7 +52,7 @@ {% endmacro %} {% macro source_link(app, file_path, tree=False) %} - Source {% endmacro %} diff --git a/frappe/templates/autodoc/models_home.html b/frappe/templates/autodoc/models_home.html index 6d39843ef7..c9f960d416 100644 --- a/frappe/templates/autodoc/models_home.html +++ b/frappe/templates/autodoc/models_home.html @@ -11,3 +11,5 @@

    Contents

    {index} + + diff --git a/frappe/templates/autodoc/module_home.html b/frappe/templates/autodoc/module_home.html index 3114f9ec1a..3e75f3aeca 100644 --- a/frappe/templates/autodoc/module_home.html +++ b/frappe/templates/autodoc/module_home.html @@ -9,3 +9,5 @@

    DocTypes for {{ name }}

    {index} + + diff --git a/frappe/templates/autodoc/package_index.html b/frappe/templates/autodoc/package_index.html index 03cbaa5aca..0381e07af0 100644 --- a/frappe/templates/autodoc/package_index.html +++ b/frappe/templates/autodoc/package_index.html @@ -9,3 +9,5 @@

    Package Contents

    {index} + + diff --git a/frappe/templates/autodoc/pymodule.html b/frappe/templates/autodoc/pymodule.html index 14e528f68b..0d398ac585 100644 --- a/frappe/templates/autodoc/pymodule.html +++ b/frappe/templates/autodoc/pymodule.html @@ -8,3 +8,5 @@ {{ automodule(name) }} + + diff --git a/frappe/utils/boilerplate.py b/frappe/utils/boilerplate.py index 3f90865dab..4a7395ced9 100644 --- a/frappe/utils/boilerplate.py +++ b/frappe/utils/boilerplate.py @@ -262,8 +262,10 @@ docs_template = '''""" Configuration for docs """ -# source_link = "https://github.com/org/repo" -# docs_base_url = "https://frappe.github.io/repo" +# source_link = "https://github.com/[org_name]/{app_name}" +# docs_base_url = "https://[org_name].github.io/{app_name}" +# headline = "App that does everything" +# sub_heading = "Yes, you got that right the first time, everything" def get_context(context): context.brand_html = "{app_title}" diff --git a/frappe/utils/setup_docs.py b/frappe/utils/setup_docs.py index e62b9ac1ad..c2ea173cbd 100644 --- a/frappe/utils/setup_docs.py +++ b/frappe/utils/setup_docs.py @@ -23,19 +23,24 @@ class setup_docs(object): def setup_app_context(self): self.docs_config = frappe.get_module(self.app + ".config.docs") + version = self.hooks.get("app_version")[0] self.app_context = { "app": frappe._dict({ "name": self.app, "title": self.app_title, "description": markdown2.markdown(self.hooks.get("app_description")[0]), - "version": self.hooks.get("app_version")[0], - "headline": self.hooks.get("app_headline")[0], + "version": version, "publisher": self.hooks.get("app_publisher")[0], "icon": self.hooks.get("app_icon")[0], "email": self.hooks.get("app_email")[0], + "headline": self.docs_config.headline, + "sub_heading": self.docs_config.sub_heading, "source_link": self.docs_config.source_link, + "hide_install": getattr(self.docs_config, "hide_install", False), "docs_base_url": self.docs_config.docs_base_url, - "license": self.hooks.get("app_license")[0] + "long_description": getattr(self.docs_config, "long_description", ""), + "license": self.hooks.get("app_license")[0], + "branch": getattr(self.docs_config, "branch", None) or ("v" + version) }) } @@ -52,6 +57,39 @@ class setup_docs(object): shutil.rmtree(self.path, ignore_errors = True) os.makedirs(self.path) + self.make_home_pages() + + for basepath, folders, files in os.walk(self.app_path): + + # make module home page + if "/doctype/" not in basepath and "doctype" in folders: + module = os.path.basename(basepath) + + module_folder = os.path.join(self.models_base_path, module) + + self.make_folder(module_folder, + template = "templates/autodoc/module_home.html", + context = {"name": module}) + self.update_index_txt(module_folder) + + # make for model files + if "/doctype/" in basepath: + parts = basepath.split("/") + #print parts + module, doctype = parts[-3], parts[-1] + + if doctype not in ("doctype", "boilerplate"): + self.write_model_file(basepath, module, doctype) + + # standard python module + if self.is_py_module(basepath, folders, files): + self.write_modules(basepath, folders, files) + + self.build_user_docs() + + def make_home_pages(self): + """Make standard home pages for docs, developer docs, api and models + from templates""" # make dev home page with open(os.path.join(self.docs_path, "index.html"), "w") as home: home.write(frappe.render_template("templates/autodoc/docs_home.html", @@ -71,31 +109,6 @@ class setup_docs(object): self.make_folder(self.api_base_path, template = "templates/autodoc/api_home.html") - for basepath, folders, files in os.walk(self.app_path): - if "doctype" not in basepath: - if "doctype" in folders: - module = os.path.basename(basepath) - - module_folder = os.path.join(self.models_base_path, module) - - self.make_folder(module_folder, - template = "templates/autodoc/module_home.html", - context = {"name": module}) - self.update_index_txt(module_folder) - - if "doctype" in basepath: - parts = basepath.split("/") - #print parts - module, doctype = parts[-3], parts[-1] - - if doctype not in ("doctype", "boilerplate"): - self.write_model_file(basepath, module, doctype) - - elif self.is_py_module(basepath, folders, files): - self.write_modules(basepath, folders, files) - - self.build_user_docs() - def build_user_docs(self): """Build templates for user docs pages, if missing.""" #user_docs_path = os.path.join(self.docs_path, "user") @@ -131,7 +144,7 @@ class setup_docs(object): Called as `bench --site [sitename] sync-docs [appname]` """ sync = frappe.website.statics.sync() - sync.start(path="docs", rebuild=True) + sync.start(path="docs", rebuild=True, apps = [self.app]) def make_docs(self, target, local = False): self.target = target @@ -160,7 +173,7 @@ class setup_docs(object): and (not "/page" in basepath) \ and (not "/templates" in basepath) \ and (not "/tests" in basepath) \ - and (not "doctype" in folders) + and (not "/docs" in basepath) def write_modules(self, basepath, folders, files): module_folder = os.path.join(self.api_base_path, os.path.relpath(basepath, self.app_path)) @@ -256,6 +269,9 @@ class setup_docs(object): else: path = page.page_name + print "Writing {0}".format(path) + + # set this for get_context / website libs frappe.local.path = path context = { @@ -269,14 +285,13 @@ class setup_docs(object): context = get_context(path, context) - target_filename = os.path.join(self.target, context.template_path.split('/docs/', 1)[1]) + target_path_fragment = context.template_path.split('/docs/', 1)[1] + target_filename = os.path.join(self.target, target_path_fragment) # rename .md files to .html if target_filename.rsplit(".", 1)[1]=="md": target_filename = target_filename[:-3] + ".html" - print "Writing {0}".format(target_filename) - context.brand_html = context.top_bar_items = context.favicon = None self.docs_config.get_context(context) @@ -301,6 +316,14 @@ class setup_docs(object): html = frappe.get_template("templates/autodoc/base_template.html").render(context) + if not "" in html: + html = html.replace('', + '


    Improve this page

    '.format(\ + source_link = self.docs_config.source_link, + app_name = self.app, + branch = context.app.branch, + target = target_path_fragment)) + if not os.path.exists(os.path.dirname(target_filename)): os.makedirs(os.path.dirname(target_filename)) diff --git a/frappe/website/statics.py b/frappe/website/statics.py index ba98242045..eb8f42ca2a 100644 --- a/frappe/website/statics.py +++ b/frappe/website/statics.py @@ -20,7 +20,7 @@ class sync(object): def __init__(self, verbose=False, path=None): self.verbose = verbose - def start(self, rebuild=False, path="www"): + def start(self, rebuild=False, path="www", apps=None): self.path = path self.synced = [] self.synced_paths = [] @@ -28,7 +28,7 @@ class sync(object): if rebuild: frappe.db.sql("delete from `tabWeb Page` where ifnull(template_path, '')!=''") - for app in frappe.get_installed_apps(): + for app in apps or frappe.get_installed_apps(): # print "Syncing for {0}".format(app) self.sync_for_app(app) self.cleanup() diff --git a/frappe/website/template.py b/frappe/website/template.py index 12d2d5de4d..7db25aa6dd 100644 --- a/frappe/website/template.py +++ b/frappe/website/template.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import frappe from frappe.utils import strip_html +from frappe.website.utils import get_full_index from frappe import _ from jinja2.utils import concat from jinja2 import meta @@ -115,25 +116,28 @@ def add_index(out, context): extn = ".html" if "{index}" in out.get("content", "") and context.get("children"): - if extn: - for c in context.children: - c.extn = "" if context.doc.has_children(c.name) else extn - - html = frappe.get_template("templates/includes/static_index.html").render({ - "items": context.children, 'relative_links': context.relative_links}) + html = frappe.get_template("templates/includes/full_index.html").render({ + "full_index": get_full_index(context.pathname, extn = extn), + "url_prefix": context.url_prefix + }) out["content"] = out["content"].replace("{index}", html) # next and previous if "{next}" in out.get("content", ""): next_item = context.doc.get_next() - next_item.extn = "" if context.doc.has_children(c.name) else extn + next_item.extn = "" if context.doc.has_children(next_item.name) else extn if context.relative_links: - next_item.name = next_item.page_name + next_item.name = next_item.page_name or "" + else: + if next_item.name[0]!="/": + next_item.name = "/" + next_item.name if next_item: - if next_item.name[0]!="/": next_item.name = "/" + next_item.name - html = ('

    '+_("Next")+': {title}

    ').format(**next_item) + if not next_item.title: + next_item.title = "" + html = ('

    '\ + +_("Next")+': {title}

    ').format(**next_item) else: html = "" diff --git a/frappe/website/utils.py b/frappe/website/utils.py index 04e25babc0..639188b3e8 100644 --- a/frappe/website/utils.py +++ b/frappe/website/utils.py @@ -170,7 +170,7 @@ def abs_url(path): path = "/" + path return path -def get_full_index(doctype="Web Page", base_url = None, extn = False): +def get_full_index(route=None, doctype="Web Page", extn = False): """Returns full index of the website (on Web Page) upto the n-th level""" all_routes = [] @@ -183,9 +183,6 @@ def get_full_index(doctype="Web Page", base_url = None, extn = False): d.children = get_children(d.url.lstrip("/")) all_routes.append(d.url) - if base_url: - d.url = os.path.join(base_url, d.url) - if extn and os.path.basename(d.template_path).split(".")[0] != "index": d.url = d.url + ".html" @@ -197,5 +194,5 @@ def get_full_index(doctype="Web Page", base_url = None, extn = False): return children - return get_children("") + return get_children(route or "")