From 7ad1e2d11db2261dc34693d68526104e0a51ce78 Mon Sep 17 00:00:00 2001 From: shariquerik Date: Tue, 22 Jun 2021 17:13:20 +0530 Subject: [PATCH 01/58] fix: Webform Permission for custom doctypem --- frappe/www/list.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frappe/www/list.py b/frappe/www/list.py index 5e4e491c80..975347adac 100644 --- a/frappe/www/list.py +++ b/frappe/www/list.py @@ -161,6 +161,14 @@ def get_list_context(context, doctype, web_form_name=None): module = load_doctype_module(doctype) list_context = update_context_from_module(module, list_context) + # get context for custom doctype + if meta.custom: + get_custom_website_context = frappe.get_hooks('get_custom_website_context') + if get_custom_website_context: + out = frappe._dict(frappe.get_attr(get_custom_website_context[0])() or {}) + if out: + list_context = out + # get context from web form module if web_form_name: web_form = frappe.get_doc('Web Form', web_form_name) From d39a389fd5a066bb08b5805550f6b86d0b4618d3 Mon Sep 17 00:00:00 2001 From: shariquerik Date: Mon, 12 Jul 2021 17:01:30 +0530 Subject: [PATCH 02/58] fix: app check condition for getting correct list_context --- frappe/www/list.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frappe/www/list.py b/frappe/www/list.py index 975347adac..3ed103b69d 100644 --- a/frappe/www/list.py +++ b/frappe/www/list.py @@ -161,11 +161,11 @@ def get_list_context(context, doctype, web_form_name=None): module = load_doctype_module(doctype) list_context = update_context_from_module(module, list_context) - # get context for custom doctype - if meta.custom: - get_custom_website_context = frappe.get_hooks('get_custom_website_context') - if get_custom_website_context: - out = frappe._dict(frappe.get_attr(get_custom_website_context[0])() or {}) + # get context for custom webform + if meta.custom and web_form_name: + list_context_for_custom_webform = frappe.get_hooks('get_list_context_for_custom_webform') + if list_context_for_custom_webform: + out = frappe._dict(frappe.get_attr(list_context_for_custom_webform[0])(meta.module) or {}) if out: list_context = out From 623998c787314dfd0eb70b41d2bb26a418de3624 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 20 Aug 2021 11:03:06 +0530 Subject: [PATCH 03/58] fix(db): Cast single dt field only if value is truthy --- frappe/database/database.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frappe/database/database.py b/frappe/database/database.py index d6ecf0795d..d4fc6c2219 100644 --- a/frappe/database/database.py +++ b/frappe/database/database.py @@ -557,7 +557,10 @@ class Database(object): if not df: frappe.throw(_('Invalid field name: {0}').format(frappe.bold(fieldname)), self.InvalidColumnName) - val = cast_fieldtype(df.fieldtype, val) + # cast only if value is "set" or is truthy? + # cast_fieldtype returns currnt TS value for Datetime, Date fields + if val: + val = cast_fieldtype(df.fieldtype, val) self.value_cache[doctype][fieldname] = val From cb034e4c52e2213cdbe5f5a053e8a1bec169ebd9 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 20 Aug 2021 12:08:39 +0530 Subject: [PATCH 04/58] fix: Consistent return types in cast_fieldtype Note: BREAKING CHANGE --- frappe/database/database.py | 5 +---- frappe/utils/data.py | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/frappe/database/database.py b/frappe/database/database.py index d4fc6c2219..d6ecf0795d 100644 --- a/frappe/database/database.py +++ b/frappe/database/database.py @@ -557,10 +557,7 @@ class Database(object): if not df: frappe.throw(_('Invalid field name: {0}').format(frappe.bold(fieldname)), self.InvalidColumnName) - # cast only if value is "set" or is truthy? - # cast_fieldtype returns currnt TS value for Datetime, Date fields - if val: - val = cast_fieldtype(df.fieldtype, val) + val = cast_fieldtype(df.fieldtype, val) self.value_cache[doctype][fieldname] = val diff --git a/frappe/utils/data.py b/frappe/utils/data.py index f2c553211d..d89cda1519 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -505,7 +505,17 @@ def has_common(l1, l2): """Returns truthy value if there are common elements in lists l1 and l2""" return set(l1) & set(l2) -def cast_fieldtype(fieldtype, value): +def cast_fieldtype(fieldtype, value=None): + """Cast the value to the Python native object of the Frappe fieldtype provided. + If value is None, the first/lowest value of the `fieldtype` will be returned. + + Mapping of Python types => Frappe types: + * float => ("Currency", "Float", "Percent") + * int => ("Int", "Check") + * datetime.datetime => ("Datetime",) + * datetime.date => ("Date",) + * datetime.time => ("Time",) + """ if fieldtype in ("Currency", "Float", "Percent"): value = flt(value) @@ -517,12 +527,18 @@ def cast_fieldtype(fieldtype, value): value = cstr(value) elif fieldtype == "Date": + if value is None: + value = datetime.datetime(1, 1, 1).date() value = getdate(value) elif fieldtype == "Datetime": + if value is None: + value = datetime.datetime(1, 1, 1) value = get_datetime(value) elif fieldtype == "Time": + if value is None: + value = "0:0:0" value = to_timedelta(value) return value From a2cb9be7a4cd89e563888006e91ba03f353c251c Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 20 Aug 2021 12:35:24 +0530 Subject: [PATCH 05/58] feat: frappe.utils.data.cast Cast the value to the Python native object of the Frappe fieldtype provided. If value is None, the first/lowest value of the `fieldtype` will be returned. Mapping of Python types => Frappe types: * float => ("Currency", "Float", "Percent") * int => ("Int", "Check") * datetime.datetime => ("Datetime",) * datetime.date => ("Date",) * datetime.time => ("Time",) Deprecate frappe.utils.data.cast_fieldtype in favour of new util cast which handles types "better" --- frappe/utils/data.py | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index d89cda1519..4a25ad997a 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -8,6 +8,7 @@ import re, datetime, math, time from code import compile_command from urllib.parse import quote, urljoin from frappe.desk.utils import slug +from click import secho DATE_FORMAT = "%Y-%m-%d" TIME_FORMAT = "%H:%M:%S.%f" @@ -505,7 +506,36 @@ def has_common(l1, l2): """Returns truthy value if there are common elements in lists l1 and l2""" return set(l1) & set(l2) -def cast_fieldtype(fieldtype, value=None): +def cast_fieldtype(fieldtype, value): + # TODO: Add DeprecationWarning for this util + message = ( + "Function `frappe.utils.data.cast` has been deprecated in favour" + " of `frappe.utils.data.cast`. Use the newer util for safer type casting. " + ) + secho(message, fg="yellow") + + if fieldtype in ("Currency", "Float", "Percent"): + value = flt(value) + + elif fieldtype in ("Int", "Check"): + value = cint(value) + + elif fieldtype in ("Data", "Text", "Small Text", "Long Text", + "Text Editor", "Select", "Link", "Dynamic Link"): + value = cstr(value) + + elif fieldtype == "Date": + value = getdate(value) + + elif fieldtype == "Datetime": + value = get_datetime(value) + + elif fieldtype == "Time": + value = to_timedelta(value) + + return value + +def cast(fieldtype, value=None): """Cast the value to the Python native object of the Frappe fieldtype provided. If value is None, the first/lowest value of the `fieldtype` will be returned. @@ -1218,7 +1248,7 @@ def evaluate_filters(doc, filters): def compare(val1, condition, val2, fieldtype=None): ret = False if fieldtype: - val2 = cast_fieldtype(fieldtype, val2) + val2 = cast(fieldtype, val2) if condition in operator_map: ret = operator_map[condition](val1, val2) From ed6533f73705a483853d5b5ae8bf8cc0fca9156a Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 20 Aug 2021 12:37:15 +0530 Subject: [PATCH 06/58] fix: Use cast in favour of cast_fieldtype Use newly introduced casting util for Python-Frappe types mapping --- frappe/database/database.py | 21 ++------------------- frappe/model/base_document.py | 4 ++-- frappe/model/meta.py | 12 ++++++------ 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/frappe/database/database.py b/frappe/database/database.py index d6ecf0795d..9fab8e116f 100644 --- a/frappe/database/database.py +++ b/frappe/database/database.py @@ -14,7 +14,7 @@ import frappe.model.meta from frappe import _ from time import time -from frappe.utils import now, getdate, cast_fieldtype, get_datetime, get_table_name +from frappe.utils import now, getdate, cast, get_datetime, get_table_name from frappe.model.utils.link_count import flush_local_link_count @@ -516,7 +516,6 @@ class Database(object): FROM `tabSingles` WHERE doctype = %s """, doctype) - # result = _cast_result(doctype, result) dict_ = frappe._dict(result) @@ -557,7 +556,7 @@ class Database(object): if not df: frappe.throw(_('Invalid field name: {0}').format(frappe.bold(fieldname)), self.InvalidColumnName) - val = cast_fieldtype(df.fieldtype, val) + val = cast(df.fieldtype, val) self.value_cache[doctype][fieldname] = val @@ -1052,19 +1051,3 @@ def enqueue_jobs_after_commit(): q.enqueue_call(execute_job, timeout=job.get("timeout"), kwargs=job.get("queue_args")) frappe.flags.enqueue_after_commit = [] - -# Helpers -def _cast_result(doctype, result): - batch = [ ] - - try: - for field, value in result: - df = frappe.get_meta(doctype).get_field(field) - if df: - value = cast_fieldtype(df.fieldtype, value) - - batch.append(tuple([field, value])) - except frappe.exceptions.DoesNotExistError: - return result - - return tuple(batch) diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index 752543f46a..815dd27002 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -9,7 +9,7 @@ from frappe.model.utils.link_count import notify_link_count from frappe.modules import load_doctype_module from frappe.model import display_fieldtypes from frappe.utils import (cint, flt, now, cstr, strip_html, - sanitize_html, sanitize_email, cast_fieldtype) + sanitize_html, sanitize_email, cast) from frappe.utils.html_utils import unescape_html max_positive_value = { @@ -969,7 +969,7 @@ class BaseDocument(object): return self.cast(val, df) def cast(self, value, df): - return cast_fieldtype(df.fieldtype, value) + return cast(df.fieldtype, value) def _extract_images_from_text_editor(self): from frappe.core.doctype.file.file import extract_images_from_doc diff --git a/frappe/model/meta.py b/frappe/model/meta.py index de794ba77f..f89163e092 100644 --- a/frappe/model/meta.py +++ b/frappe/model/meta.py @@ -16,7 +16,7 @@ Example: ''' from datetime import datetime import frappe, json, os -from frappe.utils import cstr, cint, cast_fieldtype +from frappe.utils import cstr, cint, cast from frappe.model import default_fields, no_value_fields, optional_fields, data_fieldtypes, table_fields from frappe.model.document import Document from frappe.model.base_document import BaseDocument @@ -322,24 +322,24 @@ class Meta(Document): for ps in property_setters: if ps.doctype_or_field=='DocType': - self.set(ps.property, cast_fieldtype(ps.property_type, ps.value)) + self.set(ps.property, cast(ps.property_type, ps.value)) elif ps.doctype_or_field=='DocField': for d in self.fields: if d.fieldname == ps.field_name: - d.set(ps.property, cast_fieldtype(ps.property_type, ps.value)) + d.set(ps.property, cast(ps.property_type, ps.value)) break elif ps.doctype_or_field=='DocType Link': for d in self.links: if d.name == ps.row_name: - d.set(ps.property, cast_fieldtype(ps.property_type, ps.value)) + d.set(ps.property, cast(ps.property_type, ps.value)) break elif ps.doctype_or_field=='DocType Action': for d in self.actions: if d.name == ps.row_name: - d.set(ps.property, cast_fieldtype(ps.property_type, ps.value)) + d.set(ps.property, cast(ps.property_type, ps.value)) break def add_custom_links_and_actions(self): @@ -532,7 +532,7 @@ class Meta(Document): label = link.group, items = [link.parent_doctype or link.link_doctype] )) - + if not link.is_child_table: if link.link_fieldname != data.fieldname: if data.fieldname: From 8c7e9527087d4f429e7d1c63909e57c8bd4be384 Mon Sep 17 00:00:00 2001 From: shariquerik Date: Thu, 26 Aug 2021 21:43:44 +0530 Subject: [PATCH 07/58] fix: Show Document Status (docstatus) in list view through status indicator pill --- frappe/public/icons/timeless/symbol-defs.svg | 10 ++++++++++ frappe/public/js/frappe/list/list_view.js | 4 +++- frappe/public/js/frappe/utils/utils.js | 7 +++++-- frappe/public/scss/common/indicator.scss | 10 ++++++++++ 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/frappe/public/icons/timeless/symbol-defs.svg b/frappe/public/icons/timeless/symbol-defs.svg index f216374526..533edc962a 100644 --- a/frappe/public/icons/timeless/symbol-defs.svg +++ b/frappe/public/icons/timeless/symbol-defs.svg @@ -709,4 +709,14 @@ + + + + + + + + + + diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index 8a0e43c8f3..6c6e59c248 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -950,9 +950,11 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { get_indicator_html(doc) { const indicator = frappe.get_indicator(doc, this.doctype); + const icon = doc.docstatus == 1 ? 'submitted' : doc.docstatus == 2 ? 'cancelled' : 'dot'; if (indicator) { - return ` + ${frappe.utils.icon(icon, 'xs', '', indicator[1])} ${__(indicator[0])} `; } diff --git a/frappe/public/js/frappe/utils/utils.js b/frappe/public/js/frappe/utils/utils.js index 21841296dc..12b883a552 100644 --- a/frappe/public/js/frappe/utils/utils.js +++ b/frappe/public/js/frappe/utils/utils.js @@ -1114,14 +1114,17 @@ Object.assign(frappe.utils, { } }, - icon(icon_name, size="sm", icon_class="") { + icon(icon_name, size="sm", icon_class="", stroke_color="") { let size_class = ""; let icon_style = ""; if (typeof size == "object") { - icon_style = `width: ${size.width}; height: ${size.height}`; + icon_style = `width: ${size.width}; height: ${size.height};`; } else { size_class = `icon-${size}`; } + if (stroke_color) { + icon_style += `stroke: ${stroke_color};`; + } return ` `; diff --git a/frappe/public/scss/common/indicator.scss b/frappe/public/scss/common/indicator.scss index 62d7cacc9d..600373baec 100644 --- a/frappe/public/scss/common/indicator.scss +++ b/frappe/public/scss/common/indicator.scss @@ -176,3 +176,13 @@ @keyframes blink { 50% { opacity: 0.5; } } + +.indicator-pill-icon { + margin-right: 3px; +} + +.list-indicator-pill::before { + content: ''; + width: unset; + margin-right: unset; +} From 4f31f9c501f9deb6febe22d23b27cfcc211c846e Mon Sep 17 00:00:00 2001 From: shariquerik Date: Mon, 30 Aug 2021 11:48:39 +0530 Subject: [PATCH 08/58] fix: Show Document Status (docstatus) as a title on hovering the Status Indicator Pill --- frappe/public/icons/timeless/symbol-defs.svg | 10 ---------- frappe/public/js/frappe/list/list_view.js | 8 ++++---- frappe/public/js/frappe/utils/utils.js | 7 ++----- frappe/public/scss/common/indicator.scss | 12 +----------- 4 files changed, 7 insertions(+), 30 deletions(-) diff --git a/frappe/public/icons/timeless/symbol-defs.svg b/frappe/public/icons/timeless/symbol-defs.svg index 1732548bbc..b2f1428967 100644 --- a/frappe/public/icons/timeless/symbol-defs.svg +++ b/frappe/public/icons/timeless/symbol-defs.svg @@ -709,14 +709,4 @@ - - - - - - - - - - diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index 914807f57a..f304d313b4 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -952,11 +952,11 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { get_indicator_html(doc) { const indicator = frappe.get_indicator(doc, this.doctype); - const icon = doc.docstatus == 1 ? 'submitted' : doc.docstatus == 2 ? 'cancelled' : 'dot'; + const title = doc.docstatus == 1 ? 'Document has been submitted' : doc.docstatus == 2 ? + 'Document has been cancelled' : 'Document is in draft state'; if (indicator) { - return ` - ${frappe.utils.icon(icon, 'xs', '', indicator[1])} + return ` ${__(indicator[0])} `; } diff --git a/frappe/public/js/frappe/utils/utils.js b/frappe/public/js/frappe/utils/utils.js index 12b883a552..21841296dc 100644 --- a/frappe/public/js/frappe/utils/utils.js +++ b/frappe/public/js/frappe/utils/utils.js @@ -1114,17 +1114,14 @@ Object.assign(frappe.utils, { } }, - icon(icon_name, size="sm", icon_class="", stroke_color="") { + icon(icon_name, size="sm", icon_class="") { let size_class = ""; let icon_style = ""; if (typeof size == "object") { - icon_style = `width: ${size.width}; height: ${size.height};`; + icon_style = `width: ${size.width}; height: ${size.height}`; } else { size_class = `icon-${size}`; } - if (stroke_color) { - icon_style += `stroke: ${stroke_color};`; - } return ` `; diff --git a/frappe/public/scss/common/indicator.scss b/frappe/public/scss/common/indicator.scss index 600373baec..13162ab6b1 100644 --- a/frappe/public/scss/common/indicator.scss +++ b/frappe/public/scss/common/indicator.scss @@ -175,14 +175,4 @@ @keyframes blink { 50% { opacity: 0.5; } -} - -.indicator-pill-icon { - margin-right: 3px; -} - -.list-indicator-pill::before { - content: ''; - width: unset; - margin-right: unset; -} +} \ No newline at end of file From f84344592a29a3eb2a60b961e595d0ea04322dfd Mon Sep 17 00:00:00 2001 From: Shariq Ansari <30859809+shariquerik@users.noreply.github.com> Date: Mon, 30 Aug 2021 13:31:07 +0530 Subject: [PATCH 09/58] Apply suggestions from code review Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> --- frappe/public/js/frappe/list/list_view.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index f304d313b4..c35b5e2d51 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -952,11 +952,16 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { get_indicator_html(doc) { const indicator = frappe.get_indicator(doc, this.doctype); - const title = doc.docstatus == 1 ? 'Document has been submitted' : doc.docstatus == 2 ? - 'Document has been cancelled' : 'Document is in draft state'; + // sequence is important + const docstatus_description = [ + __('Document is in draft state'), + __('Document has been submitted'), + __('Document has been cancelled') + ] + const title = docstatus_description[doc.docstatus || 0] if (indicator) { return ` + data-filter='${indicator[2]}' title='${title}'> ${__(indicator[0])} `; } From b8c51b13e2f89e231c19bc94b32fb7e8251557ca Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 30 Aug 2021 13:45:30 +0530 Subject: [PATCH 10/58] fix: Revert to using cast_fieldtype in BaseDocument.cast * reference: revert Breaking Change - https://github.com/frappe/frappe/pull/13989#discussion_r695624003 * Show deprecation warning unless `show_warning` is unset --- frappe/model/base_document.py | 4 ++-- frappe/utils/data.py | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index 815dd27002..1e3ef53fbd 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -9,7 +9,7 @@ from frappe.model.utils.link_count import notify_link_count from frappe.modules import load_doctype_module from frappe.model import display_fieldtypes from frappe.utils import (cint, flt, now, cstr, strip_html, - sanitize_html, sanitize_email, cast) + sanitize_html, sanitize_email, cast_fieldtype) from frappe.utils.html_utils import unescape_html max_positive_value = { @@ -969,7 +969,7 @@ class BaseDocument(object): return self.cast(val, df) def cast(self, value, df): - return cast(df.fieldtype, value) + return cast_fieldtype(df.fieldtype, value, show_warning=False) def _extract_images_from_text_editor(self): from frappe.core.doctype.file.file import extract_images_from_doc diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 4a25ad997a..4e972c0189 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -506,13 +506,13 @@ def has_common(l1, l2): """Returns truthy value if there are common elements in lists l1 and l2""" return set(l1) & set(l2) -def cast_fieldtype(fieldtype, value): - # TODO: Add DeprecationWarning for this util - message = ( - "Function `frappe.utils.data.cast` has been deprecated in favour" - " of `frappe.utils.data.cast`. Use the newer util for safer type casting. " - ) - secho(message, fg="yellow") +def cast_fieldtype(fieldtype, value, show_warning=True): + if show_warning: + message = ( + "Function `frappe.utils.data.cast` has been deprecated in favour" + " of `frappe.utils.data.cast`. Use the newer util for safer type casting." + ) + secho(message, fg="yellow") if fieldtype in ("Currency", "Float", "Percent"): value = flt(value) From 7c7eb68e4df5990ec75a8cbdf84cb6f717c69fe2 Mon Sep 17 00:00:00 2001 From: shariquerik Date: Mon, 30 Aug 2021 14:00:40 +0530 Subject: [PATCH 11/58] fix: sider fix --- frappe/public/js/frappe/list/list_view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index c35b5e2d51..503309515c 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -957,8 +957,8 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { __('Document is in draft state'), __('Document has been submitted'), __('Document has been cancelled') - ] - const title = docstatus_description[doc.docstatus || 0] + ]; + const title = docstatus_description[doc.docstatus || 0]; if (indicator) { return ` From 025be097727c1e778888eff219c824e3d05408c1 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 30 Aug 2021 18:49:34 +0530 Subject: [PATCH 12/58] fix: Home redirect issue and made default content as [] --- frappe/desk/doctype/workspace/workspace.json | 3 ++- frappe/public/js/frappe/desk.js | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frappe/desk/doctype/workspace/workspace.json b/frappe/desk/doctype/workspace/workspace.json index 020f3153df..1e111b8d12 100644 --- a/frappe/desk/doctype/workspace/workspace.json +++ b/frappe/desk/doctype/workspace/workspace.json @@ -242,6 +242,7 @@ "label": "Parent Page" }, { + "default": "[]", "fieldname": "content", "fieldtype": "Long Text", "hidden": 1, @@ -265,7 +266,7 @@ } ], "links": [], - "modified": "2021-08-19 12:51:00.233017", + "modified": "2021-08-30 18:47:18.227154", "modified_by": "Administrator", "module": "Desk", "name": "Workspace", diff --git a/frappe/public/js/frappe/desk.js b/frappe/public/js/frappe/desk.js index 99fc4da182..a4dc1a6709 100644 --- a/frappe/public/js/frappe/desk.js +++ b/frappe/public/js/frappe/desk.js @@ -285,10 +285,6 @@ frappe.Application = class Application { frappe.modules[page.module]=page; frappe.workspaces[frappe.router.slug(page.title)] = page; } - if (!frappe.workspaces['home']) { - // default workspace is settings for Frappe - frappe.workspaces['home'] = frappe.workspaces[Object.keys(frappe.workspaces)[0]]; - } } load_user_permissions() { From be72397bcad856a1acbf1ac0fa2202966504afae Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 30 Aug 2021 18:51:36 +0530 Subject: [PATCH 13/58] test: Add tests for frappe.utils.data.cast --- frappe/tests/test_utils.py | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/frappe/tests/test_utils.py b/frappe/tests/test_utils.py index 95ba763482..0d41f285be 100644 --- a/frappe/tests/test_utils.py +++ b/frappe/tests/test_utils.py @@ -6,12 +6,13 @@ import frappe from frappe.utils import evaluate_filters, money_in_words, scrub_urls, get_url from frappe.utils import validate_url, validate_email_address from frappe.utils import ceil, floor -from frappe.utils.data import validate_python_code +from frappe.utils.data import cast, validate_python_code from PIL import Image from frappe.utils.image import strip_exif_data, optimize_image import io from mimetypes import guess_type +from datetime import datetime, timedelta, date class TestFilters(unittest.TestCase): def test_simple_dict(self): @@ -93,6 +94,34 @@ class TestDataManipulation(unittest.TestCase): self.assertTrue('style="background-image: url(\'{0}/assets/frappe/bg.jpg\') !important"'.format(url) in html) self.assertTrue('email' in html) +class TestFieldCasting(unittest.TestCase): + def test_float_types(self): + FLOAT_TYPES = ("Currency", "Float", "Percent") + for fieldtype in FLOAT_TYPES: + self.assertIsInstance(cast(fieldtype, value=None), float) + self.assertIsInstance(cast(fieldtype, value=1.12), float) + self.assertIsInstance(cast(fieldtype, value=112), float) + + def test_int_types(self): + INT_TYPES = ("Int", "Check") + + for fieldtype in INT_TYPES: + self.assertIsInstance(cast(fieldtype, value=None), int) + self.assertIsInstance(cast(fieldtype, value=1.12), int) + self.assertIsInstance(cast(fieldtype, value=112), int) + + def test_datetime_types(self): + self.assertIsInstance(cast("Datetime", value=None), datetime) + self.assertIsInstance(cast("Datetime", value="12-2-22"), datetime) + + def test_date_types(self): + self.assertIsInstance(cast("Date", value=None), date) + self.assertIsInstance(cast("Date", value="12-12-2021"), date) + + def test_time_types(self): + self.assertIsInstance(cast("Time", value=None), timedelta) + self.assertIsInstance(cast("Time", value="12:03:34"), timedelta) + class TestMathUtils(unittest.TestCase): def test_floor(self): from decimal import Decimal @@ -205,7 +234,6 @@ class TestImage(unittest.TestCase): self.assertLess(len(optimized_content), len(original_content)) class TestPythonExpressions(unittest.TestCase): - def test_validation_for_good_python_expression(self): valid_expressions = [ "foo == bar", @@ -229,4 +257,4 @@ class TestPythonExpressions(unittest.TestCase): "oops = forgot_equals", ] for expr in invalid_expressions: - self.assertRaises(frappe.ValidationError, validate_python_code, expr) \ No newline at end of file + self.assertRaises(frappe.ValidationError, validate_python_code, expr) From 895520885e08e216da52bcc8e7f668170f0bd408 Mon Sep 17 00:00:00 2001 From: Shariq Ansari <30859809+shariquerik@users.noreply.github.com> Date: Tue, 31 Aug 2021 11:27:33 +0530 Subject: [PATCH 14/58] chore: Better naming convention Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> --- frappe/www/list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/www/list.py b/frappe/www/list.py index 3ed103b69d..74fadfb70f 100644 --- a/frappe/www/list.py +++ b/frappe/www/list.py @@ -163,7 +163,7 @@ def get_list_context(context, doctype, web_form_name=None): # get context for custom webform if meta.custom and web_form_name: - list_context_for_custom_webform = frappe.get_hooks('get_list_context_for_custom_webform') + webform_list_contexts = frappe.get_hooks('webform_list_context') if list_context_for_custom_webform: out = frappe._dict(frappe.get_attr(list_context_for_custom_webform[0])(meta.module) or {}) if out: From d8d25bdf19819633715bf558ecf41e55db859e00 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 31 Aug 2021 11:34:42 +0530 Subject: [PATCH 15/58] chore: Better naming convention --- frappe/www/list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/www/list.py b/frappe/www/list.py index 74fadfb70f..f8e4a4eb93 100644 --- a/frappe/www/list.py +++ b/frappe/www/list.py @@ -164,8 +164,8 @@ def get_list_context(context, doctype, web_form_name=None): # get context for custom webform if meta.custom and web_form_name: webform_list_contexts = frappe.get_hooks('webform_list_context') - if list_context_for_custom_webform: - out = frappe._dict(frappe.get_attr(list_context_for_custom_webform[0])(meta.module) or {}) + if webform_list_contexts: + out = frappe._dict(frappe.get_attr(webform_list_contexts[0])(meta.module) or {}) if out: list_context = out From 8e96d8d52294d371d9dacd533e844f18356204e2 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Tue, 31 Aug 2021 12:55:31 +0530 Subject: [PATCH 16/58] test: Add tests for str fieldstypes cast --- frappe/tests/test_utils.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frappe/tests/test_utils.py b/frappe/tests/test_utils.py index 0d41f285be..3033673224 100644 --- a/frappe/tests/test_utils.py +++ b/frappe/tests/test_utils.py @@ -95,6 +95,17 @@ class TestDataManipulation(unittest.TestCase): self.assertTrue('email' in html) class TestFieldCasting(unittest.TestCase): + def test_str_types(self): + STR_TYPES = ( + "Data", "Text", "Small Text", "Long Text", "Text Editor", "Select", "Link", "Dynamic Link" + ) + for fieldtype in STR_TYPES: + self.assertIsInstance(cast(fieldtype, value=None), str) + self.assertIsInstance(cast(fieldtype, value="12-12-2021"), str) + self.assertIsInstance(cast(fieldtype, value=""), str) + self.assertIsInstance(cast(fieldtype, value=[]), str) + self.assertIsInstance(cast(fieldtype, value=set()), str) + def test_float_types(self): FLOAT_TYPES = ("Currency", "Float", "Percent") for fieldtype in FLOAT_TYPES: From 3858e95e80073fde1e88e2cc21b71bf6ca02b4f6 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Tue, 31 Aug 2021 12:57:05 +0530 Subject: [PATCH 17/58] feat(utils): Add util get_timedelta get_timedelta returns None in case of invalid or imparsable inputs. This behaviour is consistent wrt other utils. The util, to_timedelta tries to convert to timedelta objects only if str object is passed. It returns the same object if not string, which is absurd...given its called `to_timedelta`. --- frappe/utils/data.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 4e972c0189..9ff8deb517 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -1,6 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from typing import Optional import frappe import operator import json @@ -68,6 +69,31 @@ def get_datetime(datetime_str=None): except ValueError: return parser.parse(datetime_str) +def get_timedelta(time: str = None) -> Optional[datetime.timedelta]: + """Return `datetime.timedelta` object from string value of a + valid time format. Returns None if `time` is not a valid format + + Args: + time (str): A valid time representation. This string is parsed + using `dateutil.parser.parse`. Examples of valid inputs are: + '0:0:0', '17:21:00', '2012-01-19 17:21:00'. Checkout + https://dateutil.readthedocs.io/en/stable/parser.html#dateutil.parser.parse + + Returns: + datetime.timedelta: Timedelta object equivalent of the passed `time` string + """ + from dateutil import parser + + time = time or "0:0:0" + + try: + t = parser.parse(time) + return datetime.timedelta( + hours=t.hour, minutes=t.minute, seconds=t.second, microseconds=t.microsecond + ) + except Exception: + return None + def to_timedelta(time_str): from dateutil import parser From 8622142d7dd539b36a15b7dfaa98e5e22b6cfe1c Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Tue, 31 Aug 2021 13:04:32 +0530 Subject: [PATCH 18/58] fix: Use get_timedelta in cast, add to safe_exec list * Return date and datetime objects for Date and Datetime field types respectively if Falsy output is set --- frappe/utils/data.py | 14 +++++++------- frappe/utils/safe_exec.py | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 9ff8deb517..62eb6790e0 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -583,19 +583,19 @@ def cast(fieldtype, value=None): value = cstr(value) elif fieldtype == "Date": - if value is None: + if value: + value = getdate(value) + else: value = datetime.datetime(1, 1, 1).date() - value = getdate(value) elif fieldtype == "Datetime": - if value is None: + if value: + value = get_datetime(value) + else: value = datetime.datetime(1, 1, 1) - value = get_datetime(value) elif fieldtype == "Time": - if value is None: - value = "0:0:0" - value = to_timedelta(value) + value = get_timedelta(value) return value diff --git a/frappe/utils/safe_exec.py b/frappe/utils/safe_exec.py index 2e27859faa..4de685e53e 100644 --- a/frappe/utils/safe_exec.py +++ b/frappe/utils/safe_exec.py @@ -228,6 +228,7 @@ VALID_UTILS = ( "getdate", "get_datetime", "to_timedelta", +"get_timedelta", "add_to_date", "add_days", "add_months", From 176d6d2d069b918d959a3240c17d153cc4312f54 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Tue, 31 Aug 2021 13:07:22 +0530 Subject: [PATCH 19/58] fix: Check if input is str is_invalid_date_string This is sort of a breaking change? Because if an int/dict/list/tuple was passed instead of a str, object doesnt have .startswith (AttributeError) would be raised instead of just returning None. --- frappe/utils/data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 62eb6790e0..5cd41226da 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -18,10 +18,10 @@ DATETIME_FORMAT = DATE_FORMAT + " " + TIME_FORMAT def is_invalid_date_string(date_string): # dateutil parser does not agree with dates like "0001-01-01" or "0000-00-00" - return (not date_string) or (date_string or "").startswith(("0001-01-01", "0000-00-00")) + return not isinstance(date_string, str) or ((not date_string) or (date_string or "").startswith(("0001-01-01", "0000-00-00"))) # datetime functions -def getdate(string_date=None): +def getdate(string_date: str = None): """ Converts string date (yyyy-mm-dd) to datetime.date object. If no input is provided, current date is returned. From 9a32513b472e214aa7c7d2c62f19d5075b8dd3cb Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 30 Aug 2021 02:12:19 +0530 Subject: [PATCH 20/58] chore: Update frappe.utils.data.cast docstring --- frappe/utils/data.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 5cd41226da..2e70658dbd 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -564,8 +564,10 @@ def cast_fieldtype(fieldtype, value, show_warning=True): def cast(fieldtype, value=None): """Cast the value to the Python native object of the Frappe fieldtype provided. If value is None, the first/lowest value of the `fieldtype` will be returned. + If value can't be cast as fieldtype due to an invalid input, None will be returned. Mapping of Python types => Frappe types: + * str => ("Data", "Text", "Small Text", "Long Text", "Text Editor", "Select", "Link", "Dynamic Link") * float => ("Currency", "Float", "Percent") * int => ("Int", "Check") * datetime.datetime => ("Datetime",) From 6be64eb4f9d573b9463972d4e37d28f023beed20 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 31 Aug 2021 17:22:48 +0530 Subject: [PATCH 21/58] fix: Make min width of page action buttons to 35px --- frappe/public/scss/desk/page.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/scss/desk/page.scss b/frappe/public/scss/desk/page.scss index 65d535facc..f9d93fcaef 100644 --- a/frappe/public/scss/desk/page.scss +++ b/frappe/public/scss/desk/page.scss @@ -66,7 +66,7 @@ padding: 4px 10px; } .btn-primary, .btn-secondary { - min-width: 70px; + min-width: 35px; } .custom-btn-group { display: inline-flex; From 8394bbeb4c7578084a21c5cdf841a9b1119340d2 Mon Sep 17 00:00:00 2001 From: gavin Date: Tue, 31 Aug 2021 21:50:07 +0530 Subject: [PATCH 22/58] chore(utils): Add type hints for get_timedelta, getdate Co-authored-by: Ankush Menat --- frappe/utils/data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 2e70658dbd..5a7328b07e 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -21,7 +21,7 @@ def is_invalid_date_string(date_string): return not isinstance(date_string, str) or ((not date_string) or (date_string or "").startswith(("0001-01-01", "0000-00-00"))) # datetime functions -def getdate(string_date: str = None): +def getdate(string_date: Optional[str] = None): """ Converts string date (yyyy-mm-dd) to datetime.date object. If no input is provided, current date is returned. @@ -69,7 +69,7 @@ def get_datetime(datetime_str=None): except ValueError: return parser.parse(datetime_str) -def get_timedelta(time: str = None) -> Optional[datetime.timedelta]: +def get_timedelta(time: Optional[str] = None) -> Optional[datetime.timedelta]: """Return `datetime.timedelta` object from string value of a valid time format. Returns None if `time` is not a valid format From 5c0c9d5417ba482eee32d311fdc87c6ada2e5f85 Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Wed, 1 Sep 2021 12:06:46 +0530 Subject: [PATCH 23/58] ci: Update mergify.yml --- .mergify.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.mergify.yml b/.mergify.yml index 8c7a7dc95d..cd221b134c 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -2,7 +2,9 @@ pull_request_rules: - name: Auto-close PRs on stable branch conditions: - and: - - author!=surajshetty3416 + - or: + - author!=surajshetty3416 + - author!=gavindsouza - or: - base=version-13 - base=version-12 From 3d5e7b64ea6e1b3c71d80526378e7b3362fc8898 Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Wed, 1 Sep 2021 12:13:11 +0530 Subject: [PATCH 24/58] ci: Update auto-close condition --- .mergify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mergify.yml b/.mergify.yml index cd221b134c..0bd9641d5b 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -2,7 +2,7 @@ pull_request_rules: - name: Auto-close PRs on stable branch conditions: - and: - - or: + - and: - author!=surajshetty3416 - author!=gavindsouza - or: From 95ba4a53c1103a76d0bf523c2d315f57e68e44cc Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Wed, 1 Sep 2021 12:41:01 +0530 Subject: [PATCH 25/58] fix: error while deleting links in cards --- frappe/desk/doctype/workspace/workspace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/desk/doctype/workspace/workspace.py b/frappe/desk/doctype/workspace/workspace.py index 31bb551330..33c6adbd2f 100644 --- a/frappe/desk/doctype/workspace/workspace.py +++ b/frappe/desk/doctype/workspace/workspace.py @@ -62,7 +62,7 @@ class Workspace(Document): for link in self.links: link = link.as_dict() if link.type == "Card Break": - if card_links and (not current_card['only_for'] or current_card['only_for'] == frappe.get_system_settings('country')): + if card_links and (not current_card.get('only_for') or current_card.get('only_for') == frappe.get_system_settings('country')): current_card['links'] = card_links cards.append(current_card) From f23802d25bfb3591463a7295d1fd0a5fbd4c9789 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Wed, 1 Sep 2021 16:30:15 +0530 Subject: [PATCH 26/58] fix: Enable Server Scripts by default --- frappe/utils/safe_exec.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frappe/utils/safe_exec.py b/frappe/utils/safe_exec.py index 4de685e53e..7ccd80e346 100644 --- a/frappe/utils/safe_exec.py +++ b/frappe/utils/safe_exec.py @@ -30,8 +30,14 @@ class NamespaceDict(frappe._dict): def safe_exec(script, _globals=None, _locals=None): - # script reports must be enabled via site_config.json - if not frappe.conf.server_script_enabled: + # server scripts can be disabled via site_config.json + # they are enabled by default + if 'server_script_enabled' in frappe.conf: + enabled = frappe.conf.server_script_enabled + else: + enabled = True + + if not enabled: frappe.throw(_('Please Enable Server Scripts'), ServerScriptNotEnabled) # build globals From cf028964f3714a51ad0c758d29f8ba8e47335f74 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 2 Sep 2021 09:36:25 +0530 Subject: [PATCH 27/58] CI: Use codecov coverage reporting Why? - Coveralls had login issues and we were not able to view files to find the actual uncovered lines - Codecov has better reporting (status checks & commit diff coverage, ), UX (better folder/file navigation, faster page loads), and has more features. - Codecov will not require additional step of coverage wrap-up for parallel builds (it manages it internally somehow). --- .github/workflows/server-mariadb-tests.yml | 50 +++------------------- frappe/coverage.py | 3 +- 2 files changed, 7 insertions(+), 46 deletions(-) diff --git a/.github/workflows/server-mariadb-tests.yml b/.github/workflows/server-mariadb-tests.yml index fb6e56037c..8fcd9017d0 100644 --- a/.github/workflows/server-mariadb-tests.yml +++ b/.github/workflows/server-mariadb-tests.yml @@ -120,49 +120,9 @@ jobs: CI_BUILD_ID: ${{ github.run_id }} ORCHESTRATOR_URL: http://test-orchestrator.frappe.io - - name: Upload Coverage Data - if: ${{ steps.check-build.outputs.build == 'strawberry' }} - id: upload-coverage-data - run: | - cp ~/frappe-bench/sites/.coverage ${GITHUB_WORKSPACE} - cd ${GITHUB_WORKSPACE} - pip3 install coverage==5.5 - pip3 install coveralls==3.0.1 - coveralls - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} - COVERALLS_FLAG_NAME: run-${{ matrix.container }} - COVERALLS_SERVICE_NAME: ${{ github.event_name == 'pull_request' && 'github' || 'github-actions' }} - COVERALLS_PARALLEL: true - - - run: echo ${{ steps.check-build.outputs.build }} > guess-the-fruit.txt - - uses: actions/upload-artifact@v1 + - uses: codecov/codecov-action@v2 with: - name: fruit - path: guess-the-fruit.txt - - coveralls: - name: Coverage Wrap Up - needs: test - container: python:3-slim - runs-on: ubuntu-18.04 - steps: - - uses: actions/download-artifact@v1 - with: - name: fruit - - run: echo "WILDCARD=$(cat fruit/guess-the-fruit.txt)" >> $GITHUB_ENV - - - name: Clone - if: ${{ env.WILDCARD == 'strawberry' }} - uses: actions/checkout@v2 - - - name: Coveralls Finished - if: ${{ env.WILDCARD == 'strawberry' }} - run: | - cd ${GITHUB_WORKSPACE} - pip3 install coverage==5.5 - pip3 install coveralls==3.0.1 - coveralls --finish - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + name: MariaDB + fail_ci_if_error: true + files: /home/runner/frappe-bench/sites/coverage.xml + verbose: true diff --git a/frappe/coverage.py b/frappe/coverage.py index 33f945be40..1969cae141 100644 --- a/frappe/coverage.py +++ b/frappe/coverage.py @@ -58,4 +58,5 @@ class CodeCoverage(): def __exit__(self, exc_type, exc_value, traceback): if self.with_coverage: self.coverage.stop() - self.coverage.save() \ No newline at end of file + self.coverage.save() + self.coverage.xml_report() \ No newline at end of file From ba73d99377473dc83391b741c0666eccc02a3179 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 2 Sep 2021 09:36:57 +0530 Subject: [PATCH 28/58] ci: Enable code coverage for postgres build as well --- .github/workflows/server-postgres-tests.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/server-postgres-tests.yml b/.github/workflows/server-postgres-tests.yml index 1539e8c2d5..aef0e50c5a 100644 --- a/.github/workflows/server-postgres-tests.yml +++ b/.github/workflows/server-postgres-tests.yml @@ -116,7 +116,14 @@ jobs: - name: Run Tests if: ${{ steps.check-build.outputs.build == 'strawberry' }} - run: cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --use-orchestrator + run: cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --use-orchestrator --with-coverage env: CI_BUILD_ID: ${{ github.run_id }} ORCHESTRATOR_URL: http://test-orchestrator.frappe.io + + - uses: codecov/codecov-action@v2 + with: + name: Postgres + fail_ci_if_error: true + files: /home/runner/frappe-bench/sites/coverage.xml + verbose: true From cbd94bd33dbcf72f5fcd525b6bb6edacca133248 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 2 Sep 2021 10:53:53 +0530 Subject: [PATCH 29/58] ci: Set name for coverage data upload --- .github/workflows/server-mariadb-tests.yml | 3 ++- .github/workflows/server-postgres-tests.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/server-mariadb-tests.yml b/.github/workflows/server-mariadb-tests.yml index 8fcd9017d0..57a7fa304d 100644 --- a/.github/workflows/server-mariadb-tests.yml +++ b/.github/workflows/server-mariadb-tests.yml @@ -120,7 +120,8 @@ jobs: CI_BUILD_ID: ${{ github.run_id }} ORCHESTRATOR_URL: http://test-orchestrator.frappe.io - - uses: codecov/codecov-action@v2 + - name: Upload coverage data + uses: codecov/codecov-action@v2 with: name: MariaDB fail_ci_if_error: true diff --git a/.github/workflows/server-postgres-tests.yml b/.github/workflows/server-postgres-tests.yml index aef0e50c5a..fe33a9c917 100644 --- a/.github/workflows/server-postgres-tests.yml +++ b/.github/workflows/server-postgres-tests.yml @@ -121,7 +121,8 @@ jobs: CI_BUILD_ID: ${{ github.run_id }} ORCHESTRATOR_URL: http://test-orchestrator.frappe.io - - uses: codecov/codecov-action@v2 + - name: Upload coverage data + uses: codecov/codecov-action@v2 with: name: Postgres fail_ci_if_error: true From 329919d43d467ed426494d477da07594c100a943 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 2 Sep 2021 11:37:40 +0530 Subject: [PATCH 30/58] chore: Add codecov config file --- codecov.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..00e85225f4 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,5 @@ +codecov: + require_ci_to_pass: yes +comment: + layout: "diff, flags, files" + require_changes: true \ No newline at end of file From f4e477ef42140a4bde819e7afdb6ad0dc4189aff Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Thu, 2 Sep 2021 13:06:48 +0530 Subject: [PATCH 31/58] ci: Run postgres builds as well after a push on develop --- .github/workflows/server-postgres-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/server-postgres-tests.yml b/.github/workflows/server-postgres-tests.yml index fe33a9c917..57ac9c6c60 100644 --- a/.github/workflows/server-postgres-tests.yml +++ b/.github/workflows/server-postgres-tests.yml @@ -3,6 +3,8 @@ name: Server on: pull_request: workflow_dispatch: + push: + branches: [ develop ] concurrency: group: server-postgres-develop-${{ github.event.number }} From a3a2d965790566816dd5f8ad31f8e1782918b449 Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Thu, 2 Sep 2021 13:28:35 +0530 Subject: [PATCH 32/58] chore: Update code coverage badge coveralls badge -> codecov badge --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 11343a632a..6c2804d843 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ - - + + From 6c847987f124ec0408a1ee0075878fdcf615d844 Mon Sep 17 00:00:00 2001 From: Youssef Date: Wed, 1 Sep 2021 10:07:49 +0000 Subject: [PATCH 33/58] feat: Choose Letter Head when printing multiple documents from List /Report (cherry picked from commit 1c6688fd9c39008e86e88617ce901ba02b9076de) # Conflicts: # frappe/public/js/frappe/list/bulk_operations.js --- .../public/js/frappe/list/bulk_operations.js | 82 +++++++++++++------ 1 file changed, 57 insertions(+), 25 deletions(-) diff --git a/frappe/public/js/frappe/list/bulk_operations.js b/frappe/public/js/frappe/list/bulk_operations.js index 3b99560411..3bb7b33853 100644 --- a/frappe/public/js/frappe/list/bulk_operations.js +++ b/frappe/public/js/frappe/list/bulk_operations.js @@ -4,7 +4,7 @@ export default class BulkOperations { this.doctype = doctype; } - print(docs) { + print (docs) { const print_settings = frappe.model.get_doc(':Print Settings', 'Print Settings'); const allow_print_for_draft = cint(print_settings.allow_print_for_draft); const is_submittable = frappe.model.is_submittable(this.doctype); @@ -27,31 +27,38 @@ export default class BulkOperations { if (valid_docs.length > 0) { const dialog = new frappe.ui.Dialog({ title: __('Print Documents'), - fields: [{ - 'fieldtype': 'Check', - 'label': __('With Letterhead'), - 'fieldname': 'with_letterhead' - }, - { - 'fieldtype': 'Select', - 'label': __('Print Format'), - 'fieldname': 'print_sel', - options: frappe.meta.get_print_formats(this.doctype) - }] + fields: [ + { + 'fieldtype': 'Select', + 'label': __('Letter Head'), + 'fieldname': 'letter_sel', + 'default': __('No Letterhead'), + options: this.get_letterhead_options() + }, + { + 'fieldtype': 'Select', + 'label': __('Print Format'), + 'fieldname': 'print_sel', + options: frappe.meta.get_print_formats(this.doctype) + } + ] }); dialog.set_primary_action(__('Print'), args => { if (!args) return; const default_print_format = frappe.get_meta(this.doctype).default_print_format; - const with_letterhead = args.with_letterhead ? 1 : 0; + const with_letterhead = args.letter_sel == __("No Letterhead") ? 0 : 1; const print_format = args.print_sel ? args.print_sel : default_print_format; const json_string = JSON.stringify(valid_docs); - + const letterhead = args.letter_sel; const w = window.open('/api/method/frappe.utils.print_format.download_multi_pdf?' + 'doctype=' + encodeURIComponent(this.doctype) + '&name=' + encodeURIComponent(json_string) + '&format=' + encodeURIComponent(print_format) + - '&no_letterhead=' + (with_letterhead ? '0' : '1')); + '&no_letterhead=' + (with_letterhead ? '0' : '1') + + '&letterhead=' + encodeURIComponent(letterhead) + ); + if (!w) { frappe.msgprint(__('Please enable pop-ups')); return; @@ -64,7 +71,28 @@ export default class BulkOperations { } } - delete(docnames, done = null) { + get_letterhead_options () { + const letterhead_options = [__("No Letterhead")]; + frappe.call({ + method: "frappe.client.get_list", + args: { + doctype: 'Letter Head', + fields: ['name', 'is_default'], + limit: 0 + }, + async: false, + callback (r) { + if (r.message) { + r.message.forEach(letterhead => { + letterhead_options.push(letterhead.name); + }); + } + } + }); + return letterhead_options; + } + + delete (docnames, done = null) { frappe .call({ method: 'frappe.desk.reportview.delete_items', @@ -88,7 +116,7 @@ export default class BulkOperations { }); } - assign(docnames, done) { + assign (docnames, done) { if (docnames.length > 0) { const assign_to = new frappe.ui.form.AssignToDialog({ obj: this, @@ -106,7 +134,7 @@ export default class BulkOperations { } } - apply_assignment_rule(docnames, done) { + apply_assignment_rule (docnames, done) { if (docnames.length > 0) { frappe.call('frappe.automation.doctype.assignment_rule.assignment_rule.bulk_apply', { doctype: this.doctype, @@ -115,7 +143,7 @@ export default class BulkOperations { } } - submit_or_cancel(docnames, action='submit', done=null) { + submit_or_cancel (docnames, action = 'submit', done = null) { action = action.toLowerCase(); frappe .call({ @@ -140,7 +168,7 @@ export default class BulkOperations { }); } - edit(docnames, field_mappings, done) { + edit (docnames, field_mappings, done) { let field_options = Object.keys(field_mappings).sort(); const status_regex = /status/i; @@ -198,16 +226,16 @@ export default class BulkOperations { if (default_field) set_value_field(dialog); // to set `Value` df based on default `Field` - function set_value_field(dialogObj) { + function set_value_field (dialogObj) { const new_df = Object.assign({}, field_mappings[dialogObj.get_value('field')]); /* if the field label has status in it and if it has select fieldtype with no default value then set a default value from the available option. */ - if(new_df.label.match(status_regex) && + if (new_df.label.match(status_regex) && new_df.fieldtype === 'Select' && !new_df.default) { let options = []; - if(typeof new_df.options==="string") { + if (typeof new_df.options === "string") { options = new_df.options.split("\n"); } //set second option as default if first option is an empty string @@ -224,7 +252,7 @@ export default class BulkOperations { } - add_tags(docnames, done) { + add_tags (docnames, done) { const dialog = new frappe.ui.Dialog({ title: __('Add Tags'), fields: [ @@ -233,7 +261,7 @@ export default class BulkOperations { fieldname: 'tags', label: __("Tags"), reqd: true, - get_data: function(txt) { + get_data: function (txt) { return frappe.db.get_link_options("Tag", txt); } }, @@ -261,6 +289,7 @@ export default class BulkOperations { }); dialog.show(); } +<<<<<<< HEAD export(doctype, docnames) { frappe.require('data_import_tools.bundle.js', () => { @@ -272,3 +301,6 @@ export default class BulkOperations { }); } } +======= +} +>>>>>>> 1c6688fd9c (feat: Choose Letter Head when printing multiple documents from List /Report) From 6f114b1c198a1553b3f666358188e757bdb5933e Mon Sep 17 00:00:00 2001 From: Lev Date: Thu, 2 Sep 2021 12:21:34 +0300 Subject: [PATCH 34/58] chore: Query Builder autocomplete hack --- frappe/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frappe/__init__.py b/frappe/__init__.py index 6d79cbd760..ea983e7f02 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -140,7 +140,11 @@ lang = local("lang") if typing.TYPE_CHECKING: from frappe.database.mariadb.database import MariaDBDatabase from frappe.database.postgres.database import PostgresDatabase + from pypika import Query + db: typing.Union[MariaDBDatabase, PostgresDatabase] + qb: Query + # end: static analysis hack def init(site, sites_path=None, new_site=False): From ba07f3bc95bffad45edcbd8d8a4f7fcaeb8b79fb Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Thu, 2 Sep 2021 11:30:57 +0200 Subject: [PATCH 35/58] fix: resolve merge conflicts --- frappe/public/js/frappe/list/bulk_operations.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/frappe/public/js/frappe/list/bulk_operations.js b/frappe/public/js/frappe/list/bulk_operations.js index 3bb7b33853..931f2cf587 100644 --- a/frappe/public/js/frappe/list/bulk_operations.js +++ b/frappe/public/js/frappe/list/bulk_operations.js @@ -251,7 +251,6 @@ export default class BulkOperations { dialog.show(); } - add_tags (docnames, done) { const dialog = new frappe.ui.Dialog({ title: __('Add Tags'), @@ -289,9 +288,8 @@ export default class BulkOperations { }); dialog.show(); } -<<<<<<< HEAD - export(doctype, docnames) { + export (doctype, docnames) { frappe.require('data_import_tools.bundle.js', () => { const data_exporter = new frappe.data_import.DataExporter(doctype, 'Insert New Records'); data_exporter.dialog.set_value('export_records', 'by_filter'); @@ -301,6 +299,3 @@ export default class BulkOperations { }); } } -======= -} ->>>>>>> 1c6688fd9c (feat: Choose Letter Head when printing multiple documents from List /Report) From 3f69350f099a7df3ee807bd226eec222d7649801 Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Thu, 2 Sep 2021 18:49:04 +0530 Subject: [PATCH 36/58] ci: Add 0.5% as threshold for coverage failure --- codecov.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index 00e85225f4..eb81252b61 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,5 +1,9 @@ codecov: require_ci_to_pass: yes + status: + project: + default: + threshold: 0.5% comment: layout: "diff, flags, files" - require_changes: true \ No newline at end of file + require_changes: true From ab09ebf696df84aa4cea00756e72695700439efc Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Thu, 2 Sep 2021 20:46:19 +0530 Subject: [PATCH 37/58] fix: Dashboard Setting already exist error and linter fixes --- .../js/frappe/views/workspace/workspace.js | 26 +++++----- frappe/public/scss/desk/desktop.scss | 52 +++++++++---------- 2 files changed, 40 insertions(+), 38 deletions(-) diff --git a/frappe/public/js/frappe/views/workspace/workspace.js b/frappe/public/js/frappe/views/workspace/workspace.js index b14b2eddfa..1e0143c2a8 100644 --- a/frappe/public/js/frappe/views/workspace/workspace.js +++ b/frappe/public/js/frappe/views/workspace/workspace.js @@ -155,7 +155,7 @@ frappe.views.Workspace = class Workspace { }); // Scroll sidebar to selected page if it is not in viewport. - !frappe.dom.is_element_in_viewport(this.sidebar.find('.selected')) + !frappe.dom.is_element_in_viewport(this.sidebar.find('.selected')) && this.sidebar.find('.selected')[0].scrollIntoView(); } @@ -185,7 +185,7 @@ frappe.views.Workspace = class Workspace { } append_item(item, container) { - let is_current_page = frappe.router.slug(item.title) == frappe.router.slug(this.get_page_to_show().name) + let is_current_page = frappe.router.slug(item.title) == frappe.router.slug(this.get_page_to_show().name) && item.public == this.get_page_to_show().public; if (is_current_page) { item.selected = true; @@ -253,11 +253,13 @@ frappe.views.Workspace = class Workspace { if (!this.page_data || Object.keys(this.page_data).length === 0) return; return frappe.dashboard_utils.get_dashboard_settings().then(settings => { - let chart_config = settings.chart_config ? JSON.parse(settings.chart_config) : {}; - if (this.page_data.charts && this.page_data.charts.items) { - this.page_data.charts.items.map(chart => { - chart.chart_settings = chart_config[chart.chart_name] || {}; - }); + if (settings) { + let chart_config = settings.chart_config ? JSON.parse(settings.chart_config) : {}; + if (this.page_data.charts && this.page_data.charts.items) { + this.page_data.charts.items.map(chart => { + chart.chart_settings = chart_config[chart.chart_name] || {}; + }); + } } }); }); @@ -560,7 +562,7 @@ frappe.views.Workspace = class Workspace { fieldname: 'is_public', depends_on: `eval:${this.has_access}`, onchange: function() { - d.set_df_property('parent', 'options', + d.set_df_property('parent', 'options', this.get_value() ? me.public_parent_pages : me.private_parent_pages); } }, @@ -704,9 +706,9 @@ frappe.views.Workspace = class Workspace { } }); - let blocks = outputData.blocks.filter( - item => item.type != 'card' || - (item.data.card_name !== 'Custom Documents' && + let blocks = outputData.blocks.filter( + item => item.type != 'card' || + (item.data.card_name !== 'Custom Documents' && item.data.card_name !== 'Custom Reports') ); @@ -752,4 +754,4 @@ frappe.views.Workspace = class Workspace { this.setup_pages(); this.undo.readOnly = true; } -}; \ No newline at end of file +}; diff --git a/frappe/public/scss/desk/desktop.scss b/frappe/public/scss/desk/desktop.scss index 49ed07bbce..1257d9b3a4 100644 --- a/frappe/public/scss/desk/desktop.scss +++ b/frappe/public/scss/desk/desktop.scss @@ -17,10 +17,10 @@ body { } .standard-sidebar-section { - margin-top: var(--margin-xl); + margin-bottom: var(--margin-xl); - &:first-of-type { - margin-top: var(--margin-sm); + &:last-of-type { + margin-bottom: var(--margin-sm); } } } @@ -143,7 +143,7 @@ body { font-weight: 500; line-height: 1.3em; color: var(--heading-color); - + svg { flex: none; margin-right: 6px; @@ -863,7 +863,7 @@ body { .drag-handle { display: inline-block; } - + .delete-page { display: inline-block; margin-right: 8px; @@ -888,44 +888,44 @@ body { .codex-editor { min-height: 630px; - + .codex-editor__redactor{ display: flex; flex-wrap: wrap; flex-direction: row; margin: 0px -7px; padding-bottom: 20px !important; - + .ce-block{ width: 100%; padding-left: 0; padding-right: 0; - + &.ce-block--selected { .ce-block__content { background-color: inherit; } } - + .ce-block__content { max-width: 100%; height: 100%; padding: 7px; - + &> div { height: 100%; } - + .tune-btn > * { pointer-events: none; } - + .ce-header { padding: 0 !important; margin-bottom: 0 !important; flex: 1; } - + .widget{ &.header { display: flex; @@ -938,11 +938,11 @@ body { background-color: var(--control-bg); color: var(--text-muted); } - + &:focus { outline: none; } - + &.new-widget { align-items: inherit; } @@ -959,7 +959,7 @@ body { gap: 5px; background-color: var(--card-bg); padding-left: 5px; - + .drag-handle { cursor: all-scroll; cursor: -webkit-grabbing; @@ -969,22 +969,22 @@ body { } } } - + svg { fill: none; } - + .ce-toolbar { svg { fill: currentColor; } - + .icon { stroke: none; width: fit-content; height: fit-content; } - + .ce-settings { width: fit-content; @@ -1011,18 +1011,18 @@ body { border-radius: 0 4px 4px 0;z-index: 0; } } - + .ce-toolbar__settings-btn { display: none; } } - + .ce-inline-tool, .ce-inline-toolbar__dropdown { .icon { fill: currentColor; } } - + @media (min-width: 1199px) { .ce-toolbar__content { max-width: 930px; @@ -1033,14 +1033,14 @@ body { max-width: 760px; } } - + @media (max-width: 1199px) { .ce-block.col-4 { flex: 0 0 50%; max-width: 50%; } } - + @media (max-width: 750px) { .ce-block.col-4 { flex: 0 0 100%; @@ -1053,6 +1053,6 @@ body { max-width: 100%; } } - + } } From 65864c027fa6d431b2bc172b3b52d65a056a29b4 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 3 Sep 2021 11:45:01 +0530 Subject: [PATCH 38/58] chore: Update module license header These modules were imported from the ERPNext codebase into Frappe. License header was overlooked at that point. These were contributed initially by Frappe Technologies Pvt Ltd under GPLv3 (ERPNext's license) and now we, as Frappe Technologies Pvt Ltd converting them to MIT to comply with Frappe's license. --- frappe/contacts/address_and_contact.py | 4 ++-- frappe/contacts/doctype/contact/contact.py | 4 ++-- frappe/core/doctype/sms_parameter/sms_parameter.py | 4 ++-- frappe/core/doctype/sms_settings/sms_settings.py | 4 ++-- frappe/desk/page/setup_wizard/install_fixtures.py | 4 ++-- frappe/email/test_email_body.py | 5 +++-- frappe/templates/pages/integrations/braintree_checkout.py | 5 +++-- frappe/templates/pages/integrations/paytm_checkout.py | 4 ++-- frappe/templates/pages/integrations/razorpay_checkout.py | 4 ++-- frappe/templates/pages/integrations/stripe_checkout.py | 4 ++-- frappe/utils/global_search.py | 4 ++-- frappe/utils/goal.py | 4 ++-- 12 files changed, 26 insertions(+), 24 deletions(-) diff --git a/frappe/contacts/address_and_contact.py b/frappe/contacts/address_and_contact.py index 77305168c1..6b71ec50f9 100644 --- a/frappe/contacts/address_and_contact.py +++ b/frappe/contacts/address_and_contact.py @@ -1,5 +1,5 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE import frappe diff --git a/frappe/contacts/doctype/contact/contact.py b/frappe/contacts/doctype/contact/contact.py index d1dd1f1010..a1aa8408bf 100644 --- a/frappe/contacts/doctype/contact/contact.py +++ b/frappe/contacts/doctype/contact/contact.py @@ -1,5 +1,5 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE import frappe from frappe.utils import cstr, has_gravatar from frappe import _ diff --git a/frappe/core/doctype/sms_parameter/sms_parameter.py b/frappe/core/doctype/sms_parameter/sms_parameter.py index d1fb1c53db..fb8466eac6 100644 --- a/frappe/core/doctype/sms_parameter/sms_parameter.py +++ b/frappe/core/doctype/sms_parameter/sms_parameter.py @@ -1,5 +1,5 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE import frappe diff --git a/frappe/core/doctype/sms_settings/sms_settings.py b/frappe/core/doctype/sms_settings/sms_settings.py index 58a0ff08f6..f15ba7e4f6 100644 --- a/frappe/core/doctype/sms_settings/sms_settings.py +++ b/frappe/core/doctype/sms_settings/sms_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE import frappe diff --git a/frappe/desk/page/setup_wizard/install_fixtures.py b/frappe/desk/page/setup_wizard/install_fixtures.py index 06301cdeaf..1ef83f7ba0 100644 --- a/frappe/desk/page/setup_wizard/install_fixtures.py +++ b/frappe/desk/page/setup_wizard/install_fixtures.py @@ -1,5 +1,5 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/email/test_email_body.py b/frappe/email/test_email_body.py index 2c7d119fce..c542bc2578 100644 --- a/frappe/email/test_email_body.py +++ b/frappe/email/test_email_body.py @@ -1,5 +1,6 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE + import unittest, os, base64 from frappe import safe_decode from frappe.email.receive import Email diff --git a/frappe/templates/pages/integrations/braintree_checkout.py b/frappe/templates/pages/integrations/braintree_checkout.py index c4aa1a7b9f..26c1d0842a 100644 --- a/frappe/templates/pages/integrations/braintree_checkout.py +++ b/frappe/templates/pages/integrations/braintree_checkout.py @@ -1,5 +1,6 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE + import frappe from frappe import _ from frappe.utils import flt diff --git a/frappe/templates/pages/integrations/paytm_checkout.py b/frappe/templates/pages/integrations/paytm_checkout.py index 1bd9457ef6..c003844157 100644 --- a/frappe/templates/pages/integrations/paytm_checkout.py +++ b/frappe/templates/pages/integrations/paytm_checkout.py @@ -1,5 +1,5 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE import frappe from frappe import _ import json diff --git a/frappe/templates/pages/integrations/razorpay_checkout.py b/frappe/templates/pages/integrations/razorpay_checkout.py index 1901577d4b..51904fca46 100644 --- a/frappe/templates/pages/integrations/razorpay_checkout.py +++ b/frappe/templates/pages/integrations/razorpay_checkout.py @@ -1,5 +1,5 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE import frappe from frappe import _ from frappe.utils import flt, cint diff --git a/frappe/templates/pages/integrations/stripe_checkout.py b/frappe/templates/pages/integrations/stripe_checkout.py index 186c3e0942..eb9c23ad22 100644 --- a/frappe/templates/pages/integrations/stripe_checkout.py +++ b/frappe/templates/pages/integrations/stripe_checkout.py @@ -1,5 +1,5 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE import frappe from frappe import _ from frappe.utils import cint, fmt_money diff --git a/frappe/utils/global_search.py b/frappe/utils/global_search.py index be941abd51..7b591dff45 100644 --- a/frappe/utils/global_search.py +++ b/frappe/utils/global_search.py @@ -1,5 +1,5 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE import frappe import re diff --git a/frappe/utils/goal.py b/frappe/utils/goal.py index 195c962aab..2d7e73eb1a 100644 --- a/frappe/utils/goal.py +++ b/frappe/utils/goal.py @@ -1,5 +1,5 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE import frappe from frappe import _ From 34460265554242a8d05fb09f049033b1117e1a2b Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 3 Sep 2021 12:02:59 +0530 Subject: [PATCH 39/58] chore: Update header: license.txt => LICENSE The license.txt file has been replaced with LICENSE for quite a while now. INAL but it didn't seem accurate to say "hey, checkout license.txt although there's no such file". Apart from this, there were inconsistencies in the headers altogether...this change brings consistency. --- frappe/__init__.py | 2 +- frappe/api.py | 2 +- frappe/app.py | 2 +- .../doctype/assignment_rule/assignment_rule.py | 2 +- .../assignment_rule/test_assignment_rule.py | 2 +- .../assignment_rule_day/assignment_rule_day.py | 2 +- .../assignment_rule_user/assignment_rule_user.py | 2 +- .../doctype/auto_repeat/auto_repeat.py | 2 +- .../doctype/auto_repeat/test_auto_repeat.py | 2 +- .../doctype/auto_repeat_day/auto_repeat_day.py | 2 +- frappe/automation/doctype/milestone/milestone.py | 2 +- .../doctype/milestone/test_milestone.py | 2 +- .../milestone_tracker/milestone_tracker.py | 2 +- .../milestone_tracker/test_milestone_tracker.py | 2 +- frappe/boot.py | 2 +- frappe/build.py | 2 +- frappe/cache_manager.py | 2 +- frappe/chat/doctype/chat_token/chat_token.py | 2 +- frappe/client.py | 2 +- frappe/commands/__init__.py | 2 +- frappe/contacts/doctype/address/address.py | 2 +- frappe/contacts/doctype/address/test_address.py | 2 +- .../doctype/address_template/address_template.py | 2 +- .../address_template/test_address_template.py | 2 +- frappe/contacts/doctype/contact/test_contact.py | 2 +- .../doctype/contact_email/contact_email.py | 2 +- .../doctype/contact_phone/contact_phone.py | 2 +- frappe/contacts/doctype/gender/gender.py | 2 +- frappe/contacts/doctype/gender/test_gender.py | 2 +- frappe/contacts/doctype/salutation/salutation.py | 2 +- .../doctype/salutation/test_salutation.py | 2 +- .../addresses_and_contacts.py | 2 +- frappe/core/__init__.py | 2 +- frappe/core/doctype/__init__.py | 2 +- frappe/core/doctype/access_log/access_log.py | 2 +- .../core/doctype/access_log/test_access_log.py | 2 +- frappe/core/doctype/activity_log/activity_log.py | 2 +- frappe/core/doctype/activity_log/feed.py | 2 +- .../doctype/activity_log/test_activity_log.py | 2 +- frappe/core/doctype/block_module/block_module.py | 2 +- frappe/core/doctype/comment/comment.py | 2 +- frappe/core/doctype/comment/test_comment.py | 2 +- frappe/core/doctype/communication/__init__.py | 2 +- .../core/doctype/communication/communication.py | 2 +- frappe/core/doctype/communication/email.py | 2 +- .../doctype/communication/test_communication.py | 2 +- .../communication_link/communication_link.py | 2 +- .../doctype/custom_docperm/custom_docperm.py | 2 +- .../custom_docperm/test_custom_docperm.py | 2 +- frappe/core/doctype/custom_role/custom_role.py | 2 +- .../core/doctype/custom_role/test_custom_role.py | 2 +- frappe/core/doctype/data_export/data_export.py | 2 +- frappe/core/doctype/data_export/exporter.py | 2 +- frappe/core/doctype/data_import/data_import.py | 2 +- frappe/core/doctype/data_import/exporter.py | 2 +- frappe/core/doctype/data_import/importer.py | 2 +- .../core/doctype/data_import/test_data_import.py | 2 +- frappe/core/doctype/data_import/test_exporter.py | 2 +- frappe/core/doctype/data_import/test_importer.py | 2 +- frappe/core/doctype/defaultvalue/__init__.py | 2 +- frappe/core/doctype/defaultvalue/defaultvalue.py | 2 +- .../doctype/deleted_document/deleted_document.py | 2 +- .../deleted_document/test_deleted_document.py | 2 +- frappe/core/doctype/docfield/__init__.py | 2 +- frappe/core/doctype/docfield/docfield.py | 2 +- frappe/core/doctype/docperm/__init__.py | 2 +- frappe/core/doctype/docperm/docperm.py | 2 +- frappe/core/doctype/docshare/docshare.py | 2 +- frappe/core/doctype/docshare/test_docshare.py | 2 +- frappe/core/doctype/doctype/__init__.py | 2 +- frappe/core/doctype/doctype/doctype.py | 2 +- frappe/core/doctype/doctype/test_doctype.py | 2 +- .../doctype/doctype_action/doctype_action.py | 2 +- frappe/core/doctype/doctype_link/doctype_link.py | 2 +- .../document_naming_rule/document_naming_rule.py | 2 +- .../test_document_naming_rule.py | 2 +- .../document_naming_rule_condition.py | 2 +- .../test_document_naming_rule_condition.py | 2 +- frappe/core/doctype/domain/domain.py | 2 +- frappe/core/doctype/domain/test_domain.py | 2 +- .../doctype/domain_settings/domain_settings.py | 2 +- frappe/core/doctype/dynamic_link/dynamic_link.py | 2 +- frappe/core/doctype/error_log/error_log.py | 2 +- frappe/core/doctype/error_log/test_error_log.py | 2 +- .../doctype/error_snapshot/error_snapshot.py | 2 +- .../error_snapshot/test_error_snapshot.py | 2 +- frappe/core/doctype/feedback/feedback.py | 2 +- frappe/core/doctype/feedback/test_feedback.py | 2 +- frappe/core/doctype/file/file.py | 2 +- frappe/core/doctype/file/test_file.py | 2 +- frappe/core/doctype/has_domain/has_domain.py | 2 +- frappe/core/doctype/has_role/has_role.py | 2 +- .../installed_application.py | 2 +- .../installed_applications.py | 2 +- .../test_installed_applications.py | 2 +- frappe/core/doctype/language/language.py | 2 +- frappe/core/doctype/language/test_language.py | 2 +- .../doctype/log_setting_user/log_setting_user.py | 2 +- .../log_setting_user/test_log_setting_user.py | 2 +- frappe/core/doctype/log_settings/log_settings.py | 2 +- .../doctype/log_settings/test_log_settings.py | 2 +- frappe/core/doctype/module_def/__init__.py | 2 +- frappe/core/doctype/module_def/module_def.py | 2 +- .../core/doctype/module_def/test_module_def.py | 2 +- .../doctype/module_profile/module_profile.py | 2 +- .../module_profile/test_module_profile.py | 2 +- frappe/core/doctype/navbar_item/navbar_item.py | 2 +- .../core/doctype/navbar_item/test_navbar_item.py | 2 +- .../doctype/navbar_settings/navbar_settings.py | 2 +- .../navbar_settings/test_navbar_settings.py | 2 +- frappe/core/doctype/page/__init__.py | 2 +- frappe/core/doctype/page/page.py | 2 +- frappe/core/doctype/page/test_page.py | 2 +- frappe/core/doctype/patch_log/__init__.py | 2 +- frappe/core/doctype/patch_log/patch_log.py | 4 ++-- frappe/core/doctype/patch_log/test_patch_log.py | 2 +- .../doctype/payment_gateway/payment_gateway.py | 2 +- .../payment_gateway/test_payment_gateway.py | 2 +- .../doctype/prepared_report/prepared_report.py | 2 +- .../prepared_report/test_prepared_report.py | 2 +- frappe/core/doctype/report/__init__.py | 2 +- .../doctype/report/boilerplate/controller.py | 2 +- frappe/core/doctype/report/report.py | 2 +- frappe/core/doctype/report/test_report.py | 2 +- .../core/doctype/report_column/report_column.py | 2 +- .../core/doctype/report_filter/report_filter.py | 2 +- frappe/core/doctype/role/__init__.py | 2 +- frappe/core/doctype/role/role.py | 2 +- frappe/core/doctype/role/test_role.py | 2 +- .../role_permission_for_page_and_report.py | 2 +- frappe/core/doctype/role_profile/role_profile.py | 2 +- .../doctype/role_profile/test_role_profile.py | 2 +- .../scheduled_job_log/scheduled_job_log.py | 2 +- .../scheduled_job_log/test_scheduled_job_log.py | 2 +- .../scheduled_job_type/scheduled_job_type.py | 2 +- .../test_scheduled_job_type.py | 2 +- .../core/doctype/server_script/server_script.py | 2 +- .../doctype/server_script/test_server_script.py | 2 +- .../doctype/session_default/session_default.py | 2 +- .../session_default_settings.py | 2 +- .../test_session_default_settings.py | 2 +- .../doctype/sms_settings/test_sms_settings.py | 2 +- .../doctype/success_action/success_action.py | 2 +- .../doctype/system_settings/system_settings.py | 2 +- .../system_settings/test_system_settings.py | 2 +- frappe/core/doctype/test/test.py | 2 +- frappe/core/doctype/test/test_test.py | 2 +- .../transaction_log/test_transaction_log.py | 2 +- .../doctype/transaction_log/transaction_log.py | 2 +- .../core/doctype/translation/test_translation.py | 2 +- frappe/core/doctype/translation/translation.py | 2 +- frappe/core/doctype/user/test_user.py | 2 +- frappe/core/doctype/user/user.py | 2 +- .../user_document_type/user_document_type.py | 2 +- frappe/core/doctype/user_email/user_email.py | 2 +- .../core/doctype/user_group/test_user_group.py | 2 +- frappe/core/doctype/user_group/user_group.py | 2 +- .../user_group_member/test_user_group_member.py | 2 +- .../user_group_member/user_group_member.py | 2 +- .../doctype/user_permission/user_permission.py | 2 +- .../user_select_document_type.py | 2 +- .../user_social_login/user_social_login.py | 2 +- frappe/core/doctype/user_type/test_user_type.py | 2 +- frappe/core/doctype/user_type/user_type.py | 2 +- .../doctype/user_type_module/user_type_module.py | 2 +- frappe/core/doctype/version/test_version.py | 2 +- frappe/core/doctype/version/version.py | 4 ++-- frappe/core/doctype/view_log/test_view_log.py | 2 +- frappe/core/doctype/view_log/view_log.py | 2 +- frappe/core/notifications.py | 2 +- frappe/core/page/__init__.py | 2 +- .../core/page/background_jobs/background_jobs.py | 2 +- frappe/core/page/permission_manager/__init__.py | 2 +- .../permission_manager/permission_manager.py | 2 +- frappe/core/report/__init__.py | 2 +- .../permitted_documents_for_user.py | 2 +- .../transaction_log_report.py | 2 +- frappe/core/utils.py | 2 +- frappe/custom/doctype/client_script/__init__.py | 2 +- .../doctype/client_script/client_script.py | 2 +- .../doctype/client_script/test_client_script.py | 2 +- frappe/custom/doctype/custom_field/__init__.py | 2 +- .../custom/doctype/custom_field/custom_field.py | 2 +- .../doctype/custom_field/test_custom_field.py | 2 +- frappe/custom/doctype/customize_form/__init__.py | 2 +- .../customize_form/test_customize_form.py | 2 +- .../doctype/customize_form_field/__init__.py | 2 +- .../customize_form_field/customize_form_field.py | 2 +- .../doctype/doctype_layout/doctype_layout.py | 2 +- .../doctype_layout/test_doctype_layout.py | 2 +- .../doctype_layout_field/doctype_layout_field.py | 2 +- .../custom/doctype/property_setter/__init__.py | 2 +- .../doctype/property_setter/property_setter.py | 2 +- .../property_setter/test_property_setter.py | 2 +- .../doctype/test_rename_new/test_rename_new.py | 2 +- .../test_rename_new/test_test_rename_new.py | 2 +- .../data_migration_connector.py | 2 +- .../test_data_migration_connector.py | 2 +- .../data_migration_mapping.py | 2 +- .../test_data_migration_mapping.py | 2 +- .../data_migration_mapping_detail.py | 2 +- .../data_migration_plan/data_migration_plan.py | 2 +- .../test_data_migration_plan.py | 2 +- .../data_migration_plan_mapping.py | 2 +- .../data_migration_run/data_migration_run.py | 2 +- .../test_data_migration_run.py | 2 +- frappe/database/__init__.py | 2 +- frappe/database/database.py | 2 +- frappe/defaults.py | 2 +- frappe/desk/__init__.py | 2 +- frappe/desk/calendar.py | 2 +- frappe/desk/desk_page.py | 2 +- frappe/desk/desktop.py | 6 +++--- frappe/desk/doctype/bulk_update/bulk_update.py | 2 +- .../desk/doctype/calendar_view/calendar_view.py | 2 +- frappe/desk/doctype/console_log/console_log.py | 2 +- .../desk/doctype/console_log/test_console_log.py | 2 +- frappe/desk/doctype/dashboard/dashboard.py | 2 +- frappe/desk/doctype/dashboard/test_dashboard.py | 2 +- .../doctype/dashboard_chart/dashboard_chart.py | 2 +- .../dashboard_chart/test_dashboard_chart.py | 2 +- .../dashboard_chart_field.py | 2 +- .../dashboard_chart_link/dashboard_chart_link.py | 2 +- .../dashboard_chart_source.py | 2 +- .../test_dashboard_chart_source.py | 2 +- .../dashboard_settings/dashboard_settings.py | 2 +- frappe/desk/doctype/desktop_icon/desktop_icon.py | 2 +- frappe/desk/doctype/event/__init__.py | 2 +- frappe/desk/doctype/event/event.py | 2 +- frappe/desk/doctype/event/test_event.py | 2 +- .../event_participants/event_participants.py | 2 +- frappe/desk/doctype/form_tour/form_tour.py | 4 ++-- frappe/desk/doctype/form_tour/test_form_tour.py | 2 +- .../doctype/form_tour_step/form_tour_step.py | 2 +- .../global_search_doctype.py | 2 +- .../global_search_settings.py | 2 +- frappe/desk/doctype/kanban_board/kanban_board.py | 2 +- .../doctype/kanban_board/test_kanban_board.py | 2 +- .../kanban_board_column/kanban_board_column.py | 2 +- frappe/desk/doctype/list_filter/list_filter.py | 2 +- .../list_view_settings/list_view_settings.py | 2 +- .../test_list_view_settings.py | 2 +- .../module_onboarding/module_onboarding.py | 2 +- .../module_onboarding/test_module_onboarding.py | 2 +- frappe/desk/doctype/note/note.py | 2 +- frappe/desk/doctype/note/test_note.py | 2 +- frappe/desk/doctype/note_seen_by/note_seen_by.py | 2 +- .../doctype/notification_log/notification_log.py | 2 +- .../notification_log/test_notification_log.py | 2 +- .../notification_settings.py | 2 +- .../notification_subscribed_document.py | 2 +- frappe/desk/doctype/number_card/number_card.py | 2 +- .../desk/doctype/number_card/test_number_card.py | 2 +- .../doctype/number_card_link/number_card_link.py | 2 +- .../onboarding_permission.py | 2 +- .../test_onboarding_permission.py | 2 +- .../doctype/onboarding_step/onboarding_step.py | 2 +- .../onboarding_step/test_onboarding_step.py | 2 +- .../onboarding_step_map/onboarding_step_map.py | 2 +- .../desk/doctype/route_history/route_history.py | 2 +- .../doctype/system_console/system_console.py | 2 +- .../system_console/test_system_console.py | 2 +- frappe/desk/doctype/tag/tag.py | 2 +- frappe/desk/doctype/tag_link/tag_link.py | 2 +- frappe/desk/doctype/tag_link/test_tag_link.py | 2 +- frappe/desk/doctype/todo/__init__.py | 2 +- frappe/desk/doctype/todo/test_todo.py | 2 +- frappe/desk/doctype/todo/todo.py | 2 +- frappe/desk/doctype/workspace/test_workspace.py | 2 +- frappe/desk/doctype/workspace/workspace.py | 6 +++--- .../doctype/workspace_chart/workspace_chart.py | 2 +- .../doctype/workspace_link/workspace_link.py | 2 +- .../workspace_shortcut/workspace_shortcut.py | 2 +- frappe/desk/form/__init__.py | 2 +- frappe/desk/form/assign_to.py | 2 +- frappe/desk/form/document_follow.py | 2 +- frappe/desk/form/linked_with.py | 2 +- frappe/desk/form/load.py | 2 +- frappe/desk/form/meta.py | 2 +- frappe/desk/form/save.py | 2 +- frappe/desk/form/test_form.py | 2 +- frappe/desk/form/utils.py | 2 +- frappe/desk/gantt.py | 2 +- frappe/desk/like.py | 2 +- frappe/desk/listview.py | 2 +- frappe/desk/moduleview.py | 2 +- frappe/desk/notifications.py | 2 +- frappe/desk/page/activity/activity.py | 2 +- frappe/desk/page/leaderboard/leaderboard.py | 2 +- frappe/desk/page/setup_wizard/setup_wizard.py | 2 +- frappe/desk/query_report.py | 2 +- frappe/desk/report/todo/todo.py | 2 +- frappe/desk/report_dump.py | 2 +- frappe/desk/reportview.py | 2 +- frappe/desk/search.py | 2 +- frappe/desk/treeview.py | 2 +- frappe/desk/utils.py | 2 +- frappe/email/__init__.py | 2 +- .../auto_email_report/auto_email_report.py | 2 +- .../auto_email_report/test_auto_email_report.py | 2 +- .../doctype/document_follow/document_follow.py | 2 +- .../document_follow/test_document_follow.py | 2 +- .../email/doctype/email_account/email_account.py | 2 +- .../doctype/email_account/test_email_account.py | 2 +- .../email/doctype/email_domain/email_domain.py | 2 +- .../doctype/email_domain/test_email_domain.py | 2 +- .../doctype/email_flag_queue/email_flag_queue.py | 2 +- .../email_flag_queue/test_email_flag_queue.py | 2 +- frappe/email/doctype/email_group/email_group.py | 2 +- .../doctype/email_group/test_email_group.py | 2 +- .../email_group_member/email_group_member.py | 2 +- .../test_email_group_member.py | 2 +- frappe/email/doctype/email_queue/email_queue.py | 2 +- .../doctype/email_queue/test_email_queue.py | 2 +- .../email_queue_recipient.py | 2 +- frappe/email/doctype/email_rule/email_rule.py | 2 +- .../email/doctype/email_rule/test_email_rule.py | 2 +- .../doctype/email_template/email_template.py | 2 +- .../email_template/test_email_template.py | 2 +- .../email_unsubscribe/email_unsubscribe.py | 2 +- .../email_unsubscribe/test_email_unsubscribe.py | 2 +- .../newsletter_email_group.py | 2 +- .../email/doctype/notification/notification.py | 2 +- .../doctype/notification/test_notification.py | 2 +- .../notification_recipient.py | 2 +- .../unhandled_email/test_unhandled_email.py | 2 +- .../doctype/unhandled_email/unhandled_email.py | 2 +- frappe/email/email_body.py | 2 +- frappe/email/queue.py | 2 +- frappe/email/receive.py | 2 +- frappe/email/smtp.py | 2 +- frappe/email/utils.py | 2 +- .../document_type_field_mapping.py | 2 +- .../document_type_mapping.py | 2 +- .../test_document_type_mapping.py | 2 +- .../doctype/event_consumer/event_consumer.py | 2 +- .../event_consumer/test_event_consumer.py | 2 +- .../event_consumer_document_type.py | 2 +- .../doctype/event_producer/event_producer.py | 2 +- .../event_producer/test_event_producer.py | 2 +- .../event_producer_document_type.py | 2 +- .../event_producer_last_update.py | 2 +- .../test_event_producer_last_update.py | 2 +- .../doctype/event_sync_log/event_sync_log.py | 2 +- .../event_sync_log/test_event_sync_log.py | 2 +- .../doctype/event_update_log/event_update_log.py | 2 +- .../event_update_log/test_event_update_log.py | 2 +- .../event_update_log_consumer.py | 2 +- frappe/exceptions.py | 2 +- frappe/geo/country_info.py | 2 +- frappe/geo/doctype/country/country.py | 2 +- frappe/geo/doctype/country/test_country.py | 2 +- frappe/geo/doctype/currency/currency.py | 2 +- frappe/geo/doctype/currency/test_currency.py | 2 +- frappe/geo/utils.py | 2 +- frappe/handler.py | 2 +- frappe/installer.py | 2 +- .../braintree_settings/braintree_settings.py | 2 +- .../test_braintree_settings.py | 2 +- .../doctype/connected_app/connected_app.py | 2 +- .../doctype/connected_app/test_connected_app.py | 2 +- .../doctype/dropbox_settings/dropbox_settings.py | 2 +- .../dropbox_settings/test_dropbox_settings.py | 2 +- .../doctype/google_calendar/google_calendar.py | 2 +- .../doctype/google_contacts/google_contacts.py | 2 +- .../doctype/google_drive/google_drive.py | 2 +- .../doctype/google_drive/test_google_drive.py | 2 +- .../doctype/google_settings/google_settings.py | 2 +- .../google_settings/test_google_settings.py | 2 +- .../integration_request/integration_request.py | 2 +- .../test_integration_request.py | 2 +- .../ldap_group_mapping/ldap_group_mapping.py | 2 +- .../doctype/ldap_settings/ldap_settings.py | 2 +- .../doctype/ldap_settings/test_ldap_settings.py | 16 ++++++++-------- .../oauth_authorization_code.py | 2 +- .../test_oauth_authorization_code.py | 2 +- .../oauth_bearer_token/oauth_bearer_token.py | 2 +- .../test_oauth_bearer_token.py | 2 +- .../doctype/oauth_client/oauth_client.py | 2 +- .../doctype/oauth_client/test_oauth_client.py | 2 +- .../oauth_provider_settings.py | 2 +- .../doctype/oauth_scope/oauth_scope.py | 2 +- .../doctype/paypal_settings/paypal_settings.py | 2 +- .../doctype/paytm_settings/paytm_settings.py | 2 +- .../paytm_settings/test_paytm_settings.py | 2 +- .../doctype/query_parameters/query_parameters.py | 2 +- .../razorpay_settings/razorpay_settings.py | 2 +- .../s3_backup_settings/s3_backup_settings.py | 2 +- .../test_s3_backup_settings.py | 2 +- .../slack_webhook_url/slack_webhook_url.py | 2 +- .../slack_webhook_url/test_slack_webhook_url.py | 2 +- .../doctype/social_login_key/social_login_key.py | 2 +- .../social_login_key/test_social_login_key.py | 2 +- .../doctype/stripe_settings/stripe_settings.py | 2 +- .../stripe_settings/test_stripe_settings.py | 2 +- .../doctype/token_cache/test_token_cache.py | 2 +- .../doctype/token_cache/token_cache.py | 2 +- frappe/integrations/doctype/webhook/__init__.py | 2 +- .../integrations/doctype/webhook/test_webhook.py | 2 +- frappe/integrations/doctype/webhook/webhook.py | 2 +- .../doctype/webhook_data/webhook_data.py | 2 +- .../doctype/webhook_header/webhook_header.py | 2 +- .../test_webhook_request_log.py | 2 +- .../webhook_request_log/webhook_request_log.py | 2 +- frappe/integrations/oauth2_logins.py | 2 +- frappe/integrations/offsite_backup_utils.py | 2 +- frappe/integrations/utils.py | 2 +- frappe/middlewares.py | 2 +- frappe/migrate.py | 2 +- frappe/model/__init__.py | 2 +- frappe/model/base_document.py | 2 +- frappe/model/create_new.py | 2 +- frappe/model/db_query.py | 2 +- frappe/model/delete_doc.py | 2 +- frappe/model/docfield.py | 2 +- frappe/model/document.py | 2 +- frappe/model/dynamic_links.py | 2 +- frappe/model/mapper.py | 2 +- frappe/model/meta.py | 2 +- frappe/model/naming.py | 2 +- frappe/model/rename_doc.py | 2 +- frappe/model/sync.py | 2 +- frappe/model/utils/__init__.py | 2 +- frappe/model/utils/link_count.py | 2 +- frappe/model/utils/rename_field.py | 2 +- frappe/model/workflow.py | 2 +- frappe/modules/export_file.py | 2 +- frappe/modules/import_file.py | 2 +- frappe/modules/patch_handler.py | 2 +- frappe/modules/utils.py | 2 +- frappe/monitor.py | 2 +- .../v10_0/modify_smallest_currency_fraction.py | 2 +- frappe/patches/v10_0/set_default_locking_time.py | 2 +- .../v11_0/change_email_signature_fieldtype.py | 2 +- ...ctype_user_permissions_for_page_and_report.py | 2 +- .../v12_0/set_default_password_reset_limit.py | 2 +- .../delete_event_producer_and_consumer_keys.py | 2 +- .../patches/v13_0/delete_package_publish_tool.py | 2 +- frappe/patches/v13_0/enable_custom_script.py | 2 +- .../generate_theme_files_in_public_folder.py | 2 +- frappe/patches/v13_0/jinja_hook.py | 2 +- frappe/patches/v13_0/queryreport_columns.py | 2 +- .../v13_0/remove_tailwind_from_page_builder.py | 2 +- frappe/patches/v13_0/remove_twilio_settings.py | 2 +- ...me_list_view_setting_to_list_view_settings.py | 2 +- .../patches/v13_0/rename_notification_fields.py | 2 +- frappe/patches/v13_0/rename_onboarding.py | 2 +- frappe/patches/v13_0/replace_old_data_import.py | 2 +- frappe/patches/v13_0/update_duration_options.py | 2 +- .../v13_0/update_newsletter_content_type.py | 2 +- .../update_notification_channel_if_empty.py | 2 +- frappe/patches/v13_0/web_template_set_module.py | 2 +- frappe/permissions.py | 2 +- .../printing/doctype/letter_head/letter_head.py | 2 +- .../doctype/letter_head/test_letter_head.py | 2 +- .../doctype/print_format/print_format.py | 2 +- .../doctype/print_format/test_print_format.py | 2 +- .../doctype/print_heading/print_heading.py | 2 +- .../doctype/print_heading/test_print_heading.py | 2 +- .../doctype/print_settings/print_settings.py | 2 +- .../print_settings/test_print_settings.py | 2 +- .../printing/doctype/print_style/print_style.py | 2 +- .../doctype/print_style/test_print_style.py | 2 +- frappe/rate_limiter.py | 2 +- frappe/realtime.py | 2 +- frappe/recorder.py | 2 +- frappe/search/__init__.py | 2 +- frappe/search/full_text_search.py | 2 +- frappe/search/test_full_text_search.py | 2 +- frappe/search/website_search.py | 2 +- frappe/sessions.py | 2 +- frappe/share.py | 2 +- .../doctype/energy_point_log/energy_point_log.py | 2 +- .../energy_point_log/test_energy_point_log.py | 2 +- .../energy_point_rule/energy_point_rule.py | 2 +- .../energy_point_settings.py | 2 +- frappe/social/doctype/post/post.py | 2 +- .../social/doctype/post_comment/post_comment.py | 2 +- .../social/doctype/review_level/review_level.py | 2 +- frappe/templates/includes/comments/comments.py | 2 +- frappe/templates/includes/feedback/feedback.py | 2 +- .../pages/integrations/payment_cancel.py | 2 +- .../pages/integrations/payment_success.py | 2 +- frappe/test_runner.py | 2 +- frappe/tests/test_assign.py | 2 +- frappe/tests/test_auth.py | 2 +- frappe/tests/test_bot.py | 2 +- frappe/tests/test_cors.py | 2 +- frappe/tests/test_db.py | 4 ++-- frappe/tests/test_db_query.py | 2 +- frappe/tests/test_defaults.py | 2 +- frappe/tests/test_document.py | 2 +- frappe/tests/test_document_locks.py | 2 +- frappe/tests/test_domainification.py | 2 +- frappe/tests/test_dynamic_links.py | 2 +- frappe/tests/test_email.py | 2 +- frappe/tests/test_exporter_fixtures.py | 2 +- frappe/tests/test_fmt_datetime.py | 2 +- frappe/tests/test_fmt_money.py | 2 +- frappe/tests/test_form_load.py | 2 +- frappe/tests/test_frappe_client.py | 2 +- frappe/tests/test_geo_ip.py | 2 +- frappe/tests/test_global_search.py | 2 +- frappe/tests/test_goal.py | 2 +- frappe/tests/test_hooks.py | 2 +- frappe/tests/test_listview.py | 2 +- frappe/tests/test_monitor.py | 2 +- frappe/tests/test_naming.py | 2 +- frappe/tests/test_oauth20.py | 2 +- frappe/tests/test_password.py | 4 ++-- frappe/tests/test_pdf.py | 2 +- frappe/tests/test_permissions.py | 2 +- frappe/tests/test_query_report.py | 2 +- frappe/tests/test_rate_limiter.py | 2 +- frappe/tests/test_recorder.py | 2 +- frappe/tests/test_search.py | 2 +- frappe/tests/test_seen.py | 2 +- frappe/tests/test_translate.py | 2 +- frappe/tests/test_twofactor.py | 2 +- frappe/tests/test_utils.py | 2 +- frappe/tests/tests_geo_utils.py | 2 +- frappe/translate.py | 2 +- frappe/twofactor.py | 2 +- frappe/utils/__init__.py | 2 +- frappe/utils/backups.py | 2 +- frappe/utils/boilerplate.py | 2 +- frappe/utils/bot.py | 2 +- frappe/utils/change_log.py | 2 +- frappe/utils/csvutils.py | 2 +- frappe/utils/dashboard.py | 2 +- frappe/utils/data.py | 2 +- frappe/utils/dateutils.py | 2 +- frappe/utils/error.py | 2 +- frappe/utils/file_lock.py | 2 +- frappe/utils/file_manager.py | 2 +- frappe/utils/fixtures.py | 2 +- frappe/utils/formatters.py | 2 +- frappe/utils/image.py | 2 +- frappe/utils/install.py | 2 +- frappe/utils/jinja.py | 2 +- frappe/utils/jinja_globals.py | 2 +- frappe/utils/nestedset.py | 2 +- frappe/utils/oauth.py | 2 +- frappe/utils/password.py | 2 +- frappe/utils/password_strength.py | 2 +- frappe/utils/pdf.py | 2 +- frappe/utils/redis_wrapper.py | 2 +- frappe/utils/response.py | 2 +- frappe/utils/scheduler.py | 2 +- frappe/utils/testutils.py | 2 +- frappe/utils/user.py | 2 +- frappe/utils/verified_command.py | 2 +- frappe/utils/xlsxutils.py | 2 +- frappe/website/__init__.py | 2 +- .../about_us_settings/about_us_settings.py | 4 ++-- .../about_us_settings/test_about_us_settings.py | 2 +- .../about_us_team_member/about_us_team_member.py | 4 ++-- .../doctype/blog_category/blog_category.py | 2 +- .../doctype/blog_category/test_blog_category.py | 2 +- frappe/website/doctype/blog_post/blog_post.py | 2 +- .../website/doctype/blog_post/test_blog_post.py | 2 +- .../doctype/blog_settings/blog_settings.py | 4 ++-- .../doctype/blog_settings/test_blog_settings.py | 2 +- frappe/website/doctype/blogger/blogger.py | 4 ++-- frappe/website/doctype/blogger/test_blogger.py | 2 +- frappe/website/doctype/color/color.py | 2 +- frappe/website/doctype/color/test_color.py | 2 +- .../doctype/company_history/company_history.py | 4 ++-- .../contact_us_settings/contact_us_settings.py | 4 ++-- .../website/doctype/help_article/help_article.py | 2 +- .../doctype/help_article/test_help_article.py | 2 +- .../doctype/help_category/help_category.py | 2 +- .../doctype/help_category/test_help_category.py | 2 +- .../personal_data_deletion_request.py | 2 +- .../test_personal_data_deletion_request.py | 2 +- .../personal_data_deletion_step.py | 2 +- .../personal_data_download_request.py | 2 +- .../test_personal_data_download_request.py | 2 +- .../doctype/portal_menu_item/portal_menu_item.py | 2 +- .../doctype/portal_settings/portal_settings.py | 2 +- .../portal_settings/test_portal_settings.py | 2 +- .../social_link_settings/social_link_settings.py | 2 +- .../website/doctype/top_bar_item/top_bar_item.py | 2 +- frappe/website/doctype/web_form/test_web_form.py | 2 +- frappe/website/doctype/web_form/web_form.py | 2 +- .../doctype/web_form_field/web_form_field.py | 2 +- frappe/website/doctype/web_page/web_page.py | 2 +- .../doctype/web_page_block/web_page_block.py | 2 +- .../doctype/web_page_view/test_web_page_view.py | 2 +- .../doctype/web_page_view/web_page_view.py | 2 +- .../doctype/web_template/test_web_template.py | 2 +- .../website/doctype/web_template/web_template.py | 2 +- .../test_web_template_field.py | 2 +- .../web_template_field/web_template_field.py | 2 +- .../doctype/website_meta_tag/website_meta_tag.py | 2 +- .../test_website_route_meta.py | 2 +- .../website_route_meta/website_route_meta.py | 2 +- .../website_route_redirect.py | 2 +- .../doctype/website_script/website_script.py | 4 ++-- .../doctype/website_settings/google_indexing.py | 2 +- .../website_settings/test_website_settings.py | 2 +- .../doctype/website_settings/website_settings.py | 2 +- .../website_sidebar/test_website_sidebar.py | 2 +- .../doctype/website_sidebar/website_sidebar.py | 2 +- .../website_sidebar_item/website_sidebar_item.py | 2 +- .../website_slideshow/test_website_slideshow.py | 2 +- .../website_slideshow/website_slideshow.py | 4 ++-- .../website_slideshow_item.py | 4 ++-- .../doctype/website_theme/test_website_theme.py | 2 +- .../doctype/website_theme/website_theme.py | 2 +- .../website_theme_ignore_app.py | 2 +- .../website_analytics/website_analytics.py | 2 +- frappe/website/router.py | 2 +- frappe/website/utils.py | 2 +- frappe/website/website_generator.py | 2 +- frappe/workflow/doctype/workflow/__init__.py | 2 +- .../workflow/doctype/workflow/test_workflow.py | 2 +- frappe/workflow/doctype/workflow/workflow.py | 2 +- .../workflow/doctype/workflow_action/__init__.py | 2 +- .../workflow_action/test_workflow_action.py | 2 +- .../doctype/workflow_action/workflow_action.py | 2 +- .../workflow_action_master.py | 2 +- .../doctype/workflow_document_state/__init__.py | 2 +- .../workflow_document_state.py | 2 +- .../workflow/doctype/workflow_state/__init__.py | 2 +- .../workflow_state/test_workflow_state.py | 2 +- .../doctype/workflow_state/workflow_state.py | 2 +- .../doctype/workflow_transition/__init__.py | 2 +- .../workflow_transition/workflow_transition.py | 2 +- frappe/www/404.py | 2 +- frappe/www/about.py | 2 +- frappe/www/app.py | 2 +- frappe/www/complete_signup.py | 2 +- frappe/www/contact.py | 2 +- frappe/www/error.py | 2 +- frappe/www/list.py | 2 +- frappe/www/login.py | 2 +- frappe/www/me.py | 2 +- frappe/www/message.py | 2 +- frappe/www/printview.py | 2 +- frappe/www/profile.py | 2 +- frappe/www/qrcode.py | 2 +- frappe/www/rss.py | 2 +- frappe/www/sitemap.py | 2 +- frappe/www/update_password.py | 2 +- frappe/www/website_script.py | 2 +- 646 files changed, 671 insertions(+), 671 deletions(-) diff --git a/frappe/__init__.py b/frappe/__init__.py index ea983e7f02..7c6005a350 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """ Frappe - Low Code Open Source Framework in Python and JS diff --git a/frappe/api.py b/frappe/api.py index 636c6b2888..b061761d10 100644 --- a/frappe/api.py +++ b/frappe/api.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import base64 import binascii import json diff --git a/frappe/app.py b/frappe/app.py index 920628dda4..8e1534e7ef 100644 --- a/frappe/app.py +++ b/frappe/app.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import os import logging diff --git a/frappe/automation/doctype/assignment_rule/assignment_rule.py b/frappe/automation/doctype/assignment_rule/assignment_rule.py index ef579aca01..a3e27d4da5 100644 --- a/frappe/automation/doctype/assignment_rule/assignment_rule.py +++ b/frappe/automation/doctype/assignment_rule/assignment_rule.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/automation/doctype/assignment_rule/test_assignment_rule.py b/frappe/automation/doctype/assignment_rule/test_assignment_rule.py index dfefd091fb..1c9e177f94 100644 --- a/frappe/automation/doctype/assignment_rule/test_assignment_rule.py +++ b/frappe/automation/doctype/assignment_rule/test_assignment_rule.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest from frappe.utils import random_string diff --git a/frappe/automation/doctype/assignment_rule_day/assignment_rule_day.py b/frappe/automation/doctype/assignment_rule_day/assignment_rule_day.py index c734495c39..836ae3d453 100644 --- a/frappe/automation/doctype/assignment_rule_day/assignment_rule_day.py +++ b/frappe/automation/doctype/assignment_rule_day/assignment_rule_day.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/automation/doctype/assignment_rule_user/assignment_rule_user.py b/frappe/automation/doctype/assignment_rule_user/assignment_rule_user.py index 4d65efd5c1..1bb8953a7a 100644 --- a/frappe/automation/doctype/assignment_rule_user/assignment_rule_user.py +++ b/frappe/automation/doctype/assignment_rule_user/assignment_rule_user.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/automation/doctype/auto_repeat/auto_repeat.py b/frappe/automation/doctype/auto_repeat/auto_repeat.py index d2afda1553..5ab6c86c00 100644 --- a/frappe/automation/doctype/auto_repeat/auto_repeat.py +++ b/frappe/automation/doctype/auto_repeat/auto_repeat.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/automation/doctype/auto_repeat/test_auto_repeat.py b/frappe/automation/doctype/auto_repeat/test_auto_repeat.py index 567c1161af..30a0310a92 100644 --- a/frappe/automation/doctype/auto_repeat/test_auto_repeat.py +++ b/frappe/automation/doctype/auto_repeat/test_auto_repeat.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest import frappe diff --git a/frappe/automation/doctype/auto_repeat_day/auto_repeat_day.py b/frappe/automation/doctype/auto_repeat_day/auto_repeat_day.py index 8af3284cde..54fc0d14e9 100644 --- a/frappe/automation/doctype/auto_repeat_day/auto_repeat_day.py +++ b/frappe/automation/doctype/auto_repeat_day/auto_repeat_day.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/automation/doctype/milestone/milestone.py b/frappe/automation/doctype/milestone/milestone.py index 6ea6d7544a..eff65571fd 100644 --- a/frappe/automation/doctype/milestone/milestone.py +++ b/frappe/automation/doctype/milestone/milestone.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/automation/doctype/milestone/test_milestone.py b/frappe/automation/doctype/milestone/test_milestone.py index 175c56e552..f8fb910072 100644 --- a/frappe/automation/doctype/milestone/test_milestone.py +++ b/frappe/automation/doctype/milestone/test_milestone.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE #import frappe import unittest diff --git a/frappe/automation/doctype/milestone_tracker/milestone_tracker.py b/frappe/automation/doctype/milestone_tracker/milestone_tracker.py index 125cad7fa8..042e7b0391 100644 --- a/frappe/automation/doctype/milestone_tracker/milestone_tracker.py +++ b/frappe/automation/doctype/milestone_tracker/milestone_tracker.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/automation/doctype/milestone_tracker/test_milestone_tracker.py b/frappe/automation/doctype/milestone_tracker/test_milestone_tracker.py index 1683e94827..f4d5f00d83 100644 --- a/frappe/automation/doctype/milestone_tracker/test_milestone_tracker.py +++ b/frappe/automation/doctype/milestone_tracker/test_milestone_tracker.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import frappe.cache_manager import unittest diff --git a/frappe/boot.py b/frappe/boot.py index c46709d3d7..cf2b914436 100644 --- a/frappe/boot.py +++ b/frappe/boot.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """ bootstrap client session """ diff --git a/frappe/build.py b/frappe/build.py index ed19574cfd..dfbe20f31e 100644 --- a/frappe/build.py +++ b/frappe/build.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import os import re import json diff --git a/frappe/cache_manager.py b/frappe/cache_manager.py index 2ee3b46b7c..0df8878da4 100644 --- a/frappe/cache_manager.py +++ b/frappe/cache_manager.py @@ -1,5 +1,5 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, json from frappe.model.document import Document diff --git a/frappe/chat/doctype/chat_token/chat_token.py b/frappe/chat/doctype/chat_token/chat_token.py index 63d69a58be..0be51b6081 100644 --- a/frappe/chat/doctype/chat_token/chat_token.py +++ b/frappe/chat/doctype/chat_token/chat_token.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/client.py b/frappe/client.py index 66c457e893..21d10e8271 100644 --- a/frappe/client.py +++ b/frappe/client.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ import frappe.model diff --git a/frappe/commands/__init__.py b/frappe/commands/__init__.py index 9ed333d034..6eccdac4fb 100644 --- a/frappe/commands/__init__.py +++ b/frappe/commands/__init__.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Web Notes Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import sys import click diff --git a/frappe/contacts/doctype/address/address.py b/frappe/contacts/doctype/address/address.py index 755bc63064..5f0619d170 100644 --- a/frappe/contacts/doctype/address/address.py +++ b/frappe/contacts/doctype/address/address.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/contacts/doctype/address/test_address.py b/frappe/contacts/doctype/address/test_address.py index ed61b6f0ee..dd6cd1ca83 100644 --- a/frappe/contacts/doctype/address/test_address.py +++ b/frappe/contacts/doctype/address/test_address.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe, unittest from frappe.contacts.doctype.address.address import get_address_display diff --git a/frappe/contacts/doctype/address_template/address_template.py b/frappe/contacts/doctype/address_template/address_template.py index 2d69a792ab..005f414303 100644 --- a/frappe/contacts/doctype/address_template/address_template.py +++ b/frappe/contacts/doctype/address_template/address_template.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/contacts/doctype/address_template/test_address_template.py b/frappe/contacts/doctype/address_template/test_address_template.py index 6b519a3bb7..b86623b548 100644 --- a/frappe/contacts/doctype/address_template/test_address_template.py +++ b/frappe/contacts/doctype/address_template/test_address_template.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe, unittest class TestAddressTemplate(unittest.TestCase): diff --git a/frappe/contacts/doctype/contact/test_contact.py b/frappe/contacts/doctype/contact/test_contact.py index 6c6089edeb..1170ba843a 100644 --- a/frappe/contacts/doctype/contact/test_contact.py +++ b/frappe/contacts/doctype/contact/test_contact.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/contacts/doctype/contact_email/contact_email.py b/frappe/contacts/doctype/contact_email/contact_email.py index 5fc2fef316..58d37376b8 100644 --- a/frappe/contacts/doctype/contact_email/contact_email.py +++ b/frappe/contacts/doctype/contact_email/contact_email.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/contacts/doctype/contact_phone/contact_phone.py b/frappe/contacts/doctype/contact_phone/contact_phone.py index 63f5f73cf1..ed7d3b9911 100644 --- a/frappe/contacts/doctype/contact_phone/contact_phone.py +++ b/frappe/contacts/doctype/contact_phone/contact_phone.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/contacts/doctype/gender/gender.py b/frappe/contacts/doctype/gender/gender.py index 319800de7e..b4efcb64b9 100644 --- a/frappe/contacts/doctype/gender/gender.py +++ b/frappe/contacts/doctype/gender/gender.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/contacts/doctype/gender/test_gender.py b/frappe/contacts/doctype/gender/test_gender.py index 071ed47df0..8549cc2130 100644 --- a/frappe/contacts/doctype/gender/test_gender.py +++ b/frappe/contacts/doctype/gender/test_gender.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestGender(unittest.TestCase): diff --git a/frappe/contacts/doctype/salutation/salutation.py b/frappe/contacts/doctype/salutation/salutation.py index d79ad66845..380af6de28 100644 --- a/frappe/contacts/doctype/salutation/salutation.py +++ b/frappe/contacts/doctype/salutation/salutation.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/contacts/doctype/salutation/test_salutation.py b/frappe/contacts/doctype/salutation/test_salutation.py index e2e9075855..59333fb61e 100644 --- a/frappe/contacts/doctype/salutation/test_salutation.py +++ b/frappe/contacts/doctype/salutation/test_salutation.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestSalutation(unittest.TestCase): diff --git a/frappe/contacts/report/addresses_and_contacts/addresses_and_contacts.py b/frappe/contacts/report/addresses_and_contacts/addresses_and_contacts.py index bf48b6b185..671e1c6bc8 100644 --- a/frappe/contacts/report/addresses_and_contacts/addresses_and_contacts.py +++ b/frappe/contacts/report/addresses_and_contacts/addresses_and_contacts.py @@ -1,5 +1,5 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/core/__init__.py b/frappe/core/__init__.py index f064a66c17..98029dd956 100644 --- a/frappe/core/__init__.py +++ b/frappe/core/__init__.py @@ -1,2 +1,2 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/__init__.py b/frappe/core/doctype/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/doctype/__init__.py +++ b/frappe/core/doctype/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/access_log/access_log.py b/frappe/core/doctype/access_log/access_log.py index 82db450b4a..0f5776ce2f 100644 --- a/frappe/core/doctype/access_log/access_log.py +++ b/frappe/core/doctype/access_log/access_log.py @@ -1,5 +1,5 @@ # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/access_log/test_access_log.py b/frappe/core/doctype/access_log/test_access_log.py index 9830507423..42878d0eb4 100644 --- a/frappe/core/doctype/access_log/test_access_log.py +++ b/frappe/core/doctype/access_log/test_access_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # imports - standard imports import unittest diff --git a/frappe/core/doctype/activity_log/activity_log.py b/frappe/core/doctype/activity_log/activity_log.py index efec0dc217..183a1c264c 100644 --- a/frappe/core/doctype/activity_log/activity_log.py +++ b/frappe/core/doctype/activity_log/activity_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe import _ from frappe.utils import get_fullname, now diff --git a/frappe/core/doctype/activity_log/feed.py b/frappe/core/doctype/activity_log/feed.py index 19d7b77184..358272ac63 100644 --- a/frappe/core/doctype/activity_log/feed.py +++ b/frappe/core/doctype/activity_log/feed.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: See license.txt +# License: MIT. See LICENSE import frappe import frappe.permissions diff --git a/frappe/core/doctype/activity_log/test_activity_log.py b/frappe/core/doctype/activity_log/test_activity_log.py index ed7b70cca1..87d3538cc7 100644 --- a/frappe/core/doctype/activity_log/test_activity_log.py +++ b/frappe/core/doctype/activity_log/test_activity_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest import time diff --git a/frappe/core/doctype/block_module/block_module.py b/frappe/core/doctype/block_module/block_module.py index d9723f9170..cc6c222a04 100644 --- a/frappe/core/doctype/block_module/block_module.py +++ b/frappe/core/doctype/block_module/block_module.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/comment/comment.py b/frappe/core/doctype/comment/comment.py index 2706ab1c30..e28d350d04 100644 --- a/frappe/core/doctype/comment/comment.py +++ b/frappe/core/doctype/comment/comment.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ import json diff --git a/frappe/core/doctype/comment/test_comment.py b/frappe/core/doctype/comment/test_comment.py index 12fe027fba..99bd19c106 100644 --- a/frappe/core/doctype/comment/test_comment.py +++ b/frappe/core/doctype/comment/test_comment.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe, json import unittest diff --git a/frappe/core/doctype/communication/__init__.py b/frappe/core/doctype/communication/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/doctype/communication/__init__.py +++ b/frappe/core/doctype/communication/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/communication/communication.py b/frappe/core/doctype/communication/communication.py index 17b1290776..66bb3909da 100644 --- a/frappe/core/doctype/communication/communication.py +++ b/frappe/core/doctype/communication/communication.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from collections import Counter import frappe diff --git a/frappe/core/doctype/communication/email.py b/frappe/core/doctype/communication/email.py index 7ffbe6781d..4d22075b78 100755 --- a/frappe/core/doctype/communication/email.py +++ b/frappe/core/doctype/communication/email.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import json diff --git a/frappe/core/doctype/communication/test_communication.py b/frappe/core/doctype/communication/test_communication.py index d50a4db88a..b0c8e1fcee 100644 --- a/frappe/core/doctype/communication/test_communication.py +++ b/frappe/core/doctype/communication/test_communication.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest from urllib.parse import quote diff --git a/frappe/core/doctype/communication_link/communication_link.py b/frappe/core/doctype/communication_link/communication_link.py index d3307d1d32..a895ad3df5 100644 --- a/frappe/core/doctype/communication_link/communication_link.py +++ b/frappe/core/doctype/communication_link/communication_link.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/custom_docperm/custom_docperm.py b/frappe/core/doctype/custom_docperm/custom_docperm.py index 225f5db79b..1790344776 100644 --- a/frappe/core/doctype/custom_docperm/custom_docperm.py +++ b/frappe/core/doctype/custom_docperm/custom_docperm.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/custom_docperm/test_custom_docperm.py b/frappe/core/doctype/custom_docperm/test_custom_docperm.py index 6e0c82d1db..422b711e5b 100644 --- a/frappe/core/doctype/custom_docperm/test_custom_docperm.py +++ b/frappe/core/doctype/custom_docperm/test_custom_docperm.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/custom_role/custom_role.py b/frappe/core/doctype/custom_role/custom_role.py index 89e478dd38..c6630baf6d 100644 --- a/frappe/core/doctype/custom_role/custom_role.py +++ b/frappe/core/doctype/custom_role/custom_role.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/custom_role/test_custom_role.py b/frappe/core/doctype/custom_role/test_custom_role.py index 0ad77524fa..21511a7408 100644 --- a/frappe/core/doctype/custom_role/test_custom_role.py +++ b/frappe/core/doctype/custom_role/test_custom_role.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/data_export/data_export.py b/frappe/core/doctype/data_export/data_export.py index c376b25230..46fe3570a1 100644 --- a/frappe/core/doctype/data_export/data_export.py +++ b/frappe/core/doctype/data_export/data_export.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/core/doctype/data_export/exporter.py b/frappe/core/doctype/data_export/exporter.py index ffd828bfdb..7c660c7180 100644 --- a/frappe/core/doctype/data_export/exporter.py +++ b/frappe/core/doctype/data_export/exporter.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/core/doctype/data_import/data_import.py b/frappe/core/doctype/data_import/data_import.py index 50469eeb4d..5935ddc4ba 100644 --- a/frappe/core/doctype/data_import/data_import.py +++ b/frappe/core/doctype/data_import/data_import.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import os diff --git a/frappe/core/doctype/data_import/exporter.py b/frappe/core/doctype/data_import/exporter.py index acaa294a6f..684328a4c7 100644 --- a/frappe/core/doctype/data_import/exporter.py +++ b/frappe/core/doctype/data_import/exporter.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import typing diff --git a/frappe/core/doctype/data_import/importer.py b/frappe/core/doctype/data_import/importer.py index bb922f1f5d..ef2bb02398 100644 --- a/frappe/core/doctype/data_import/importer.py +++ b/frappe/core/doctype/data_import/importer.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import os import io diff --git a/frappe/core/doctype/data_import/test_data_import.py b/frappe/core/doctype/data_import/test_data_import.py index c9366a97ba..c0e4f50d6d 100644 --- a/frappe/core/doctype/data_import/test_data_import.py +++ b/frappe/core/doctype/data_import/test_data_import.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/data_import/test_exporter.py b/frappe/core/doctype/data_import/test_exporter.py index dfe9926906..cb9461451f 100644 --- a/frappe/core/doctype/data_import/test_exporter.py +++ b/frappe/core/doctype/data_import/test_exporter.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest import frappe from frappe.core.doctype.data_import.exporter import Exporter diff --git a/frappe/core/doctype/data_import/test_importer.py b/frappe/core/doctype/data_import/test_importer.py index 7a4d185d8f..e1bc0e7ca5 100644 --- a/frappe/core/doctype/data_import/test_importer.py +++ b/frappe/core/doctype/data_import/test_importer.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest import frappe from frappe.core.doctype.data_import.importer import Importer diff --git a/frappe/core/doctype/defaultvalue/__init__.py b/frappe/core/doctype/defaultvalue/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/doctype/defaultvalue/__init__.py +++ b/frappe/core/doctype/defaultvalue/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/defaultvalue/defaultvalue.py b/frappe/core/doctype/defaultvalue/defaultvalue.py index 0ae088ee96..1d597c7fc4 100644 --- a/frappe/core/doctype/defaultvalue/defaultvalue.py +++ b/frappe/core/doctype/defaultvalue/defaultvalue.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/core/doctype/deleted_document/deleted_document.py b/frappe/core/doctype/deleted_document/deleted_document.py index f4109c8197..b398ec5410 100644 --- a/frappe/core/doctype/deleted_document/deleted_document.py +++ b/frappe/core/doctype/deleted_document/deleted_document.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import json diff --git a/frappe/core/doctype/deleted_document/test_deleted_document.py b/frappe/core/doctype/deleted_document/test_deleted_document.py index d9dc2bb2d1..fb2376de90 100644 --- a/frappe/core/doctype/deleted_document/test_deleted_document.py +++ b/frappe/core/doctype/deleted_document/test_deleted_document.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/docfield/__init__.py b/frappe/core/doctype/docfield/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/doctype/docfield/__init__.py +++ b/frappe/core/doctype/docfield/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/docfield/docfield.py b/frappe/core/doctype/docfield/docfield.py index 175cba3c7c..4dd49631ae 100644 --- a/frappe/core/doctype/docfield/docfield.py +++ b/frappe/core/doctype/docfield/docfield.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/docperm/__init__.py b/frappe/core/doctype/docperm/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/doctype/docperm/__init__.py +++ b/frappe/core/doctype/docperm/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/docperm/docperm.py b/frappe/core/doctype/docperm/docperm.py index 9732cde920..4751816dc5 100644 --- a/frappe/core/doctype/docperm/docperm.py +++ b/frappe/core/doctype/docperm/docperm.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/core/doctype/docshare/docshare.py b/frappe/core/doctype/docshare/docshare.py index 2d7b6b9e48..6320fba60b 100644 --- a/frappe/core/doctype/docshare/docshare.py +++ b/frappe/core/doctype/docshare/docshare.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/docshare/test_docshare.py b/frappe/core/doctype/docshare/test_docshare.py index 6551dabbea..cbdaa8ebaf 100644 --- a/frappe/core/doctype/docshare/test_docshare.py +++ b/frappe/core/doctype/docshare/test_docshare.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import frappe.share diff --git a/frappe/core/doctype/doctype/__init__.py b/frappe/core/doctype/doctype/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/doctype/doctype/__init__.py +++ b/frappe/core/doctype/doctype/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/doctype/doctype.py b/frappe/core/doctype/doctype/doctype.py index a7f4dd9def..1050ccb460 100644 --- a/frappe/core/doctype/doctype/doctype.py +++ b/frappe/core/doctype/doctype/doctype.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE # imports - standard imports import re, copy, os, shutil diff --git a/frappe/core/doctype/doctype/test_doctype.py b/frappe/core/doctype/doctype/test_doctype.py index 9aaaf5a1ac..4362a52c34 100644 --- a/frappe/core/doctype/doctype/test_doctype.py +++ b/frappe/core/doctype/doctype/test_doctype.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest from frappe.core.doctype.doctype.doctype import (UniqueFieldnameError, diff --git a/frappe/core/doctype/doctype_action/doctype_action.py b/frappe/core/doctype/doctype_action/doctype_action.py index 203b06ec1b..807d1bf0b1 100644 --- a/frappe/core/doctype/doctype_action/doctype_action.py +++ b/frappe/core/doctype/doctype_action/doctype_action.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/doctype_link/doctype_link.py b/frappe/core/doctype/doctype_link/doctype_link.py index 07e0efdace..ca2c4efa16 100644 --- a/frappe/core/doctype/doctype_link/doctype_link.py +++ b/frappe/core/doctype/doctype_link/doctype_link.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/document_naming_rule/document_naming_rule.py b/frappe/core/doctype/document_naming_rule/document_naming_rule.py index 10099bd19a..8013f9df6f 100644 --- a/frappe/core/doctype/document_naming_rule/document_naming_rule.py +++ b/frappe/core/doctype/document_naming_rule/document_naming_rule.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/document_naming_rule/test_document_naming_rule.py b/frappe/core/doctype/document_naming_rule/test_document_naming_rule.py index 2206d173d7..50f1386758 100644 --- a/frappe/core/doctype/document_naming_rule/test_document_naming_rule.py +++ b/frappe/core/doctype/document_naming_rule/test_document_naming_rule.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/document_naming_rule_condition/document_naming_rule_condition.py b/frappe/core/doctype/document_naming_rule_condition/document_naming_rule_condition.py index dfca052d95..4706492cea 100644 --- a/frappe/core/doctype/document_naming_rule_condition/document_naming_rule_condition.py +++ b/frappe/core/doctype/document_naming_rule_condition/document_naming_rule_condition.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/document_naming_rule_condition/test_document_naming_rule_condition.py b/frappe/core/doctype/document_naming_rule_condition/test_document_naming_rule_condition.py index 643e963bd7..3d0565234c 100644 --- a/frappe/core/doctype/document_naming_rule_condition/test_document_naming_rule_condition.py +++ b/frappe/core/doctype/document_naming_rule_condition/test_document_naming_rule_condition.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/domain/domain.py b/frappe/core/doctype/domain/domain.py index bbd20f3b70..ebd6e3ac9e 100644 --- a/frappe/core/doctype/domain/domain.py +++ b/frappe/core/doctype/domain/domain.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/core/doctype/domain/test_domain.py b/frappe/core/doctype/domain/test_domain.py index c2686a7566..d7924ebc90 100644 --- a/frappe/core/doctype/domain/test_domain.py +++ b/frappe/core/doctype/domain/test_domain.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/domain_settings/domain_settings.py b/frappe/core/doctype/domain_settings/domain_settings.py index a8c7c6a747..276411c2ab 100644 --- a/frappe/core/doctype/domain_settings/domain_settings.py +++ b/frappe/core/doctype/domain_settings/domain_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/dynamic_link/dynamic_link.py b/frappe/core/doctype/dynamic_link/dynamic_link.py index a7adb9ae72..c0502824c6 100644 --- a/frappe/core/doctype/dynamic_link/dynamic_link.py +++ b/frappe/core/doctype/dynamic_link/dynamic_link.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/error_log/error_log.py b/frappe/core/doctype/error_log/error_log.py index 3d66253b08..39c307520f 100644 --- a/frappe/core/doctype/error_log/error_log.py +++ b/frappe/core/doctype/error_log/error_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/error_log/test_error_log.py b/frappe/core/doctype/error_log/test_error_log.py index d7444ab2a7..54a41cd4a9 100644 --- a/frappe/core/doctype/error_log/test_error_log.py +++ b/frappe/core/doctype/error_log/test_error_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/error_snapshot/error_snapshot.py b/frappe/core/doctype/error_snapshot/error_snapshot.py index 247a796a6b..85143b5aa6 100644 --- a/frappe/core/doctype/error_snapshot/error_snapshot.py +++ b/frappe/core/doctype/error_snapshot/error_snapshot.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/error_snapshot/test_error_snapshot.py b/frappe/core/doctype/error_snapshot/test_error_snapshot.py index 135136294a..86928db9cc 100644 --- a/frappe/core/doctype/error_snapshot/test_error_snapshot.py +++ b/frappe/core/doctype/error_snapshot/test_error_snapshot.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/feedback/feedback.py b/frappe/core/doctype/feedback/feedback.py index 655bed6eb1..3704ee66e0 100644 --- a/frappe/core/doctype/feedback/feedback.py +++ b/frappe/core/doctype/feedback/feedback.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/feedback/test_feedback.py b/frappe/core/doctype/feedback/test_feedback.py index c7551420c3..7a722ae0d1 100644 --- a/frappe/core/doctype/feedback/test_feedback.py +++ b/frappe/core/doctype/feedback/test_feedback.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/file/file.py b/frappe/core/doctype/file/file.py index 36ff67ce7c..ebbcdcee17 100755 --- a/frappe/core/doctype/file/file.py +++ b/frappe/core/doctype/file/file.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """ record of files diff --git a/frappe/core/doctype/file/test_file.py b/frappe/core/doctype/file/test_file.py index 18ad95eeba..4538ffb6bb 100644 --- a/frappe/core/doctype/file/test_file.py +++ b/frappe/core/doctype/file/test_file.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import base64 import json import frappe diff --git a/frappe/core/doctype/has_domain/has_domain.py b/frappe/core/doctype/has_domain/has_domain.py index 2220656a2e..640cdb3dce 100644 --- a/frappe/core/doctype/has_domain/has_domain.py +++ b/frappe/core/doctype/has_domain/has_domain.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/has_role/has_role.py b/frappe/core/doctype/has_role/has_role.py index 51d86c7b0a..1e6fa7ff60 100644 --- a/frappe/core/doctype/has_role/has_role.py +++ b/frappe/core/doctype/has_role/has_role.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/installed_application/installed_application.py b/frappe/core/doctype/installed_application/installed_application.py index f53a6424eb..81c806642f 100644 --- a/frappe/core/doctype/installed_application/installed_application.py +++ b/frappe/core/doctype/installed_application/installed_application.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/installed_applications/installed_applications.py b/frappe/core/doctype/installed_applications/installed_applications.py index b61555f57e..621e44d856 100644 --- a/frappe/core/doctype/installed_applications/installed_applications.py +++ b/frappe/core/doctype/installed_applications/installed_applications.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/installed_applications/test_installed_applications.py b/frappe/core/doctype/installed_applications/test_installed_applications.py index 1d57fd2cd8..ab2f2566ef 100644 --- a/frappe/core/doctype/installed_applications/test_installed_applications.py +++ b/frappe/core/doctype/installed_applications/test_installed_applications.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/language/language.py b/frappe/core/doctype/language/language.py index 01c8553e10..511c8ddeb6 100644 --- a/frappe/core/doctype/language/language.py +++ b/frappe/core/doctype/language/language.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe, json, re from frappe import _ diff --git a/frappe/core/doctype/language/test_language.py b/frappe/core/doctype/language/test_language.py index 837594247f..d9813afa85 100644 --- a/frappe/core/doctype/language/test_language.py +++ b/frappe/core/doctype/language/test_language.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/log_setting_user/log_setting_user.py b/frappe/core/doctype/log_setting_user/log_setting_user.py index 64728b2c2b..40914cfef8 100644 --- a/frappe/core/doctype/log_setting_user/log_setting_user.py +++ b/frappe/core/doctype/log_setting_user/log_setting_user.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/log_setting_user/test_log_setting_user.py b/frappe/core/doctype/log_setting_user/test_log_setting_user.py index c58b8faa66..45f7b61158 100644 --- a/frappe/core/doctype/log_setting_user/test_log_setting_user.py +++ b/frappe/core/doctype/log_setting_user/test_log_setting_user.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/log_settings/log_settings.py b/frappe/core/doctype/log_settings/log_settings.py index e73aa8dac1..8a471b9173 100644 --- a/frappe/core/doctype/log_settings/log_settings.py +++ b/frappe/core/doctype/log_settings/log_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/core/doctype/log_settings/test_log_settings.py b/frappe/core/doctype/log_settings/test_log_settings.py index 8e0c9c3f23..40287948fd 100644 --- a/frappe/core/doctype/log_settings/test_log_settings.py +++ b/frappe/core/doctype/log_settings/test_log_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/module_def/__init__.py b/frappe/core/doctype/module_def/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/doctype/module_def/__init__.py +++ b/frappe/core/doctype/module_def/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/module_def/module_def.py b/frappe/core/doctype/module_def/module_def.py index 68025c83bb..6b420430b8 100644 --- a/frappe/core/doctype/module_def/module_def.py +++ b/frappe/core/doctype/module_def/module_def.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, os, json diff --git a/frappe/core/doctype/module_def/test_module_def.py b/frappe/core/doctype/module_def/test_module_def.py index 3a3ceb4b57..69a114d765 100644 --- a/frappe/core/doctype/module_def/test_module_def.py +++ b/frappe/core/doctype/module_def/test_module_def.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/module_profile/module_profile.py b/frappe/core/doctype/module_profile/module_profile.py index 373e5078d0..930c3879b6 100644 --- a/frappe/core/doctype/module_profile/module_profile.py +++ b/frappe/core/doctype/module_profile/module_profile.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/core/doctype/module_profile/test_module_profile.py b/frappe/core/doctype/module_profile/test_module_profile.py index e0d9c13371..e676767db6 100644 --- a/frappe/core/doctype/module_profile/test_module_profile.py +++ b/frappe/core/doctype/module_profile/test_module_profile.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/navbar_item/navbar_item.py b/frappe/core/doctype/navbar_item/navbar_item.py index a8fa611374..d4952a75f2 100644 --- a/frappe/core/doctype/navbar_item/navbar_item.py +++ b/frappe/core/doctype/navbar_item/navbar_item.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/navbar_item/test_navbar_item.py b/frappe/core/doctype/navbar_item/test_navbar_item.py index 85852a45e8..bb4b2a837a 100644 --- a/frappe/core/doctype/navbar_item/test_navbar_item.py +++ b/frappe/core/doctype/navbar_item/test_navbar_item.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/navbar_settings/navbar_settings.py b/frappe/core/doctype/navbar_settings/navbar_settings.py index 60aec67a00..fd8db31d10 100644 --- a/frappe/core/doctype/navbar_settings/navbar_settings.py +++ b/frappe/core/doctype/navbar_settings/navbar_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/navbar_settings/test_navbar_settings.py b/frappe/core/doctype/navbar_settings/test_navbar_settings.py index 4d1ee72815..01497d9035 100644 --- a/frappe/core/doctype/navbar_settings/test_navbar_settings.py +++ b/frappe/core/doctype/navbar_settings/test_navbar_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/page/__init__.py b/frappe/core/doctype/page/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/doctype/page/__init__.py +++ b/frappe/core/doctype/page/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/page/page.py b/frappe/core/doctype/page/page.py index 5aa18cd9e3..894e180bb1 100644 --- a/frappe/core/doctype/page/page.py +++ b/frappe/core/doctype/page/page.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import os diff --git a/frappe/core/doctype/page/test_page.py b/frappe/core/doctype/page/test_page.py index 18b4aea2c8..7db32497a8 100644 --- a/frappe/core/doctype/page/test_page.py +++ b/frappe/core/doctype/page/test_page.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/patch_log/__init__.py b/frappe/core/doctype/patch_log/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/doctype/patch_log/__init__.py +++ b/frappe/core/doctype/patch_log/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/patch_log/patch_log.py b/frappe/core/doctype/patch_log/patch_log.py index cc66955eb8..9a5da24e37 100644 --- a/frappe/core/doctype/patch_log/patch_log.py +++ b/frappe/core/doctype/patch_log/patch_log.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/core/doctype/patch_log/test_patch_log.py b/frappe/core/doctype/patch_log/test_patch_log.py index d0690ecee0..df1ca16b22 100644 --- a/frappe/core/doctype/patch_log/test_patch_log.py +++ b/frappe/core/doctype/patch_log/test_patch_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/payment_gateway/payment_gateway.py b/frappe/core/doctype/payment_gateway/payment_gateway.py index 1459635b01..d0fa550ea1 100644 --- a/frappe/core/doctype/payment_gateway/payment_gateway.py +++ b/frappe/core/doctype/payment_gateway/payment_gateway.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/payment_gateway/test_payment_gateway.py b/frappe/core/doctype/payment_gateway/test_payment_gateway.py index 66f899bd27..e2ad081cfa 100644 --- a/frappe/core/doctype/payment_gateway/test_payment_gateway.py +++ b/frappe/core/doctype/payment_gateway/test_payment_gateway.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/prepared_report/prepared_report.py b/frappe/core/doctype/prepared_report/prepared_report.py index c9b5fd9d2e..2d1b026572 100644 --- a/frappe/core/doctype/prepared_report/prepared_report.py +++ b/frappe/core/doctype/prepared_report/prepared_report.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import json diff --git a/frappe/core/doctype/prepared_report/test_prepared_report.py b/frappe/core/doctype/prepared_report/test_prepared_report.py index ef324dd01a..5b12990f64 100644 --- a/frappe/core/doctype/prepared_report/test_prepared_report.py +++ b/frappe/core/doctype/prepared_report/test_prepared_report.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest import json diff --git a/frappe/core/doctype/report/__init__.py b/frappe/core/doctype/report/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/doctype/report/__init__.py +++ b/frappe/core/doctype/report/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/report/boilerplate/controller.py b/frappe/core/doctype/report/boilerplate/controller.py index b8e9cb7467..ccf732a405 100644 --- a/frappe/core/doctype/report/boilerplate/controller.py +++ b/frappe/core/doctype/report/boilerplate/controller.py @@ -1,5 +1,5 @@ # Copyright (c) 2013, {app_publisher} and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe diff --git a/frappe/core/doctype/report/report.py b/frappe/core/doctype/report/report.py index a5c61fa436..6a54314667 100644 --- a/frappe/core/doctype/report/report.py +++ b/frappe/core/doctype/report/report.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import json, datetime from frappe import _, scrub diff --git a/frappe/core/doctype/report/test_report.py b/frappe/core/doctype/report/test_report.py index 9c953db1f0..36e3b09254 100644 --- a/frappe/core/doctype/report/test_report.py +++ b/frappe/core/doctype/report/test_report.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe, json, os import unittest diff --git a/frappe/core/doctype/report_column/report_column.py b/frappe/core/doctype/report_column/report_column.py index f9078d820d..3b2c1e130b 100644 --- a/frappe/core/doctype/report_column/report_column.py +++ b/frappe/core/doctype/report_column/report_column.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/report_filter/report_filter.py b/frappe/core/doctype/report_filter/report_filter.py index ccdcc0eb6f..b325985308 100644 --- a/frappe/core/doctype/report_filter/report_filter.py +++ b/frappe/core/doctype/report_filter/report_filter.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/role/__init__.py b/frappe/core/doctype/role/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/doctype/role/__init__.py +++ b/frappe/core/doctype/role/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/doctype/role/role.py b/frappe/core/doctype/role/role.py index 28b444e1e7..f4fa855ea1 100644 --- a/frappe/core/doctype/role/role.py +++ b/frappe/core/doctype/role/role.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/core/doctype/role/test_role.py b/frappe/core/doctype/role/test_role.py index 471f6cac43..1671f9a9c8 100644 --- a/frappe/core/doctype/role/test_role.py +++ b/frappe/core/doctype/role/test_role.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/role_permission_for_page_and_report/role_permission_for_page_and_report.py b/frappe/core/doctype/role_permission_for_page_and_report/role_permission_for_page_and_report.py index 59f34a1483..cd9a6dc0fa 100644 --- a/frappe/core/doctype/role_permission_for_page_and_report/role_permission_for_page_and_report.py +++ b/frappe/core/doctype/role_permission_for_page_and_report/role_permission_for_page_and_report.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.core.doctype.report.report import is_prepared_report_disabled diff --git a/frappe/core/doctype/role_profile/role_profile.py b/frappe/core/doctype/role_profile/role_profile.py index 986cf834eb..cb0a43d68f 100644 --- a/frappe/core/doctype/role_profile/role_profile.py +++ b/frappe/core/doctype/role_profile/role_profile.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document import frappe diff --git a/frappe/core/doctype/role_profile/test_role_profile.py b/frappe/core/doctype/role_profile/test_role_profile.py index 57b77d868b..b208a186de 100644 --- a/frappe/core/doctype/role_profile/test_role_profile.py +++ b/frappe/core/doctype/role_profile/test_role_profile.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/scheduled_job_log/scheduled_job_log.py b/frappe/core/doctype/scheduled_job_log/scheduled_job_log.py index 7f54a3b6ae..bd5c15bc31 100644 --- a/frappe/core/doctype/scheduled_job_log/scheduled_job_log.py +++ b/frappe/core/doctype/scheduled_job_log/scheduled_job_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/scheduled_job_log/test_scheduled_job_log.py b/frappe/core/doctype/scheduled_job_log/test_scheduled_job_log.py index 85471d0d71..9957f6c34c 100644 --- a/frappe/core/doctype/scheduled_job_log/test_scheduled_job_log.py +++ b/frappe/core/doctype/scheduled_job_log/test_scheduled_job_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py b/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py index b6515b1e79..1a795bab82 100644 --- a/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py +++ b/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import json from datetime import datetime diff --git a/frappe/core/doctype/scheduled_job_type/test_scheduled_job_type.py b/frappe/core/doctype/scheduled_job_type/test_scheduled_job_type.py index a071cfe9a9..dc3353b176 100644 --- a/frappe/core/doctype/scheduled_job_type/test_scheduled_job_type.py +++ b/frappe/core/doctype/scheduled_job_type/test_scheduled_job_type.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest from frappe.utils import get_datetime diff --git a/frappe/core/doctype/server_script/server_script.py b/frappe/core/doctype/server_script/server_script.py index ebd581ce87..036e3638af 100644 --- a/frappe/core/doctype/server_script/server_script.py +++ b/frappe/core/doctype/server_script/server_script.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import ast from types import FunctionType, MethodType, ModuleType diff --git a/frappe/core/doctype/server_script/test_server_script.py b/frappe/core/doctype/server_script/test_server_script.py index ed6b5539c5..6c028ff136 100644 --- a/frappe/core/doctype/server_script/test_server_script.py +++ b/frappe/core/doctype/server_script/test_server_script.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest import requests diff --git a/frappe/core/doctype/session_default/session_default.py b/frappe/core/doctype/session_default/session_default.py index 70ff103111..9470a1bb38 100644 --- a/frappe/core/doctype/session_default/session_default.py +++ b/frappe/core/doctype/session_default/session_default.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/session_default_settings/session_default_settings.py b/frappe/core/doctype/session_default_settings/session_default_settings.py index 25f7522c86..52c917223e 100644 --- a/frappe/core/doctype/session_default_settings/session_default_settings.py +++ b/frappe/core/doctype/session_default_settings/session_default_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/core/doctype/session_default_settings/test_session_default_settings.py b/frappe/core/doctype/session_default_settings/test_session_default_settings.py index 7d20015b66..7a7e971aed 100644 --- a/frappe/core/doctype/session_default_settings/test_session_default_settings.py +++ b/frappe/core/doctype/session_default_settings/test_session_default_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest from frappe.core.doctype.session_default_settings.session_default_settings import set_session_default_values, clear_session_defaults diff --git a/frappe/core/doctype/sms_settings/test_sms_settings.py b/frappe/core/doctype/sms_settings/test_sms_settings.py index 862f5e3965..b3be912f9e 100644 --- a/frappe/core/doctype/sms_settings/test_sms_settings.py +++ b/frappe/core/doctype/sms_settings/test_sms_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/success_action/success_action.py b/frappe/core/doctype/success_action/success_action.py index 4ebd3d250b..afb3a87485 100644 --- a/frappe/core/doctype/success_action/success_action.py +++ b/frappe/core/doctype/success_action/success_action.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/core/doctype/system_settings/system_settings.py b/frappe/core/doctype/system_settings/system_settings.py index 466914569f..1ae8e9e79e 100644 --- a/frappe/core/doctype/system_settings/system_settings.py +++ b/frappe/core/doctype/system_settings/system_settings.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/core/doctype/system_settings/test_system_settings.py b/frappe/core/doctype/system_settings/test_system_settings.py index a65c602abe..f95e26b793 100644 --- a/frappe/core/doctype/system_settings/test_system_settings.py +++ b/frappe/core/doctype/system_settings/test_system_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/test/test.py b/frappe/core/doctype/test/test.py index 98e36e6a30..4cb088c117 100644 --- a/frappe/core/doctype/test/test.py +++ b/frappe/core/doctype/test/test.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/test/test_test.py b/frappe/core/doctype/test/test_test.py index d8ca975d63..d8508b8651 100644 --- a/frappe/core/doctype/test/test_test.py +++ b/frappe/core/doctype/test/test_test.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/transaction_log/test_transaction_log.py b/frappe/core/doctype/transaction_log/test_transaction_log.py index 0d9b9353d0..c332a82f65 100644 --- a/frappe/core/doctype/transaction_log/test_transaction_log.py +++ b/frappe/core/doctype/transaction_log/test_transaction_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest import hashlib diff --git a/frappe/core/doctype/transaction_log/transaction_log.py b/frappe/core/doctype/transaction_log/transaction_log.py index 58d0b3d176..bb94642f48 100644 --- a/frappe/core/doctype/transaction_log/transaction_log.py +++ b/frappe/core/doctype/transaction_log/transaction_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/core/doctype/translation/test_translation.py b/frappe/core/doctype/translation/test_translation.py index e5b5d2d393..982d9bf976 100644 --- a/frappe/core/doctype/translation/test_translation.py +++ b/frappe/core/doctype/translation/test_translation.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/translation/translation.py b/frappe/core/doctype/translation/translation.py index b1f4642791..a01552903c 100644 --- a/frappe/core/doctype/translation/translation.py +++ b/frappe/core/doctype/translation/translation.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/user/test_user.py b/frappe/core/doctype/user/test_user.py index eb8ad9cdbd..e47846958a 100644 --- a/frappe/core/doctype/user/test_user.py +++ b/frappe/core/doctype/user/test_user.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import json import unittest from unittest.mock import patch diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index 1336f6eab7..147f4ddfee 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from bs4 import BeautifulSoup import frappe import frappe.share diff --git a/frappe/core/doctype/user_document_type/user_document_type.py b/frappe/core/doctype/user_document_type/user_document_type.py index 48dbf87b3d..a14d735e6a 100644 --- a/frappe/core/doctype/user_document_type/user_document_type.py +++ b/frappe/core/doctype/user_document_type/user_document_type.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/user_email/user_email.py b/frappe/core/doctype/user_email/user_email.py index 729aa03444..daad083577 100644 --- a/frappe/core/doctype/user_email/user_email.py +++ b/frappe/core/doctype/user_email/user_email.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/user_group/test_user_group.py b/frappe/core/doctype/user_group/test_user_group.py index 2f89d032e1..b5d642ae9c 100644 --- a/frappe/core/doctype/user_group/test_user_group.py +++ b/frappe/core/doctype/user_group/test_user_group.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/user_group/user_group.py b/frappe/core/doctype/user_group/user_group.py index 178775d407..05ff71e353 100644 --- a/frappe/core/doctype/user_group/user_group.py +++ b/frappe/core/doctype/user_group/user_group.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/user_group_member/test_user_group_member.py b/frappe/core/doctype/user_group_member/test_user_group_member.py index 8dbaed9e65..6d4650a3d0 100644 --- a/frappe/core/doctype/user_group_member/test_user_group_member.py +++ b/frappe/core/doctype/user_group_member/test_user_group_member.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/user_group_member/user_group_member.py b/frappe/core/doctype/user_group_member/user_group_member.py index f85ddc3209..69718d8d91 100644 --- a/frappe/core/doctype/user_group_member/user_group_member.py +++ b/frappe/core/doctype/user_group_member/user_group_member.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/user_permission/user_permission.py b/frappe/core/doctype/user_permission/user_permission.py index 5201ffef8d..66ffd48822 100644 --- a/frappe/core/doctype/user_permission/user_permission.py +++ b/frappe/core/doctype/user_permission/user_permission.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe, json from frappe.model.document import Document diff --git a/frappe/core/doctype/user_select_document_type/user_select_document_type.py b/frappe/core/doctype/user_select_document_type/user_select_document_type.py index 13e3f0d351..18a21931e5 100644 --- a/frappe/core/doctype/user_select_document_type/user_select_document_type.py +++ b/frappe/core/doctype/user_select_document_type/user_select_document_type.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/user_social_login/user_social_login.py b/frappe/core/doctype/user_social_login/user_social_login.py index 4a34006d2b..80c0c89383 100644 --- a/frappe/core/doctype/user_social_login/user_social_login.py +++ b/frappe/core/doctype/user_social_login/user_social_login.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/core/doctype/user_type/test_user_type.py b/frappe/core/doctype/user_type/test_user_type.py index 1c47f02bbb..7080e1830b 100644 --- a/frappe/core/doctype/user_type/test_user_type.py +++ b/frappe/core/doctype/user_type/test_user_type.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/core/doctype/user_type/user_type.py b/frappe/core/doctype/user_type/user_type.py index 82ffb090f1..2e5254b622 100644 --- a/frappe/core/doctype/user_type/user_type.py +++ b/frappe/core/doctype/user_type/user_type.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/core/doctype/user_type_module/user_type_module.py b/frappe/core/doctype/user_type_module/user_type_module.py index 9afbcd294d..d25479f869 100644 --- a/frappe/core/doctype/user_type_module/user_type_module.py +++ b/frappe/core/doctype/user_type_module/user_type_module.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/core/doctype/version/test_version.py b/frappe/core/doctype/version/test_version.py index f6c099c4ea..608dc9f0ab 100644 --- a/frappe/core/doctype/version/test_version.py +++ b/frappe/core/doctype/version/test_version.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest, copy from frappe.test_runner import make_test_objects diff --git a/frappe/core/doctype/version/version.py b/frappe/core/doctype/version/version.py index a1bd851346..08d0456dff 100644 --- a/frappe/core/doctype/version/version.py +++ b/frappe/core/doctype/version/version.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe, json diff --git a/frappe/core/doctype/view_log/test_view_log.py b/frappe/core/doctype/view_log/test_view_log.py index 025f3d8ad9..efa9538fbf 100644 --- a/frappe/core/doctype/view_log/test_view_log.py +++ b/frappe/core/doctype/view_log/test_view_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/core/doctype/view_log/view_log.py b/frappe/core/doctype/view_log/view_log.py index 242250be8b..fbbd6e1154 100644 --- a/frappe/core/doctype/view_log/view_log.py +++ b/frappe/core/doctype/view_log/view_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/core/notifications.py b/frappe/core/notifications.py index 707de43f28..b43d424df5 100644 --- a/frappe/core/notifications.py +++ b/frappe/core/notifications.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/core/page/__init__.py b/frappe/core/page/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/page/__init__.py +++ b/frappe/core/page/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/page/background_jobs/background_jobs.py b/frappe/core/page/background_jobs/background_jobs.py index 1f3555e351..5d9bb815da 100644 --- a/frappe/core/page/background_jobs/background_jobs.py +++ b/frappe/core/page/background_jobs/background_jobs.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import json from typing import TYPE_CHECKING, Dict, List diff --git a/frappe/core/page/permission_manager/__init__.py b/frappe/core/page/permission_manager/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/page/permission_manager/__init__.py +++ b/frappe/core/page/permission_manager/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/page/permission_manager/permission_manager.py b/frappe/core/page/permission_manager/permission_manager.py index 2a99283dda..08642c599e 100644 --- a/frappe/core/page/permission_manager/permission_manager.py +++ b/frappe/core/page/permission_manager/permission_manager.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/core/report/__init__.py b/frappe/core/report/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/core/report/__init__.py +++ b/frappe/core/report/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/core/report/permitted_documents_for_user/permitted_documents_for_user.py b/frappe/core/report/permitted_documents_for_user/permitted_documents_for_user.py index 13602ca777..535d354250 100644 --- a/frappe/core/report/permitted_documents_for_user/permitted_documents_for_user.py +++ b/frappe/core/report/permitted_documents_for_user/permitted_documents_for_user.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _, throw diff --git a/frappe/core/report/transaction_log_report/transaction_log_report.py b/frappe/core/report/transaction_log_report/transaction_log_report.py index ff8d8345d6..0a74ece322 100644 --- a/frappe/core/report/transaction_log_report/transaction_log_report.py +++ b/frappe/core/report/transaction_log_report/transaction_log_report.py @@ -1,5 +1,5 @@ # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import hashlib diff --git a/frappe/core/utils.py b/frappe/core/utils.py index 9b8ee3a326..d4690cae89 100644 --- a/frappe/core/utils.py +++ b/frappe/core/utils.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/custom/doctype/client_script/__init__.py b/frappe/custom/doctype/client_script/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/custom/doctype/client_script/__init__.py +++ b/frappe/custom/doctype/client_script/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/custom/doctype/client_script/client_script.py b/frappe/custom/doctype/client_script/client_script.py index 9c098fe8c9..fd6bc9accd 100644 --- a/frappe/custom/doctype/client_script/client_script.py +++ b/frappe/custom/doctype/client_script/client_script.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/custom/doctype/client_script/test_client_script.py b/frappe/custom/doctype/client_script/test_client_script.py index b8358468b9..4887956001 100644 --- a/frappe/custom/doctype/client_script/test_client_script.py +++ b/frappe/custom/doctype/client_script/test_client_script.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/custom/doctype/custom_field/__init__.py b/frappe/custom/doctype/custom_field/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/custom/doctype/custom_field/__init__.py +++ b/frappe/custom/doctype/custom_field/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/custom/doctype/custom_field/custom_field.py b/frappe/custom/doctype/custom_field/custom_field.py index e266455f7a..61fc4486bd 100644 --- a/frappe/custom/doctype/custom_field/custom_field.py +++ b/frappe/custom/doctype/custom_field/custom_field.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import json diff --git a/frappe/custom/doctype/custom_field/test_custom_field.py b/frappe/custom/doctype/custom_field/test_custom_field.py index 3196b66ee8..9633f0eb8a 100644 --- a/frappe/custom/doctype/custom_field/test_custom_field.py +++ b/frappe/custom/doctype/custom_field/test_custom_field.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/custom/doctype/customize_form/__init__.py b/frappe/custom/doctype/customize_form/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/custom/doctype/customize_form/__init__.py +++ b/frappe/custom/doctype/customize_form/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/custom/doctype/customize_form/test_customize_form.py b/frappe/custom/doctype/customize_form/test_customize_form.py index 266ece8a1e..8a287b17e8 100644 --- a/frappe/custom/doctype/customize_form/test_customize_form.py +++ b/frappe/custom/doctype/customize_form/test_customize_form.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, unittest, json from frappe.test_runner import make_test_records_for_doctype diff --git a/frappe/custom/doctype/customize_form_field/__init__.py b/frappe/custom/doctype/customize_form_field/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/custom/doctype/customize_form_field/__init__.py +++ b/frappe/custom/doctype/customize_form_field/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/custom/doctype/customize_form_field/customize_form_field.py b/frappe/custom/doctype/customize_form_field/customize_form_field.py index f288e70754..67563cf048 100644 --- a/frappe/custom/doctype/customize_form_field/customize_form_field.py +++ b/frappe/custom/doctype/customize_form_field/customize_form_field.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/custom/doctype/doctype_layout/doctype_layout.py b/frappe/custom/doctype/doctype_layout/doctype_layout.py index 0dc320353d..fa285ddb62 100644 --- a/frappe/custom/doctype/doctype_layout/doctype_layout.py +++ b/frappe/custom/doctype/doctype_layout/doctype_layout.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/custom/doctype/doctype_layout/test_doctype_layout.py b/frappe/custom/doctype/doctype_layout/test_doctype_layout.py index dcde3c00a4..a63dd7ee16 100644 --- a/frappe/custom/doctype/doctype_layout/test_doctype_layout.py +++ b/frappe/custom/doctype/doctype_layout/test_doctype_layout.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/custom/doctype/doctype_layout_field/doctype_layout_field.py b/frappe/custom/doctype/doctype_layout_field/doctype_layout_field.py index c1e963602f..3f8487b659 100644 --- a/frappe/custom/doctype/doctype_layout_field/doctype_layout_field.py +++ b/frappe/custom/doctype/doctype_layout_field/doctype_layout_field.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/custom/doctype/property_setter/__init__.py b/frappe/custom/doctype/property_setter/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/custom/doctype/property_setter/__init__.py +++ b/frappe/custom/doctype/property_setter/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/custom/doctype/property_setter/property_setter.py b/frappe/custom/doctype/property_setter/property_setter.py index 2a6c06b70a..7b95408060 100644 --- a/frappe/custom/doctype/property_setter/property_setter.py +++ b/frappe/custom/doctype/property_setter/property_setter.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/custom/doctype/property_setter/test_property_setter.py b/frappe/custom/doctype/property_setter/test_property_setter.py index 4d4de66d51..1bbbe59a0f 100644 --- a/frappe/custom/doctype/property_setter/test_property_setter.py +++ b/frappe/custom/doctype/property_setter/test_property_setter.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/custom/doctype/test_rename_new/test_rename_new.py b/frappe/custom/doctype/test_rename_new/test_rename_new.py index 32d2396b2b..fc4ab97cfe 100644 --- a/frappe/custom/doctype/test_rename_new/test_rename_new.py +++ b/frappe/custom/doctype/test_rename_new/test_rename_new.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/custom/doctype/test_rename_new/test_test_rename_new.py b/frappe/custom/doctype/test_rename_new/test_test_rename_new.py index b3ea4818de..03202669ed 100644 --- a/frappe/custom/doctype/test_rename_new/test_test_rename_new.py +++ b/frappe/custom/doctype/test_rename_new/test_test_rename_new.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/data_migration/doctype/data_migration_connector/data_migration_connector.py b/frappe/data_migration/doctype/data_migration_connector/data_migration_connector.py index d1137f2e67..2e4e4d45b3 100644 --- a/frappe/data_migration/doctype/data_migration_connector/data_migration_connector.py +++ b/frappe/data_migration/doctype/data_migration_connector/data_migration_connector.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe, os from frappe.model.document import Document diff --git a/frappe/data_migration/doctype/data_migration_connector/test_data_migration_connector.py b/frappe/data_migration/doctype/data_migration_connector/test_data_migration_connector.py index fd45f86ec1..ffc96c8266 100644 --- a/frappe/data_migration/doctype/data_migration_connector/test_data_migration_connector.py +++ b/frappe/data_migration/doctype/data_migration_connector/test_data_migration_connector.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestDataMigrationConnector(unittest.TestCase): diff --git a/frappe/data_migration/doctype/data_migration_mapping/data_migration_mapping.py b/frappe/data_migration/doctype/data_migration_mapping/data_migration_mapping.py index 5cb20ba56c..46d33eaca9 100644 --- a/frappe/data_migration/doctype/data_migration_mapping/data_migration_mapping.py +++ b/frappe/data_migration/doctype/data_migration_mapping/data_migration_mapping.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/data_migration/doctype/data_migration_mapping/test_data_migration_mapping.py b/frappe/data_migration/doctype/data_migration_mapping/test_data_migration_mapping.py index df11fc0522..b1040aaa58 100644 --- a/frappe/data_migration/doctype/data_migration_mapping/test_data_migration_mapping.py +++ b/frappe/data_migration/doctype/data_migration_mapping/test_data_migration_mapping.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestDataMigrationMapping(unittest.TestCase): diff --git a/frappe/data_migration/doctype/data_migration_mapping_detail/data_migration_mapping_detail.py b/frappe/data_migration/doctype/data_migration_mapping_detail/data_migration_mapping_detail.py index 6d3ef50937..ce46f60f67 100644 --- a/frappe/data_migration/doctype/data_migration_mapping_detail/data_migration_mapping_detail.py +++ b/frappe/data_migration/doctype/data_migration_mapping_detail/data_migration_mapping_detail.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/data_migration/doctype/data_migration_plan/data_migration_plan.py b/frappe/data_migration/doctype/data_migration_plan/data_migration_plan.py index a8d0e40a4c..94ed77e2ec 100644 --- a/frappe/data_migration/doctype/data_migration_plan/data_migration_plan.py +++ b/frappe/data_migration/doctype/data_migration_plan/data_migration_plan.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.modules import get_module_path, scrub_dt_dn diff --git a/frappe/data_migration/doctype/data_migration_plan/test_data_migration_plan.py b/frappe/data_migration/doctype/data_migration_plan/test_data_migration_plan.py index 14c585a82d..649f7db903 100644 --- a/frappe/data_migration/doctype/data_migration_plan/test_data_migration_plan.py +++ b/frappe/data_migration/doctype/data_migration_plan/test_data_migration_plan.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestDataMigrationPlan(unittest.TestCase): diff --git a/frappe/data_migration/doctype/data_migration_plan_mapping/data_migration_plan_mapping.py b/frappe/data_migration/doctype/data_migration_plan_mapping/data_migration_plan_mapping.py index ba4cf28eb8..7939a68d97 100644 --- a/frappe/data_migration/doctype/data_migration_plan_mapping/data_migration_plan_mapping.py +++ b/frappe/data_migration/doctype/data_migration_plan_mapping/data_migration_plan_mapping.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/data_migration/doctype/data_migration_run/data_migration_run.py b/frappe/data_migration/doctype/data_migration_run/data_migration_run.py index c35af5827b..deb14baf27 100644 --- a/frappe/data_migration/doctype/data_migration_run/data_migration_run.py +++ b/frappe/data_migration/doctype/data_migration_run/data_migration_run.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe, json, math from frappe.model.document import Document diff --git a/frappe/data_migration/doctype/data_migration_run/test_data_migration_run.py b/frappe/data_migration/doctype/data_migration_run/test_data_migration_run.py index ef7b70dca2..485f86a7f9 100644 --- a/frappe/data_migration/doctype/data_migration_run/test_data_migration_run.py +++ b/frappe/data_migration/doctype/data_migration_run/test_data_migration_run.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe, unittest class TestDataMigrationRun(unittest.TestCase): diff --git a/frappe/database/__init__.py b/frappe/database/__init__.py index a899bec3d1..b0e3183d4f 100644 --- a/frappe/database/__init__.py +++ b/frappe/database/__init__.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE # Database Module # -------------------- diff --git a/frappe/database/database.py b/frappe/database/database.py index 9fab8e116f..227530e415 100644 --- a/frappe/database/database.py +++ b/frappe/database/database.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE # Database Module # -------------------- diff --git a/frappe/defaults.py b/frappe/defaults.py index d4c338388d..75feabc332 100644 --- a/frappe/defaults.py +++ b/frappe/defaults.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.desk.notifications import clear_notifications diff --git a/frappe/desk/__init__.py b/frappe/desk/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/desk/__init__.py +++ b/frappe/desk/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/desk/calendar.py b/frappe/desk/calendar.py index 273b2654bf..66e6dd8434 100644 --- a/frappe/desk/calendar.py +++ b/frappe/desk/calendar.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/desk/desk_page.py b/frappe/desk/desk_page.py index d373dbda0e..a01008280c 100644 --- a/frappe/desk/desk_page.py +++ b/frappe/desk/desk_page.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.translate import send_translations diff --git a/frappe/desk/desktop.py b/frappe/desk/desktop.py index e9036b98b0..b9b01d0a74 100644 --- a/frappe/desk/desktop.py +++ b/frappe/desk/desktop.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE # Author - Shivam Mishra import frappe @@ -573,7 +573,7 @@ def save_new_widget(doc, page, blocks, new_widgets): doc.build_links_table_from_card(widgets.card) # remove duplicate and unwanted widgets - if widgets: + if widgets: clean_up(doc, blocks) try: @@ -597,7 +597,7 @@ def clean_up(original_page, blocks): page_widgets = {} for wid in ['shortcut', 'card', 'chart']: - # get list of widget's name from blocks + # get list of widget's name from blocks page_widgets[wid] = [x['data'][wid + '_name'] for x in loads(blocks) if x['type'] == wid] # shortcut & chart cleanup diff --git a/frappe/desk/doctype/bulk_update/bulk_update.py b/frappe/desk/doctype/bulk_update/bulk_update.py index 469ee839f1..b512ca175c 100644 --- a/frappe/desk/doctype/bulk_update/bulk_update.py +++ b/frappe/desk/doctype/bulk_update/bulk_update.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/calendar_view/calendar_view.py b/frappe/desk/doctype/calendar_view/calendar_view.py index 3a986f3273..11612f5587 100644 --- a/frappe/desk/doctype/calendar_view/calendar_view.py +++ b/frappe/desk/doctype/calendar_view/calendar_view.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/desk/doctype/console_log/console_log.py b/frappe/desk/doctype/console_log/console_log.py index 5d0f1cfa93..e0b552ebfd 100644 --- a/frappe/desk/doctype/console_log/console_log.py +++ b/frappe/desk/doctype/console_log/console_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/console_log/test_console_log.py b/frappe/desk/doctype/console_log/test_console_log.py index 3bb1605204..c41b9d68c8 100644 --- a/frappe/desk/doctype/console_log/test_console_log.py +++ b/frappe/desk/doctype/console_log/test_console_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/desk/doctype/dashboard/dashboard.py b/frappe/desk/doctype/dashboard/dashboard.py index 1d333609db..0dfd458a37 100644 --- a/frappe/desk/doctype/dashboard/dashboard.py +++ b/frappe/desk/doctype/dashboard/dashboard.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document from frappe.modules.export_file import export_to_files diff --git a/frappe/desk/doctype/dashboard/test_dashboard.py b/frappe/desk/doctype/dashboard/test_dashboard.py index dd1bc31d86..15c132c027 100644 --- a/frappe/desk/doctype/dashboard/test_dashboard.py +++ b/frappe/desk/doctype/dashboard/test_dashboard.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestDashboard(unittest.TestCase): diff --git a/frappe/desk/doctype/dashboard_chart/dashboard_chart.py b/frappe/desk/doctype/dashboard_chart/dashboard_chart.py index db5964e7b2..598b5e0b2b 100644 --- a/frappe/desk/doctype/dashboard_chart/dashboard_chart.py +++ b/frappe/desk/doctype/dashboard_chart/dashboard_chart.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/desk/doctype/dashboard_chart/test_dashboard_chart.py b/frappe/desk/doctype/dashboard_chart/test_dashboard_chart.py index 9f10522b12..5562f2fc92 100644 --- a/frappe/desk/doctype/dashboard_chart/test_dashboard_chart.py +++ b/frappe/desk/doctype/dashboard_chart/test_dashboard_chart.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest, frappe from frappe.utils import getdate, formatdate, get_last_day from frappe.utils.dateutils import get_period_ending, get_period diff --git a/frappe/desk/doctype/dashboard_chart_field/dashboard_chart_field.py b/frappe/desk/doctype/dashboard_chart_field/dashboard_chart_field.py index 7d6f66daa2..8b2fba2e58 100644 --- a/frappe/desk/doctype/dashboard_chart_field/dashboard_chart_field.py +++ b/frappe/desk/doctype/dashboard_chart_field/dashboard_chart_field.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/dashboard_chart_link/dashboard_chart_link.py b/frappe/desk/doctype/dashboard_chart_link/dashboard_chart_link.py index 359801a303..87d095d5d1 100644 --- a/frappe/desk/doctype/dashboard_chart_link/dashboard_chart_link.py +++ b/frappe/desk/doctype/dashboard_chart_link/dashboard_chart_link.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/dashboard_chart_source/dashboard_chart_source.py b/frappe/desk/doctype/dashboard_chart_source/dashboard_chart_source.py index 791dbc563b..71ded32837 100644 --- a/frappe/desk/doctype/dashboard_chart_source/dashboard_chart_source.py +++ b/frappe/desk/doctype/dashboard_chart_source/dashboard_chart_source.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe, os from frappe import _ diff --git a/frappe/desk/doctype/dashboard_chart_source/test_dashboard_chart_source.py b/frappe/desk/doctype/dashboard_chart_source/test_dashboard_chart_source.py index 53fe127dfb..6d6773d52e 100644 --- a/frappe/desk/doctype/dashboard_chart_source/test_dashboard_chart_source.py +++ b/frappe/desk/doctype/dashboard_chart_source/test_dashboard_chart_source.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestDashboardChartSource(unittest.TestCase): diff --git a/frappe/desk/doctype/dashboard_settings/dashboard_settings.py b/frappe/desk/doctype/dashboard_settings/dashboard_settings.py index df61c52114..2f29b3e989 100644 --- a/frappe/desk/doctype/dashboard_settings/dashboard_settings.py +++ b/frappe/desk/doctype/dashboard_settings/dashboard_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/desktop_icon/desktop_icon.py b/frappe/desk/doctype/desktop_icon/desktop_icon.py index 28c5a670cb..194b0d0ca4 100644 --- a/frappe/desk/doctype/desktop_icon/desktop_icon.py +++ b/frappe/desk/doctype/desktop_icon/desktop_icon.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/desk/doctype/event/__init__.py b/frappe/desk/doctype/event/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/desk/doctype/event/__init__.py +++ b/frappe/desk/doctype/event/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/desk/doctype/event/event.py b/frappe/desk/doctype/event/event.py index e7e7be530b..d4c185e56f 100644 --- a/frappe/desk/doctype/event/event.py +++ b/frappe/desk/doctype/event/event.py @@ -1,5 +1,5 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/desk/doctype/event/test_event.py b/frappe/desk/doctype/event/test_event.py index 8f56d11da3..6b7f6ee471 100644 --- a/frappe/desk/doctype/event/test_event.py +++ b/frappe/desk/doctype/event/test_event.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """Use blog post test to test user permissions logic""" import frappe diff --git a/frappe/desk/doctype/event_participants/event_participants.py b/frappe/desk/doctype/event_participants/event_participants.py index ca4fae9930..b834ba3a82 100644 --- a/frappe/desk/doctype/event_participants/event_participants.py +++ b/frappe/desk/doctype/event_participants/event_participants.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document class EventParticipants(Document): diff --git a/frappe/desk/doctype/form_tour/form_tour.py b/frappe/desk/doctype/form_tour/form_tour.py index dbc667ce28..82d47224dd 100644 --- a/frappe/desk/doctype/form_tour/form_tour.py +++ b/frappe/desk/doctype/form_tour/form_tour.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document @@ -25,7 +25,7 @@ class FormTour(Document): def on_update(self): if frappe.conf.developer_mode and self.is_standard: export_to_files([['Form Tour', self.name]], self.module) - + def before_export(self, doc): for d in doc.steps: d.field = "" diff --git a/frappe/desk/doctype/form_tour/test_form_tour.py b/frappe/desk/doctype/form_tour/test_form_tour.py index a4a796ce41..3670cbc218 100644 --- a/frappe/desk/doctype/form_tour/test_form_tour.py +++ b/frappe/desk/doctype/form_tour/test_form_tour.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/desk/doctype/form_tour_step/form_tour_step.py b/frappe/desk/doctype/form_tour_step/form_tour_step.py index 0df5665c63..bbc8edea08 100644 --- a/frappe/desk/doctype/form_tour_step/form_tour_step.py +++ b/frappe/desk/doctype/form_tour_step/form_tour_step.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/global_search_doctype/global_search_doctype.py b/frappe/desk/doctype/global_search_doctype/global_search_doctype.py index de8a48af01..30a31f959f 100644 --- a/frappe/desk/doctype/global_search_doctype/global_search_doctype.py +++ b/frappe/desk/doctype/global_search_doctype/global_search_doctype.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/global_search_settings/global_search_settings.py b/frappe/desk/doctype/global_search_settings/global_search_settings.py index 9112349c1b..9ffe9aaf06 100644 --- a/frappe/desk/doctype/global_search_settings/global_search_settings.py +++ b/frappe/desk/doctype/global_search_settings/global_search_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/kanban_board/kanban_board.py b/frappe/desk/doctype/kanban_board/kanban_board.py index 5100727f43..155a925fcf 100644 --- a/frappe/desk/doctype/kanban_board/kanban_board.py +++ b/frappe/desk/doctype/kanban_board/kanban_board.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import json diff --git a/frappe/desk/doctype/kanban_board/test_kanban_board.py b/frappe/desk/doctype/kanban_board/test_kanban_board.py index f9503d736a..f00446141a 100644 --- a/frappe/desk/doctype/kanban_board/test_kanban_board.py +++ b/frappe/desk/doctype/kanban_board/test_kanban_board.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/desk/doctype/kanban_board_column/kanban_board_column.py b/frappe/desk/doctype/kanban_board_column/kanban_board_column.py index aebba3351c..d919fd6aed 100644 --- a/frappe/desk/doctype/kanban_board_column/kanban_board_column.py +++ b/frappe/desk/doctype/kanban_board_column/kanban_board_column.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/list_filter/list_filter.py b/frappe/desk/doctype/list_filter/list_filter.py index 2467ae40a4..d2b01d301e 100644 --- a/frappe/desk/doctype/list_filter/list_filter.py +++ b/frappe/desk/doctype/list_filter/list_filter.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe, json from frappe.model.document import Document diff --git a/frappe/desk/doctype/list_view_settings/list_view_settings.py b/frappe/desk/doctype/list_view_settings/list_view_settings.py index f4a288b7ba..78b56fe7d5 100644 --- a/frappe/desk/doctype/list_view_settings/list_view_settings.py +++ b/frappe/desk/doctype/list_view_settings/list_view_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/list_view_settings/test_list_view_settings.py b/frappe/desk/doctype/list_view_settings/test_list_view_settings.py index 00010d7604..85872dd36e 100644 --- a/frappe/desk/doctype/list_view_settings/test_list_view_settings.py +++ b/frappe/desk/doctype/list_view_settings/test_list_view_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/desk/doctype/module_onboarding/module_onboarding.py b/frappe/desk/doctype/module_onboarding/module_onboarding.py index 6f01e0fd8d..aa268c792c 100644 --- a/frappe/desk/doctype/module_onboarding/module_onboarding.py +++ b/frappe/desk/doctype/module_onboarding/module_onboarding.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/module_onboarding/test_module_onboarding.py b/frappe/desk/doctype/module_onboarding/test_module_onboarding.py index 39184401a1..42f472abc1 100644 --- a/frappe/desk/doctype/module_onboarding/test_module_onboarding.py +++ b/frappe/desk/doctype/module_onboarding/test_module_onboarding.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/desk/doctype/note/note.py b/frappe/desk/doctype/note/note.py index 790f9a514c..ae7af07cd9 100644 --- a/frappe/desk/doctype/note/note.py +++ b/frappe/desk/doctype/note/note.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: See license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/note/test_note.py b/frappe/desk/doctype/note/test_note.py index 3207fa9b8d..ac2116c38a 100644 --- a/frappe/desk/doctype/note/test_note.py +++ b/frappe/desk/doctype/note/test_note.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/desk/doctype/note_seen_by/note_seen_by.py b/frappe/desk/doctype/note_seen_by/note_seen_by.py index cec4628b20..01bee05a9f 100644 --- a/frappe/desk/doctype/note_seen_by/note_seen_by.py +++ b/frappe/desk/doctype/note_seen_by/note_seen_by.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/notification_log/notification_log.py b/frappe/desk/doctype/notification_log/notification_log.py index d7d7f68b74..12e628ada2 100644 --- a/frappe/desk/doctype/notification_log/notification_log.py +++ b/frappe/desk/doctype/notification_log/notification_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/desk/doctype/notification_log/test_notification_log.py b/frappe/desk/doctype/notification_log/test_notification_log.py index bedb10b495..4c415a860c 100644 --- a/frappe/desk/doctype/notification_log/test_notification_log.py +++ b/frappe/desk/doctype/notification_log/test_notification_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe from frappe.core.doctype.user.user import get_system_users from frappe.desk.form.assign_to import add as assign_task diff --git a/frappe/desk/doctype/notification_settings/notification_settings.py b/frappe/desk/doctype/notification_settings/notification_settings.py index eb3a16435f..cf6bb2d78d 100644 --- a/frappe/desk/doctype/notification_settings/notification_settings.py +++ b/frappe/desk/doctype/notification_settings/notification_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/notification_subscribed_document/notification_subscribed_document.py b/frappe/desk/doctype/notification_subscribed_document/notification_subscribed_document.py index 6931e77754..1fdba22779 100644 --- a/frappe/desk/doctype/notification_subscribed_document/notification_subscribed_document.py +++ b/frappe/desk/doctype/notification_subscribed_document/notification_subscribed_document.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/number_card/number_card.py b/frappe/desk/doctype/number_card/number_card.py index d8d5fe0953..5662523a9d 100644 --- a/frappe/desk/doctype/number_card/number_card.py +++ b/frappe/desk/doctype/number_card/number_card.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/number_card/test_number_card.py b/frappe/desk/doctype/number_card/test_number_card.py index c395f5f915..cc92e63341 100644 --- a/frappe/desk/doctype/number_card/test_number_card.py +++ b/frappe/desk/doctype/number_card/test_number_card.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/desk/doctype/number_card_link/number_card_link.py b/frappe/desk/doctype/number_card_link/number_card_link.py index 6c16f45f4b..0b55ae6dcd 100644 --- a/frappe/desk/doctype/number_card_link/number_card_link.py +++ b/frappe/desk/doctype/number_card_link/number_card_link.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/onboarding_permission/onboarding_permission.py b/frappe/desk/doctype/onboarding_permission/onboarding_permission.py index 40d3dc33b1..a0e87c3067 100644 --- a/frappe/desk/doctype/onboarding_permission/onboarding_permission.py +++ b/frappe/desk/doctype/onboarding_permission/onboarding_permission.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/onboarding_permission/test_onboarding_permission.py b/frappe/desk/doctype/onboarding_permission/test_onboarding_permission.py index 80b166de0a..c13fb29678 100644 --- a/frappe/desk/doctype/onboarding_permission/test_onboarding_permission.py +++ b/frappe/desk/doctype/onboarding_permission/test_onboarding_permission.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/desk/doctype/onboarding_step/onboarding_step.py b/frappe/desk/doctype/onboarding_step/onboarding_step.py index 2336ff52f8..45e0ca34fd 100644 --- a/frappe/desk/doctype/onboarding_step/onboarding_step.py +++ b/frappe/desk/doctype/onboarding_step/onboarding_step.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/desk/doctype/onboarding_step/test_onboarding_step.py b/frappe/desk/doctype/onboarding_step/test_onboarding_step.py index 2425577478..b0651da4da 100644 --- a/frappe/desk/doctype/onboarding_step/test_onboarding_step.py +++ b/frappe/desk/doctype/onboarding_step/test_onboarding_step.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/desk/doctype/onboarding_step_map/onboarding_step_map.py b/frappe/desk/doctype/onboarding_step_map/onboarding_step_map.py index c79244c4ad..7c20e220db 100644 --- a/frappe/desk/doctype/onboarding_step_map/onboarding_step_map.py +++ b/frappe/desk/doctype/onboarding_step_map/onboarding_step_map.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/route_history/route_history.py b/frappe/desk/doctype/route_history/route_history.py index 95872440c7..01184fcc3a 100644 --- a/frappe/desk/doctype/route_history/route_history.py +++ b/frappe/desk/doctype/route_history/route_history.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/system_console/system_console.py b/frappe/desk/doctype/system_console/system_console.py index e2b5656bc0..f7f31cc3ba 100644 --- a/frappe/desk/doctype/system_console/system_console.py +++ b/frappe/desk/doctype/system_console/system_console.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import json diff --git a/frappe/desk/doctype/system_console/test_system_console.py b/frappe/desk/doctype/system_console/test_system_console.py index 743c2d6dde..fa7c577faa 100644 --- a/frappe/desk/doctype/system_console/test_system_console.py +++ b/frappe/desk/doctype/system_console/test_system_console.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/desk/doctype/tag/tag.py b/frappe/desk/doctype/tag/tag.py index 2341d721e2..44bb780681 100644 --- a/frappe/desk/doctype/tag/tag.py +++ b/frappe/desk/doctype/tag/tag.py @@ -1,5 +1,5 @@ # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/tag_link/tag_link.py b/frappe/desk/doctype/tag_link/tag_link.py index 4c5149f42c..d07894989d 100644 --- a/frappe/desk/doctype/tag_link/tag_link.py +++ b/frappe/desk/doctype/tag_link/tag_link.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/tag_link/test_tag_link.py b/frappe/desk/doctype/tag_link/test_tag_link.py index 297ee3cc96..fa6a22903f 100644 --- a/frappe/desk/doctype/tag_link/test_tag_link.py +++ b/frappe/desk/doctype/tag_link/test_tag_link.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/desk/doctype/todo/__init__.py b/frappe/desk/doctype/todo/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/desk/doctype/todo/__init__.py +++ b/frappe/desk/doctype/todo/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/desk/doctype/todo/test_todo.py b/frappe/desk/doctype/todo/test_todo.py index f6371c5921..34d3cee191 100644 --- a/frappe/desk/doctype/todo/test_todo.py +++ b/frappe/desk/doctype/todo/test_todo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest from frappe.model.db_query import DatabaseQuery diff --git a/frappe/desk/doctype/todo/todo.py b/frappe/desk/doctype/todo/todo.py index 754b94cdcb..6f3f4160e6 100644 --- a/frappe/desk/doctype/todo/todo.py +++ b/frappe/desk/doctype/todo/todo.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import json diff --git a/frappe/desk/doctype/workspace/test_workspace.py b/frappe/desk/doctype/workspace/test_workspace.py index f13a136c20..6c16e69afe 100644 --- a/frappe/desk/doctype/workspace/test_workspace.py +++ b/frappe/desk/doctype/workspace/test_workspace.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest class TestWorkspace(unittest.TestCase): diff --git a/frappe/desk/doctype/workspace/workspace.py b/frappe/desk/doctype/workspace/workspace.py index 33c6adbd2f..25dd9b26d2 100644 --- a/frappe/desk/doctype/workspace/workspace.py +++ b/frappe/desk/doctype/workspace/workspace.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ @@ -62,7 +62,7 @@ class Workspace(Document): for link in self.links: link = link.as_dict() if link.type == "Card Break": - if card_links and (not current_card.get('only_for') or current_card.get('only_for') == frappe.get_system_settings('country')): + if card_links and (not current_card.get('only_for') or current_card.get('only_for') == frappe.get_system_settings('country')): current_card['links'] = card_links cards.append(current_card) @@ -167,7 +167,7 @@ def get_report_type(report): def save_page(title, icon, parent, public, sb_public_items, sb_private_items, deleted_pages, new_widgets, blocks, save): save = frappe.parse_json(save) public = frappe.parse_json(public) - if save: + if save: doc = frappe.new_doc('Workspace') doc.title = title doc.icon = icon diff --git a/frappe/desk/doctype/workspace_chart/workspace_chart.py b/frappe/desk/doctype/workspace_chart/workspace_chart.py index 6ec7abfd3c..a3b66d99ab 100644 --- a/frappe/desk/doctype/workspace_chart/workspace_chart.py +++ b/frappe/desk/doctype/workspace_chart/workspace_chart.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/workspace_link/workspace_link.py b/frappe/desk/doctype/workspace_link/workspace_link.py index d6ccc5306a..72256ba490 100644 --- a/frappe/desk/doctype/workspace_link/workspace_link.py +++ b/frappe/desk/doctype/workspace_link/workspace_link.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/doctype/workspace_shortcut/workspace_shortcut.py b/frappe/desk/doctype/workspace_shortcut/workspace_shortcut.py index 83b446e454..1dad4cca05 100644 --- a/frappe/desk/doctype/workspace_shortcut/workspace_shortcut.py +++ b/frappe/desk/doctype/workspace_shortcut/workspace_shortcut.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/desk/form/__init__.py b/frappe/desk/form/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/desk/form/__init__.py +++ b/frappe/desk/form/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/desk/form/assign_to.py b/frappe/desk/form/assign_to.py index 3eda291d1e..bf77170eeb 100644 --- a/frappe/desk/form/assign_to.py +++ b/frappe/desk/form/assign_to.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """assign/unassign to ToDo""" diff --git a/frappe/desk/form/document_follow.py b/frappe/desk/form/document_follow.py index 7f65f76a58..14970092d0 100644 --- a/frappe/desk/form/document_follow.py +++ b/frappe/desk/form/document_follow.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import frappe.utils diff --git a/frappe/desk/form/linked_with.py b/frappe/desk/form/linked_with.py index ae48b7fc6b..3aff3877d6 100644 --- a/frappe/desk/form/linked_with.py +++ b/frappe/desk/form/linked_with.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import json from collections import defaultdict diff --git a/frappe/desk/form/load.py b/frappe/desk/form/load.py index a62bfd01d0..c86efbcefd 100644 --- a/frappe/desk/form/load.py +++ b/frappe/desk/form/load.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, json import frappe.utils diff --git a/frappe/desk/form/meta.py b/frappe/desk/form/meta.py index cf3606e785..b91dd3d481 100644 --- a/frappe/desk/form/meta.py +++ b/frappe/desk/form/meta.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import io import os diff --git a/frappe/desk/form/save.py b/frappe/desk/form/save.py index a7a4b829d8..b580e2c769 100644 --- a/frappe/desk/form/save.py +++ b/frappe/desk/form/save.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, json from frappe.desk.form.load import run_onload diff --git a/frappe/desk/form/test_form.py b/frappe/desk/form/test_form.py index f3c4132777..86c3aba29a 100644 --- a/frappe/desk/form/test_form.py +++ b/frappe/desk/form/test_form.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, unittest diff --git a/frappe/desk/form/utils.py b/frappe/desk/form/utils.py index d7ac940d21..a4dcee4ab3 100644 --- a/frappe/desk/form/utils.py +++ b/frappe/desk/form/utils.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, json import frappe.desk.form.meta diff --git a/frappe/desk/gantt.py b/frappe/desk/gantt.py index 7f0889c751..58ef3b836e 100644 --- a/frappe/desk/gantt.py +++ b/frappe/desk/gantt.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, json diff --git a/frappe/desk/like.py b/frappe/desk/like.py index d44d58a761..4480ed8a1e 100644 --- a/frappe/desk/like.py +++ b/frappe/desk/like.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """Allow adding of likes to documents""" diff --git a/frappe/desk/listview.py b/frappe/desk/listview.py index d2c84d36bf..f079205cb0 100644 --- a/frappe/desk/listview.py +++ b/frappe/desk/listview.py @@ -1,5 +1,5 @@ # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe @frappe.whitelist(allow_guest=True) diff --git a/frappe/desk/moduleview.py b/frappe/desk/moduleview.py index 021698ac92..e2e2c4c155 100644 --- a/frappe/desk/moduleview.py +++ b/frappe/desk/moduleview.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import json diff --git a/frappe/desk/notifications.py b/frappe/desk/notifications.py index c84027928e..2a4567ab4f 100644 --- a/frappe/desk/notifications.py +++ b/frappe/desk/notifications.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.desk.doctype.notification_settings.notification_settings import get_subscribed_documents diff --git a/frappe/desk/page/activity/activity.py b/frappe/desk/page/activity/activity.py index 3abc8e0ea5..71130f2304 100644 --- a/frappe/desk/page/activity/activity.py +++ b/frappe/desk/page/activity/activity.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: See license.txt +# License: MIT. See LICENSE import frappe from frappe.utils import cint diff --git a/frappe/desk/page/leaderboard/leaderboard.py b/frappe/desk/page/leaderboard/leaderboard.py index 9469096f50..ad22eb9199 100644 --- a/frappe/desk/page/leaderboard/leaderboard.py +++ b/frappe/desk/page/leaderboard/leaderboard.py @@ -1,5 +1,5 @@ # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe @frappe.whitelist() diff --git a/frappe/desk/page/setup_wizard/setup_wizard.py b/frappe/desk/page/setup_wizard/setup_wizard.py index 5edb44e182..c729c1d78b 100755 --- a/frappe/desk/page/setup_wizard/setup_wizard.py +++ b/frappe/desk/page/setup_wizard/setup_wizard.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: See license.txt +# License: MIT. See LICENSE import frappe, json, os from frappe.utils import strip, cint diff --git a/frappe/desk/query_report.py b/frappe/desk/query_report.py index 610eaf466a..9a37d16d0a 100644 --- a/frappe/desk/query_report.py +++ b/frappe/desk/query_report.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import os diff --git a/frappe/desk/report/todo/todo.py b/frappe/desk/report/todo/todo.py index 6bd22b843e..b1e49bc95d 100644 --- a/frappe/desk/report/todo/todo.py +++ b/frappe/desk/report/todo/todo.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/desk/report_dump.py b/frappe/desk/report_dump.py index b2d3ca3443..f57ed97fa5 100644 --- a/frappe/desk/report_dump.py +++ b/frappe/desk/report_dump.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/desk/reportview.py b/frappe/desk/reportview.py index 1dbc52eb5b..d758ebb590 100644 --- a/frappe/desk/reportview.py +++ b/frappe/desk/reportview.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """build query for doclistview and return results""" diff --git a/frappe/desk/search.py b/frappe/desk/search.py index 9a5e7533d1..db88e6ec52 100644 --- a/frappe/desk/search.py +++ b/frappe/desk/search.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE # Search import frappe, json diff --git a/frappe/desk/treeview.py b/frappe/desk/treeview.py index 66acde4cb2..704e5d8ed6 100644 --- a/frappe/desk/treeview.py +++ b/frappe/desk/treeview.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/desk/utils.py b/frappe/desk/utils.py index 01b47ac106..5908277386 100644 --- a/frappe/desk/utils.py +++ b/frappe/desk/utils.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/email/__init__.py b/frappe/email/__init__.py index 3fb539398a..79dec977b7 100644 --- a/frappe/email/__init__.py +++ b/frappe/email/__init__.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.desk.reportview import build_match_conditions diff --git a/frappe/email/doctype/auto_email_report/auto_email_report.py b/frappe/email/doctype/auto_email_report/auto_email_report.py index ccfff594b7..37089d58df 100644 --- a/frappe/email/doctype/auto_email_report/auto_email_report.py +++ b/frappe/email/doctype/auto_email_report/auto_email_report.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import calendar from datetime import timedelta diff --git a/frappe/email/doctype/auto_email_report/test_auto_email_report.py b/frappe/email/doctype/auto_email_report/test_auto_email_report.py index 211a141ec0..559adfbe1a 100644 --- a/frappe/email/doctype/auto_email_report/test_auto_email_report.py +++ b/frappe/email/doctype/auto_email_report/test_auto_email_report.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import json import unittest diff --git a/frappe/email/doctype/document_follow/document_follow.py b/frappe/email/doctype/document_follow/document_follow.py index a04f8ef4c2..97f8237736 100644 --- a/frappe/email/doctype/document_follow/document_follow.py +++ b/frappe/email/doctype/document_follow/document_follow.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/email/doctype/document_follow/test_document_follow.py b/frappe/email/doctype/document_follow/test_document_follow.py index 456c0931f8..050add65e9 100644 --- a/frappe/email/doctype/document_follow/test_document_follow.py +++ b/frappe/email/doctype/document_follow/test_document_follow.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest import frappe.desk.form.document_follow as document_follow diff --git a/frappe/email/doctype/email_account/email_account.py b/frappe/email/doctype/email_account/email_account.py index fb7349adba..d90c56d90d 100755 --- a/frappe/email/doctype/email_account/email_account.py +++ b/frappe/email/doctype/email_account/email_account.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import email.utils import functools import imaplib diff --git a/frappe/email/doctype/email_account/test_email_account.py b/frappe/email/doctype/email_account/test_email_account.py index da03a5959e..21dc4b84c4 100644 --- a/frappe/email/doctype/email_account/test_email_account.py +++ b/frappe/email/doctype/email_account/test_email_account.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import os import email diff --git a/frappe/email/doctype/email_domain/email_domain.py b/frappe/email/doctype/email_domain/email_domain.py index 0856549eb7..1611d32351 100644 --- a/frappe/email/doctype/email_domain/email_domain.py +++ b/frappe/email/doctype/email_domain/email_domain.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/email/doctype/email_domain/test_email_domain.py b/frappe/email/doctype/email_domain/test_email_domain.py index 8607151ca8..1064c7684a 100644 --- a/frappe/email/doctype/email_domain/test_email_domain.py +++ b/frappe/email/doctype/email_domain/test_email_domain.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest from frappe.test_runner import make_test_objects diff --git a/frappe/email/doctype/email_flag_queue/email_flag_queue.py b/frappe/email/doctype/email_flag_queue/email_flag_queue.py index 9bb30f08b2..886cf3c24b 100644 --- a/frappe/email/doctype/email_flag_queue/email_flag_queue.py +++ b/frappe/email/doctype/email_flag_queue/email_flag_queue.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/email/doctype/email_flag_queue/test_email_flag_queue.py b/frappe/email/doctype/email_flag_queue/test_email_flag_queue.py index d09b823ce6..b0e17b3b85 100644 --- a/frappe/email/doctype/email_flag_queue/test_email_flag_queue.py +++ b/frappe/email/doctype/email_flag_queue/test_email_flag_queue.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/email/doctype/email_group/email_group.py b/frappe/email/doctype/email_group/email_group.py index 2679353edf..ad52d9a9ec 100755 --- a/frappe/email/doctype/email_group/email_group.py +++ b/frappe/email/doctype/email_group/email_group.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/email/doctype/email_group/test_email_group.py b/frappe/email/doctype/email_group/test_email_group.py index 3e894118df..06341c128e 100644 --- a/frappe/email/doctype/email_group/test_email_group.py +++ b/frappe/email/doctype/email_group/test_email_group.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/email/doctype/email_group_member/email_group_member.py b/frappe/email/doctype/email_group_member/email_group_member.py index 1f9303b83e..a9fd26f710 100644 --- a/frappe/email/doctype/email_group_member/email_group_member.py +++ b/frappe/email/doctype/email_group_member/email_group_member.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/email/doctype/email_group_member/test_email_group_member.py b/frappe/email/doctype/email_group_member/test_email_group_member.py index 829d686400..de006dccb9 100644 --- a/frappe/email/doctype/email_group_member/test_email_group_member.py +++ b/frappe/email/doctype/email_group_member/test_email_group_member.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/email/doctype/email_queue/email_queue.py b/frappe/email/doctype/email_queue/email_queue.py index e1e332f978..4489a68cac 100644 --- a/frappe/email/doctype/email_queue/email_queue.py +++ b/frappe/email/doctype/email_queue/email_queue.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import traceback import json diff --git a/frappe/email/doctype/email_queue/test_email_queue.py b/frappe/email/doctype/email_queue/test_email_queue.py index b76d6347b9..8ebcb68a38 100644 --- a/frappe/email/doctype/email_queue/test_email_queue.py +++ b/frappe/email/doctype/email_queue/test_email_queue.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/email/doctype/email_queue_recipient/email_queue_recipient.py b/frappe/email/doctype/email_queue_recipient/email_queue_recipient.py index 055bdb3fc1..95b8593c4c 100644 --- a/frappe/email/doctype/email_queue_recipient/email_queue_recipient.py +++ b/frappe/email/doctype/email_queue_recipient/email_queue_recipient.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/email/doctype/email_rule/email_rule.py b/frappe/email/doctype/email_rule/email_rule.py index 9807724ef1..b2a4be5421 100644 --- a/frappe/email/doctype/email_rule/email_rule.py +++ b/frappe/email/doctype/email_rule/email_rule.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/email/doctype/email_rule/test_email_rule.py b/frappe/email/doctype/email_rule/test_email_rule.py index b2213f7405..eef5448e57 100644 --- a/frappe/email/doctype/email_rule/test_email_rule.py +++ b/frappe/email/doctype/email_rule/test_email_rule.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/email/doctype/email_template/email_template.py b/frappe/email/doctype/email_template/email_template.py index 4711451fd2..c51c46d72d 100644 --- a/frappe/email/doctype/email_template/email_template.py +++ b/frappe/email/doctype/email_template/email_template.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe, json from frappe.model.document import Document diff --git a/frappe/email/doctype/email_template/test_email_template.py b/frappe/email/doctype/email_template/test_email_template.py index 5a9ee969c6..a92ee9f9c3 100644 --- a/frappe/email/doctype/email_template/test_email_template.py +++ b/frappe/email/doctype/email_template/test_email_template.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestEmailTemplate(unittest.TestCase): diff --git a/frappe/email/doctype/email_unsubscribe/email_unsubscribe.py b/frappe/email/doctype/email_unsubscribe/email_unsubscribe.py index 6c47d8c538..d2ee828a55 100644 --- a/frappe/email/doctype/email_unsubscribe/email_unsubscribe.py +++ b/frappe/email/doctype/email_unsubscribe/email_unsubscribe.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/email/doctype/email_unsubscribe/test_email_unsubscribe.py b/frappe/email/doctype/email_unsubscribe/test_email_unsubscribe.py index 602840fe3b..fdea802fdf 100644 --- a/frappe/email/doctype/email_unsubscribe/test_email_unsubscribe.py +++ b/frappe/email/doctype/email_unsubscribe/test_email_unsubscribe.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/email/doctype/newsletter_email_group/newsletter_email_group.py b/frappe/email/doctype/newsletter_email_group/newsletter_email_group.py index a453dda9e4..89476c4d53 100644 --- a/frappe/email/doctype/newsletter_email_group/newsletter_email_group.py +++ b/frappe/email/doctype/newsletter_email_group/newsletter_email_group.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/email/doctype/notification/notification.py b/frappe/email/doctype/notification/notification.py index 57418515f5..f523d835e9 100644 --- a/frappe/email/doctype/notification/notification.py +++ b/frappe/email/doctype/notification/notification.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import json, os diff --git a/frappe/email/doctype/notification/test_notification.py b/frappe/email/doctype/notification/test_notification.py index 2629050c1b..8e814e0245 100644 --- a/frappe/email/doctype/notification/test_notification.py +++ b/frappe/email/doctype/notification/test_notification.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe, frappe.utils, frappe.utils.scheduler from frappe.desk.form import assign_to import unittest diff --git a/frappe/email/doctype/notification_recipient/notification_recipient.py b/frappe/email/doctype/notification_recipient/notification_recipient.py index d8480c5455..68871e5047 100644 --- a/frappe/email/doctype/notification_recipient/notification_recipient.py +++ b/frappe/email/doctype/notification_recipient/notification_recipient.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/email/doctype/unhandled_email/test_unhandled_email.py b/frappe/email/doctype/unhandled_email/test_unhandled_email.py index 5606b8ff30..37c65584e0 100644 --- a/frappe/email/doctype/unhandled_email/test_unhandled_email.py +++ b/frappe/email/doctype/unhandled_email/test_unhandled_email.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/email/doctype/unhandled_email/unhandled_email.py b/frappe/email/doctype/unhandled_email/unhandled_email.py index b445c98aa6..db14a50d09 100644 --- a/frappe/email/doctype/unhandled_email/unhandled_email.py +++ b/frappe/email/doctype/unhandled_email/unhandled_email.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/email/email_body.py b/frappe/email/email_body.py index ffb44d3412..6a32ae6fd9 100755 --- a/frappe/email/email_body.py +++ b/frappe/email/email_body.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, re, os from frappe.utils.pdf import get_pdf diff --git a/frappe/email/queue.py b/frappe/email/queue.py index ef59302bab..16e3fecf48 100755 --- a/frappe/email/queue.py +++ b/frappe/email/queue.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import msgprint, _ diff --git a/frappe/email/receive.py b/frappe/email/receive.py index 2e42008951..a755ec5e74 100644 --- a/frappe/email/receive.py +++ b/frappe/email/receive.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import datetime import email diff --git a/frappe/email/smtp.py b/frappe/email/smtp.py index 74492c09c3..6f73a73f11 100644 --- a/frappe/email/smtp.py +++ b/frappe/email/smtp.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import smtplib diff --git a/frappe/email/utils.py b/frappe/email/utils.py index 24ce77b922..1138698491 100644 --- a/frappe/email/utils.py +++ b/frappe/email/utils.py @@ -1,5 +1,5 @@ # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import imaplib, poplib from frappe.utils import cint diff --git a/frappe/event_streaming/doctype/document_type_field_mapping/document_type_field_mapping.py b/frappe/event_streaming/doctype/document_type_field_mapping/document_type_field_mapping.py index fc8164d8a4..3019d70035 100644 --- a/frappe/event_streaming/doctype/document_type_field_mapping/document_type_field_mapping.py +++ b/frappe/event_streaming/doctype/document_type_field_mapping/document_type_field_mapping.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/event_streaming/doctype/document_type_mapping/document_type_mapping.py b/frappe/event_streaming/doctype/document_type_mapping/document_type_mapping.py index 2cf7282a5a..8f1e5504da 100644 --- a/frappe/event_streaming/doctype/document_type_mapping/document_type_mapping.py +++ b/frappe/event_streaming/doctype/document_type_mapping/document_type_mapping.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import json from frappe import _ diff --git a/frappe/event_streaming/doctype/document_type_mapping/test_document_type_mapping.py b/frappe/event_streaming/doctype/document_type_mapping/test_document_type_mapping.py index b1bb322855..a277139985 100644 --- a/frappe/event_streaming/doctype/document_type_mapping/test_document_type_mapping.py +++ b/frappe/event_streaming/doctype/document_type_mapping/test_document_type_mapping.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/event_streaming/doctype/event_consumer/event_consumer.py b/frappe/event_streaming/doctype/event_consumer/event_consumer.py index 00d304f7f4..e8b84d1345 100644 --- a/frappe/event_streaming/doctype/event_consumer/event_consumer.py +++ b/frappe/event_streaming/doctype/event_consumer/event_consumer.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import json diff --git a/frappe/event_streaming/doctype/event_consumer/test_event_consumer.py b/frappe/event_streaming/doctype/event_consumer/test_event_consumer.py index b8072ecabd..11c69e7ba3 100644 --- a/frappe/event_streaming/doctype/event_consumer/test_event_consumer.py +++ b/frappe/event_streaming/doctype/event_consumer/test_event_consumer.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/event_streaming/doctype/event_consumer_document_type/event_consumer_document_type.py b/frappe/event_streaming/doctype/event_consumer_document_type/event_consumer_document_type.py index cf5d18edfd..b33313087f 100644 --- a/frappe/event_streaming/doctype/event_consumer_document_type/event_consumer_document_type.py +++ b/frappe/event_streaming/doctype/event_consumer_document_type/event_consumer_document_type.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/event_streaming/doctype/event_producer/event_producer.py b/frappe/event_streaming/doctype/event_producer/event_producer.py index 4836276734..0be15e461b 100644 --- a/frappe/event_streaming/doctype/event_producer/event_producer.py +++ b/frappe/event_streaming/doctype/event_producer/event_producer.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import json import time diff --git a/frappe/event_streaming/doctype/event_producer/test_event_producer.py b/frappe/event_streaming/doctype/event_producer/test_event_producer.py index 883f4f2df2..3d697ceb3a 100644 --- a/frappe/event_streaming/doctype/event_producer/test_event_producer.py +++ b/frappe/event_streaming/doctype/event_producer/test_event_producer.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest import json diff --git a/frappe/event_streaming/doctype/event_producer_document_type/event_producer_document_type.py b/frappe/event_streaming/doctype/event_producer_document_type/event_producer_document_type.py index 9ae70e0f97..3e9623f56f 100644 --- a/frappe/event_streaming/doctype/event_producer_document_type/event_producer_document_type.py +++ b/frappe/event_streaming/doctype/event_producer_document_type/event_producer_document_type.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/event_streaming/doctype/event_producer_last_update/event_producer_last_update.py b/frappe/event_streaming/doctype/event_producer_last_update/event_producer_last_update.py index 391cf79c27..0868e86253 100644 --- a/frappe/event_streaming/doctype/event_producer_last_update/event_producer_last_update.py +++ b/frappe/event_streaming/doctype/event_producer_last_update/event_producer_last_update.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/event_streaming/doctype/event_producer_last_update/test_event_producer_last_update.py b/frappe/event_streaming/doctype/event_producer_last_update/test_event_producer_last_update.py index 62ea71edab..c2d943a463 100644 --- a/frappe/event_streaming/doctype/event_producer_last_update/test_event_producer_last_update.py +++ b/frappe/event_streaming/doctype/event_producer_last_update/test_event_producer_last_update.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/event_streaming/doctype/event_sync_log/event_sync_log.py b/frappe/event_streaming/doctype/event_sync_log/event_sync_log.py index 1d255a5c30..c26ca46e05 100644 --- a/frappe/event_streaming/doctype/event_sync_log/event_sync_log.py +++ b/frappe/event_streaming/doctype/event_sync_log/event_sync_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/event_streaming/doctype/event_sync_log/test_event_sync_log.py b/frappe/event_streaming/doctype/event_sync_log/test_event_sync_log.py index ef55dc0f16..b901f92ef8 100644 --- a/frappe/event_streaming/doctype/event_sync_log/test_event_sync_log.py +++ b/frappe/event_streaming/doctype/event_sync_log/test_event_sync_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/event_streaming/doctype/event_update_log/event_update_log.py b/frappe/event_streaming/doctype/event_update_log/event_update_log.py index ae851c70d1..f4871be312 100644 --- a/frappe/event_streaming/doctype/event_update_log/event_update_log.py +++ b/frappe/event_streaming/doctype/event_update_log/event_update_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/event_streaming/doctype/event_update_log/test_event_update_log.py b/frappe/event_streaming/doctype/event_update_log/test_event_update_log.py index 99ced3c209..752f4bbb44 100644 --- a/frappe/event_streaming/doctype/event_update_log/test_event_update_log.py +++ b/frappe/event_streaming/doctype/event_update_log/test_event_update_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/event_streaming/doctype/event_update_log_consumer/event_update_log_consumer.py b/frappe/event_streaming/doctype/event_update_log_consumer/event_update_log_consumer.py index 80a59e4c31..47180db74e 100644 --- a/frappe/event_streaming/doctype/event_update_log_consumer/event_update_log_consumer.py +++ b/frappe/event_streaming/doctype/event_update_log_consumer/event_update_log_consumer.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/exceptions.py b/frappe/exceptions.py index 13abd8f4f8..31a94ac883 100644 --- a/frappe/exceptions.py +++ b/frappe/exceptions.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE # BEWARE don't put anything in this file except exceptions from werkzeug.exceptions import NotFound diff --git a/frappe/geo/country_info.py b/frappe/geo/country_info.py index ddebd1fb0e..86f1d9bc2f 100644 --- a/frappe/geo/country_info.py +++ b/frappe/geo/country_info.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE # all country info import os, json, frappe diff --git a/frappe/geo/doctype/country/country.py b/frappe/geo/doctype/country/country.py index 54935e6eaf..a648744058 100644 --- a/frappe/geo/doctype/country/country.py +++ b/frappe/geo/doctype/country/country.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/geo/doctype/country/test_country.py b/frappe/geo/doctype/country/test_country.py index e00d6ecf37..b4d15f81b3 100644 --- a/frappe/geo/doctype/country/test_country.py +++ b/frappe/geo/doctype/country/test_country.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: See license.txt +# License: MIT. See LICENSE import frappe test_records = frappe.get_test_records('Country') \ No newline at end of file diff --git a/frappe/geo/doctype/currency/currency.py b/frappe/geo/doctype/currency/currency.py index b3ce67cc67..fbe37e73bd 100644 --- a/frappe/geo/doctype/currency/currency.py +++ b/frappe/geo/doctype/currency/currency.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: See license.txt +# License: MIT. See LICENSE import frappe from frappe import throw, _ diff --git a/frappe/geo/doctype/currency/test_currency.py b/frappe/geo/doctype/currency/test_currency.py index 5552e675ec..71b963cc86 100644 --- a/frappe/geo/doctype/currency/test_currency.py +++ b/frappe/geo/doctype/currency/test_currency.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: See license.txt +# License: MIT. See LICENSE # pre loaded diff --git a/frappe/geo/utils.py b/frappe/geo/utils.py index 89de176f0b..9b44a2f3d8 100644 --- a/frappe/geo/utils.py +++ b/frappe/geo/utils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/handler.py b/frappe/handler.py index 2e9fb7b454..352a9672bf 100755 --- a/frappe/handler.py +++ b/frappe/handler.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from werkzeug.wrappers import Response diff --git a/frappe/installer.py b/frappe/installer.py index d4d8117fcb..23247046f6 100755 --- a/frappe/installer.py +++ b/frappe/installer.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import json import os diff --git a/frappe/integrations/doctype/braintree_settings/braintree_settings.py b/frappe/integrations/doctype/braintree_settings/braintree_settings.py index 9dc9778bee..59751185b9 100644 --- a/frappe/integrations/doctype/braintree_settings/braintree_settings.py +++ b/frappe/integrations/doctype/braintree_settings/braintree_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/braintree_settings/test_braintree_settings.py b/frappe/integrations/doctype/braintree_settings/test_braintree_settings.py index 72a678a92c..721158fb4a 100644 --- a/frappe/integrations/doctype/braintree_settings/test_braintree_settings.py +++ b/frappe/integrations/doctype/braintree_settings/test_braintree_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestBraintreeSettings(unittest.TestCase): diff --git a/frappe/integrations/doctype/connected_app/connected_app.py b/frappe/integrations/doctype/connected_app/connected_app.py index 449e30f6d0..fcb5fe7ee9 100644 --- a/frappe/integrations/doctype/connected_app/connected_app.py +++ b/frappe/integrations/doctype/connected_app/connected_app.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import os from urllib.parse import urljoin diff --git a/frappe/integrations/doctype/connected_app/test_connected_app.py b/frappe/integrations/doctype/connected_app/test_connected_app.py index d1ff19ecb2..eff7104ce0 100644 --- a/frappe/integrations/doctype/connected_app/test_connected_app.py +++ b/frappe/integrations/doctype/connected_app/test_connected_app.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# See license.txt +# License: MIT. See LICENSE import unittest import requests from urllib.parse import urljoin diff --git a/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py b/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py index 53f0935c80..90927e13f8 100644 --- a/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py +++ b/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import json import os diff --git a/frappe/integrations/doctype/dropbox_settings/test_dropbox_settings.py b/frappe/integrations/doctype/dropbox_settings/test_dropbox_settings.py index d34e65de50..458f876444 100644 --- a/frappe/integrations/doctype/dropbox_settings/test_dropbox_settings.py +++ b/frappe/integrations/doctype/dropbox_settings/test_dropbox_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/integrations/doctype/google_calendar/google_calendar.py b/frappe/integrations/doctype/google_calendar/google_calendar.py index f93be35aa7..0d4c5bbe5c 100644 --- a/frappe/integrations/doctype/google_calendar/google_calendar.py +++ b/frappe/integrations/doctype/google_calendar/google_calendar.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from datetime import datetime, timedelta diff --git a/frappe/integrations/doctype/google_contacts/google_contacts.py b/frappe/integrations/doctype/google_contacts/google_contacts.py index 1705f98e91..a63b0b6d80 100644 --- a/frappe/integrations/doctype/google_contacts/google_contacts.py +++ b/frappe/integrations/doctype/google_contacts/google_contacts.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import google.oauth2.credentials diff --git a/frappe/integrations/doctype/google_drive/google_drive.py b/frappe/integrations/doctype/google_drive/google_drive.py index 93b6fa3f8d..beac7898a9 100644 --- a/frappe/integrations/doctype/google_drive/google_drive.py +++ b/frappe/integrations/doctype/google_drive/google_drive.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import os from urllib.parse import quote diff --git a/frappe/integrations/doctype/google_drive/test_google_drive.py b/frappe/integrations/doctype/google_drive/test_google_drive.py index 96e8577c7c..fbd9dce7f4 100644 --- a/frappe/integrations/doctype/google_drive/test_google_drive.py +++ b/frappe/integrations/doctype/google_drive/test_google_drive.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/integrations/doctype/google_settings/google_settings.py b/frappe/integrations/doctype/google_settings/google_settings.py index db65abdb65..94df43e69c 100644 --- a/frappe/integrations/doctype/google_settings/google_settings.py +++ b/frappe/integrations/doctype/google_settings/google_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/google_settings/test_google_settings.py b/frappe/integrations/doctype/google_settings/test_google_settings.py index 32d43a323b..cddf9f3697 100644 --- a/frappe/integrations/doctype/google_settings/test_google_settings.py +++ b/frappe/integrations/doctype/google_settings/test_google_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE from __future__ import unicode_literals import frappe diff --git a/frappe/integrations/doctype/integration_request/integration_request.py b/frappe/integrations/doctype/integration_request/integration_request.py index 4c4961d96d..ae0e024f58 100644 --- a/frappe/integrations/doctype/integration_request/integration_request.py +++ b/frappe/integrations/doctype/integration_request/integration_request.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/integration_request/test_integration_request.py b/frappe/integrations/doctype/integration_request/test_integration_request.py index a26eb4ba93..e26ccabc96 100644 --- a/frappe/integrations/doctype/integration_request/test_integration_request.py +++ b/frappe/integrations/doctype/integration_request/test_integration_request.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/integrations/doctype/ldap_group_mapping/ldap_group_mapping.py b/frappe/integrations/doctype/ldap_group_mapping/ldap_group_mapping.py index b6bb77d964..b9838b996f 100644 --- a/frappe/integrations/doctype/ldap_group_mapping/ldap_group_mapping.py +++ b/frappe/integrations/doctype/ldap_group_mapping/ldap_group_mapping.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/ldap_settings/ldap_settings.py b/frappe/integrations/doctype/ldap_settings/ldap_settings.py index 7c89c31844..1c5abb454c 100644 --- a/frappe/integrations/doctype/ldap_settings/ldap_settings.py +++ b/frappe/integrations/doctype/ldap_settings/ldap_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _, safe_encode diff --git a/frappe/integrations/doctype/ldap_settings/test_ldap_settings.py b/frappe/integrations/doctype/ldap_settings/test_ldap_settings.py index 1b2a9b155f..7b0638876b 100644 --- a/frappe/integrations/doctype/ldap_settings/test_ldap_settings.py +++ b/frappe/integrations/doctype/ldap_settings/test_ldap_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest import functools @@ -172,7 +172,7 @@ class LDAP_TestCase(): # Clear OpenLDAP connection self.connection = None - + @mock_ldap_connection def test_mandatory_fields(self): @@ -218,7 +218,7 @@ class LDAP_TestCase(): localdoc = self.doc.copy() localdoc[non_mandatory_field] = '' - + try: frappe.get_doc(localdoc).save() @@ -324,7 +324,7 @@ class LDAP_TestCase(): self.assertTrue(kwargs['user'] == self.base_dn, 'ldap3.Connection user does not match provided user') - ldap3_connection_method.assert_called_with(server=ldap3_server_method.return_value, + ldap3_connection_method.assert_called_with(server=ldap3_server_method.return_value, auto_bind=True, password=self.base_password, raise_exceptions=True, @@ -467,7 +467,7 @@ class LDAP_TestCase(): self.test_class.create_or_update_user(self.user1doc, test_user_data[test_user]) self.assertTrue(sync_roles_method.called, 'User roles need to be updated for a new user') - self.assertFalse(update_user_fields_method.called, + self.assertFalse(update_user_fields_method.called, 'User roles are not required to be updated for a new user, this will occur during logon') @@ -489,7 +489,7 @@ class LDAP_TestCase(): @mock_ldap_connection def test_fetch_ldap_groups(self): - + if self.TEST_LDAP_SERVER.lower() == 'openldap': test_users = { 'posix.user': ['Users', 'Administrators'], @@ -523,7 +523,7 @@ class LDAP_TestCase(): @mock_ldap_connection def test_authenticate(self): - + with mock.patch('frappe.integrations.doctype.ldap_settings.ldap_settings.LDAPSettings.fetch_ldap_groups') as \ fetch_ldap_groups_function: @@ -543,7 +543,7 @@ class LDAP_TestCase(): {'': 'posix_user_password'}, {'': ''} ] # All invalid users should return 'invalid username or password' - + for username, password in enumerate(invalid_users): with self.assertRaises(frappe.exceptions.ValidationError) as display_massage: diff --git a/frappe/integrations/doctype/oauth_authorization_code/oauth_authorization_code.py b/frappe/integrations/doctype/oauth_authorization_code/oauth_authorization_code.py index 0c7f02844c..5a3f380e84 100644 --- a/frappe/integrations/doctype/oauth_authorization_code/oauth_authorization_code.py +++ b/frappe/integrations/doctype/oauth_authorization_code/oauth_authorization_code.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/oauth_authorization_code/test_oauth_authorization_code.py b/frappe/integrations/doctype/oauth_authorization_code/test_oauth_authorization_code.py index 6084dd64b4..bc6d29cbdb 100644 --- a/frappe/integrations/doctype/oauth_authorization_code/test_oauth_authorization_code.py +++ b/frappe/integrations/doctype/oauth_authorization_code/test_oauth_authorization_code.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/integrations/doctype/oauth_bearer_token/oauth_bearer_token.py b/frappe/integrations/doctype/oauth_bearer_token/oauth_bearer_token.py index 916d0205d2..ff6f96cc4d 100644 --- a/frappe/integrations/doctype/oauth_bearer_token/oauth_bearer_token.py +++ b/frappe/integrations/doctype/oauth_bearer_token/oauth_bearer_token.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/oauth_bearer_token/test_oauth_bearer_token.py b/frappe/integrations/doctype/oauth_bearer_token/test_oauth_bearer_token.py index 6028cebcf9..965feb4f78 100644 --- a/frappe/integrations/doctype/oauth_bearer_token/test_oauth_bearer_token.py +++ b/frappe/integrations/doctype/oauth_bearer_token/test_oauth_bearer_token.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/integrations/doctype/oauth_client/oauth_client.py b/frappe/integrations/doctype/oauth_client/oauth_client.py index 0b449ff968..42fba07ecb 100644 --- a/frappe/integrations/doctype/oauth_client/oauth_client.py +++ b/frappe/integrations/doctype/oauth_client/oauth_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/integrations/doctype/oauth_client/test_oauth_client.py b/frappe/integrations/doctype/oauth_client/test_oauth_client.py index a4e50e15d8..fa03fa06e7 100644 --- a/frappe/integrations/doctype/oauth_client/test_oauth_client.py +++ b/frappe/integrations/doctype/oauth_client/test_oauth_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/integrations/doctype/oauth_provider_settings/oauth_provider_settings.py b/frappe/integrations/doctype/oauth_provider_settings/oauth_provider_settings.py index 3ab5df92ac..ec1636659f 100644 --- a/frappe/integrations/doctype/oauth_provider_settings/oauth_provider_settings.py +++ b/frappe/integrations/doctype/oauth_provider_settings/oauth_provider_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/oauth_scope/oauth_scope.py b/frappe/integrations/doctype/oauth_scope/oauth_scope.py index ae579e6b51..cf5fa1f341 100644 --- a/frappe/integrations/doctype/oauth_scope/oauth_scope.py +++ b/frappe/integrations/doctype/oauth_scope/oauth_scope.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/paypal_settings/paypal_settings.py b/frappe/integrations/doctype/paypal_settings/paypal_settings.py index da045d2c6a..30ac905792 100644 --- a/frappe/integrations/doctype/paypal_settings/paypal_settings.py +++ b/frappe/integrations/doctype/paypal_settings/paypal_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE """ # Integrating PayPal diff --git a/frappe/integrations/doctype/paytm_settings/paytm_settings.py b/frappe/integrations/doctype/paytm_settings/paytm_settings.py index 9f15d73f09..5255360242 100644 --- a/frappe/integrations/doctype/paytm_settings/paytm_settings.py +++ b/frappe/integrations/doctype/paytm_settings/paytm_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import json import requests diff --git a/frappe/integrations/doctype/paytm_settings/test_paytm_settings.py b/frappe/integrations/doctype/paytm_settings/test_paytm_settings.py index a00ce86327..425fc87a3f 100644 --- a/frappe/integrations/doctype/paytm_settings/test_paytm_settings.py +++ b/frappe/integrations/doctype/paytm_settings/test_paytm_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/integrations/doctype/query_parameters/query_parameters.py b/frappe/integrations/doctype/query_parameters/query_parameters.py index 13fb94dbe3..68e97e9071 100644 --- a/frappe/integrations/doctype/query_parameters/query_parameters.py +++ b/frappe/integrations/doctype/query_parameters/query_parameters.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/razorpay_settings/razorpay_settings.py b/frappe/integrations/doctype/razorpay_settings/razorpay_settings.py index d24e15f480..9ae16a31f8 100644 --- a/frappe/integrations/doctype/razorpay_settings/razorpay_settings.py +++ b/frappe/integrations/doctype/razorpay_settings/razorpay_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE """ # Integrating RazorPay diff --git a/frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py b/frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py index 1346811652..dc824e18b9 100755 --- a/frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py +++ b/frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import os import os.path import frappe diff --git a/frappe/integrations/doctype/s3_backup_settings/test_s3_backup_settings.py b/frappe/integrations/doctype/s3_backup_settings/test_s3_backup_settings.py index 3aecdf3489..2a586c30d4 100755 --- a/frappe/integrations/doctype/s3_backup_settings/test_s3_backup_settings.py +++ b/frappe/integrations/doctype/s3_backup_settings/test_s3_backup_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestS3BackupSettings(unittest.TestCase): diff --git a/frappe/integrations/doctype/slack_webhook_url/slack_webhook_url.py b/frappe/integrations/doctype/slack_webhook_url/slack_webhook_url.py index a970fc1f11..a74c0a36ca 100644 --- a/frappe/integrations/doctype/slack_webhook_url/slack_webhook_url.py +++ b/frappe/integrations/doctype/slack_webhook_url/slack_webhook_url.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/slack_webhook_url/test_slack_webhook_url.py b/frappe/integrations/doctype/slack_webhook_url/test_slack_webhook_url.py index 4285c2c4bc..a256735f81 100644 --- a/frappe/integrations/doctype/slack_webhook_url/test_slack_webhook_url.py +++ b/frappe/integrations/doctype/slack_webhook_url/test_slack_webhook_url.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestSlackWebhookURL(unittest.TestCase): diff --git a/frappe/integrations/doctype/social_login_key/social_login_key.py b/frappe/integrations/doctype/social_login_key/social_login_key.py index 4a4fcd44f4..d6f55e5758 100644 --- a/frappe/integrations/doctype/social_login_key/social_login_key.py +++ b/frappe/integrations/doctype/social_login_key/social_login_key.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe, json from frappe import _ diff --git a/frappe/integrations/doctype/social_login_key/test_social_login_key.py b/frappe/integrations/doctype/social_login_key/test_social_login_key.py index 23effd6a44..880f1ee99c 100644 --- a/frappe/integrations/doctype/social_login_key/test_social_login_key.py +++ b/frappe/integrations/doctype/social_login_key/test_social_login_key.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe from frappe.integrations.doctype.social_login_key.social_login_key import BaseUrlNotSetError import unittest diff --git a/frappe/integrations/doctype/stripe_settings/stripe_settings.py b/frappe/integrations/doctype/stripe_settings/stripe_settings.py index 9bb9c60775..81e40fa72f 100644 --- a/frappe/integrations/doctype/stripe_settings/stripe_settings.py +++ b/frappe/integrations/doctype/stripe_settings/stripe_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/stripe_settings/test_stripe_settings.py b/frappe/integrations/doctype/stripe_settings/test_stripe_settings.py index ba11c3c38b..e7113d3bd9 100644 --- a/frappe/integrations/doctype/stripe_settings/test_stripe_settings.py +++ b/frappe/integrations/doctype/stripe_settings/test_stripe_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestStripeSettings(unittest.TestCase): diff --git a/frappe/integrations/doctype/token_cache/test_token_cache.py b/frappe/integrations/doctype/token_cache/test_token_cache.py index 2ffd57403b..5fe648d225 100644 --- a/frappe/integrations/doctype/token_cache/test_token_cache.py +++ b/frappe/integrations/doctype/token_cache/test_token_cache.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# See license.txt +# License: MIT. See LICENSE import unittest import frappe diff --git a/frappe/integrations/doctype/token_cache/token_cache.py b/frappe/integrations/doctype/token_cache/token_cache.py index 3001d12b2b..ea86100cc2 100644 --- a/frappe/integrations/doctype/token_cache/token_cache.py +++ b/frappe/integrations/doctype/token_cache/token_cache.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from datetime import datetime, timedelta diff --git a/frappe/integrations/doctype/webhook/__init__.py b/frappe/integrations/doctype/webhook/__init__.py index b92497f16c..6dcc0218a3 100644 --- a/frappe/integrations/doctype/webhook/__init__.py +++ b/frappe/integrations/doctype/webhook/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/integrations/doctype/webhook/test_webhook.py b/frappe/integrations/doctype/webhook/test_webhook.py index 1470f666a1..a1176aa38b 100644 --- a/frappe/integrations/doctype/webhook/test_webhook.py +++ b/frappe/integrations/doctype/webhook/test_webhook.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest import frappe diff --git a/frappe/integrations/doctype/webhook/webhook.py b/frappe/integrations/doctype/webhook/webhook.py index e3a8bda2aa..8546a9d2f8 100644 --- a/frappe/integrations/doctype/webhook/webhook.py +++ b/frappe/integrations/doctype/webhook/webhook.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import base64 import datetime diff --git a/frappe/integrations/doctype/webhook_data/webhook_data.py b/frappe/integrations/doctype/webhook_data/webhook_data.py index dbd9328482..6037ed5390 100644 --- a/frappe/integrations/doctype/webhook_data/webhook_data.py +++ b/frappe/integrations/doctype/webhook_data/webhook_data.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/webhook_header/webhook_header.py b/frappe/integrations/doctype/webhook_header/webhook_header.py index 428b287db2..e1944c84bc 100644 --- a/frappe/integrations/doctype/webhook_header/webhook_header.py +++ b/frappe/integrations/doctype/webhook_header/webhook_header.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/integrations/doctype/webhook_request_log/test_webhook_request_log.py b/frappe/integrations/doctype/webhook_request_log/test_webhook_request_log.py index dd11bf8a01..5de26a35ed 100644 --- a/frappe/integrations/doctype/webhook_request_log/test_webhook_request_log.py +++ b/frappe/integrations/doctype/webhook_request_log/test_webhook_request_log.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/integrations/doctype/webhook_request_log/webhook_request_log.py b/frappe/integrations/doctype/webhook_request_log/webhook_request_log.py index 493ebfd8f7..3f0558ce80 100644 --- a/frappe/integrations/doctype/webhook_request_log/webhook_request_log.py +++ b/frappe/integrations/doctype/webhook_request_log/webhook_request_log.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/integrations/oauth2_logins.py b/frappe/integrations/oauth2_logins.py index c38b43beb7..b187d29b34 100644 --- a/frappe/integrations/oauth2_logins.py +++ b/frappe/integrations/oauth2_logins.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import frappe.utils diff --git a/frappe/integrations/offsite_backup_utils.py b/frappe/integrations/offsite_backup_utils.py index 7a263e9d04..416d656d90 100644 --- a/frappe/integrations/offsite_backup_utils.py +++ b/frappe/integrations/offsite_backup_utils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import glob diff --git a/frappe/integrations/utils.py b/frappe/integrations/utils.py index b897a35062..bda45a765d 100644 --- a/frappe/integrations/utils.py +++ b/frappe/integrations/utils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import json,datetime diff --git a/frappe/middlewares.py b/frappe/middlewares.py index 05944ec37a..38cb4cea21 100644 --- a/frappe/middlewares.py +++ b/frappe/middlewares.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import os diff --git a/frappe/migrate.py b/frappe/migrate.py index 061e4c98d7..92258502e4 100644 --- a/frappe/migrate.py +++ b/frappe/migrate.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import json import os diff --git a/frappe/model/__init__.py b/frappe/model/__init__.py index 1acd7ee670..ce0a208d50 100644 --- a/frappe/model/__init__.py +++ b/frappe/model/__init__.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE # model __init__.py import frappe diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index 5a204caf70..b9c8900839 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import datetime from frappe import _ diff --git a/frappe/model/create_new.py b/frappe/model/create_new.py index fba6765479..fff2156a10 100644 --- a/frappe/model/create_new.py +++ b/frappe/model/create_new.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """ Create a new document with defaults set diff --git a/frappe/model/db_query.py b/frappe/model/db_query.py index 7ed681644f..ae159c1a69 100644 --- a/frappe/model/db_query.py +++ b/frappe/model/db_query.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """build query for doclistview and return results""" import frappe.defaults diff --git a/frappe/model/delete_doc.py b/frappe/model/delete_doc.py index 9ce74054e7..ac976e976c 100644 --- a/frappe/model/delete_doc.py +++ b/frappe/model/delete_doc.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import os import shutil diff --git a/frappe/model/docfield.py b/frappe/model/docfield.py index 6360c3866d..c173561b1e 100644 --- a/frappe/model/docfield.py +++ b/frappe/model/docfield.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """docfield utililtes""" diff --git a/frappe/model/document.py b/frappe/model/document.py index 37549e2001..411d447d0f 100644 --- a/frappe/model/document.py +++ b/frappe/model/document.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import time from frappe import _, msgprint, is_whitelisted diff --git a/frappe/model/dynamic_links.py b/frappe/model/dynamic_links.py index 676c86d7da..7311b39b30 100644 --- a/frappe/model/dynamic_links.py +++ b/frappe/model/dynamic_links.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/model/mapper.py b/frappe/model/mapper.py index fa8858d950..bde4fb6d73 100644 --- a/frappe/model/mapper.py +++ b/frappe/model/mapper.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import json import frappe diff --git a/frappe/model/meta.py b/frappe/model/meta.py index f89163e092..207aca089b 100644 --- a/frappe/model/meta.py +++ b/frappe/model/meta.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE # metadata diff --git a/frappe/model/naming.py b/frappe/model/naming.py index 7705002706..2e7f54938f 100644 --- a/frappe/model/naming.py +++ b/frappe/model/naming.py @@ -10,7 +10,7 @@ the cancelled document naming pattern is changed to 'orig_name-CANC-X'. """ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/model/rename_doc.py b/frappe/model/rename_doc.py index 9b8ac2574d..14f1dbf2b0 100644 --- a/frappe/model/rename_doc.py +++ b/frappe/model/rename_doc.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _, bold from frappe.model.dynamic_links import get_dynamic_link_map diff --git a/frappe/model/sync.py b/frappe/model/sync.py index 836f70dd55..c2e3fcac08 100644 --- a/frappe/model/sync.py +++ b/frappe/model/sync.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """ Sync's doctype and docfields from txt files to database perms will get synced only if none exist diff --git a/frappe/model/utils/__init__.py b/frappe/model/utils/__init__.py index 47615182e4..4cdca5e394 100644 --- a/frappe/model/utils/__init__.py +++ b/frappe/model/utils/__init__.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ from frappe.utils import cstr diff --git a/frappe/model/utils/link_count.py b/frappe/model/utils/link_count.py index 7562aaae45..404b6ec855 100644 --- a/frappe/model/utils/link_count.py +++ b/frappe/model/utils/link_count.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/model/utils/rename_field.py b/frappe/model/utils/rename_field.py index 9fe9d64041..c9c454b7e8 100644 --- a/frappe/model/utils/rename_field.py +++ b/frappe/model/utils/rename_field.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import json from frappe.model import no_value_fields, table_fields diff --git a/frappe/model/workflow.py b/frappe/model/workflow.py index fa2f557370..e74d88c0f2 100644 --- a/frappe/model/workflow.py +++ b/frappe/model/workflow.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.utils import cint diff --git a/frappe/modules/export_file.py b/frappe/modules/export_file.py index ae9f11d53b..4a00295022 100644 --- a/frappe/modules/export_file.py +++ b/frappe/modules/export_file.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, os import frappe.model diff --git a/frappe/modules/import_file.py b/frappe/modules/import_file.py index e743f0c3da..e398e384e3 100644 --- a/frappe/modules/import_file.py +++ b/frappe/modules/import_file.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, os, json from frappe.modules import get_module_path, scrub_dt_dn from frappe.utils import get_datetime_str diff --git a/frappe/modules/patch_handler.py b/frappe/modules/patch_handler.py index 029234d5d9..8dfb27c0b8 100644 --- a/frappe/modules/patch_handler.py +++ b/frappe/modules/patch_handler.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """ Execute Patch Files diff --git a/frappe/modules/utils.py b/frappe/modules/utils.py index ed2a839dc1..bbfd63a277 100644 --- a/frappe/modules/utils.py +++ b/frappe/modules/utils.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """ Utilities for using modules """ diff --git a/frappe/monitor.py b/frappe/monitor.py index 34ca7d67f7..6bad03dfe9 100644 --- a/frappe/monitor.py +++ b/frappe/monitor.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from datetime import datetime import json diff --git a/frappe/patches/v10_0/modify_smallest_currency_fraction.py b/frappe/patches/v10_0/modify_smallest_currency_fraction.py index c9ae477359..9469d546ce 100644 --- a/frappe/patches/v10_0/modify_smallest_currency_fraction.py +++ b/frappe/patches/v10_0/modify_smallest_currency_fraction.py @@ -1,5 +1,5 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v10_0/set_default_locking_time.py b/frappe/patches/v10_0/set_default_locking_time.py index 045fa0e3fa..11993e1163 100644 --- a/frappe/patches/v10_0/set_default_locking_time.py +++ b/frappe/patches/v10_0/set_default_locking_time.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v11_0/change_email_signature_fieldtype.py b/frappe/patches/v11_0/change_email_signature_fieldtype.py index ccfa8541c3..7c57aa044e 100644 --- a/frappe/patches/v11_0/change_email_signature_fieldtype.py +++ b/frappe/patches/v11_0/change_email_signature_fieldtype.py @@ -1,5 +1,5 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v11_0/remove_doctype_user_permissions_for_page_and_report.py b/frappe/patches/v11_0/remove_doctype_user_permissions_for_page_and_report.py index 5c54b1e5c1..ff5cf3fc5e 100644 --- a/frappe/patches/v11_0/remove_doctype_user_permissions_for_page_and_report.py +++ b/frappe/patches/v11_0/remove_doctype_user_permissions_for_page_and_report.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v12_0/set_default_password_reset_limit.py b/frappe/patches/v12_0/set_default_password_reset_limit.py index 188f2383e7..e403b5251e 100644 --- a/frappe/patches/v12_0/set_default_password_reset_limit.py +++ b/frappe/patches/v12_0/set_default_password_reset_limit.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/delete_event_producer_and_consumer_keys.py b/frappe/patches/v13_0/delete_event_producer_and_consumer_keys.py index 776e9c796e..2d9e232da5 100644 --- a/frappe/patches/v13_0/delete_event_producer_and_consumer_keys.py +++ b/frappe/patches/v13_0/delete_event_producer_and_consumer_keys.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/delete_package_publish_tool.py b/frappe/patches/v13_0/delete_package_publish_tool.py index bf9aaf5a76..5c1678bdbe 100644 --- a/frappe/patches/v13_0/delete_package_publish_tool.py +++ b/frappe/patches/v13_0/delete_package_publish_tool.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/enable_custom_script.py b/frappe/patches/v13_0/enable_custom_script.py index 0684074fe7..de027ab97a 100644 --- a/frappe/patches/v13_0/enable_custom_script.py +++ b/frappe/patches/v13_0/enable_custom_script.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/generate_theme_files_in_public_folder.py b/frappe/patches/v13_0/generate_theme_files_in_public_folder.py index dd9fb1961a..6e8e0d7fc5 100644 --- a/frappe/patches/v13_0/generate_theme_files_in_public_folder.py +++ b/frappe/patches/v13_0/generate_theme_files_in_public_folder.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/jinja_hook.py b/frappe/patches/v13_0/jinja_hook.py index 990ae50f35..e1c9175576 100644 --- a/frappe/patches/v13_0/jinja_hook.py +++ b/frappe/patches/v13_0/jinja_hook.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from click import secho diff --git a/frappe/patches/v13_0/queryreport_columns.py b/frappe/patches/v13_0/queryreport_columns.py index 5c381f4f3e..ed22ce4441 100644 --- a/frappe/patches/v13_0/queryreport_columns.py +++ b/frappe/patches/v13_0/queryreport_columns.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import json diff --git a/frappe/patches/v13_0/remove_tailwind_from_page_builder.py b/frappe/patches/v13_0/remove_tailwind_from_page_builder.py index 2bf2c7bf87..b26d2bef4a 100644 --- a/frappe/patches/v13_0/remove_tailwind_from_page_builder.py +++ b/frappe/patches/v13_0/remove_tailwind_from_page_builder.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/remove_twilio_settings.py b/frappe/patches/v13_0/remove_twilio_settings.py index 7efaf876e2..826edfb951 100644 --- a/frappe/patches/v13_0/remove_twilio_settings.py +++ b/frappe/patches/v13_0/remove_twilio_settings.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/rename_list_view_setting_to_list_view_settings.py b/frappe/patches/v13_0/rename_list_view_setting_to_list_view_settings.py index 3122de8bea..db3ab1b32a 100644 --- a/frappe/patches/v13_0/rename_list_view_setting_to_list_view_settings.py +++ b/frappe/patches/v13_0/rename_list_view_setting_to_list_view_settings.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/rename_notification_fields.py b/frappe/patches/v13_0/rename_notification_fields.py index 1413d80358..2f314df9c1 100644 --- a/frappe/patches/v13_0/rename_notification_fields.py +++ b/frappe/patches/v13_0/rename_notification_fields.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.model.utils.rename_field import rename_field diff --git a/frappe/patches/v13_0/rename_onboarding.py b/frappe/patches/v13_0/rename_onboarding.py index 852065dfd2..cd910195ad 100644 --- a/frappe/patches/v13_0/rename_onboarding.py +++ b/frappe/patches/v13_0/rename_onboarding.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/replace_old_data_import.py b/frappe/patches/v13_0/replace_old_data_import.py index 838881b48e..7d2692a433 100644 --- a/frappe/patches/v13_0/replace_old_data_import.py +++ b/frappe/patches/v13_0/replace_old_data_import.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/update_duration_options.py b/frappe/patches/v13_0/update_duration_options.py index e0d8dea4ea..48f0dc0969 100644 --- a/frappe/patches/v13_0/update_duration_options.py +++ b/frappe/patches/v13_0/update_duration_options.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/update_newsletter_content_type.py b/frappe/patches/v13_0/update_newsletter_content_type.py index 5f047680ee..39758c8257 100644 --- a/frappe/patches/v13_0/update_newsletter_content_type.py +++ b/frappe/patches/v13_0/update_newsletter_content_type.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/update_notification_channel_if_empty.py b/frappe/patches/v13_0/update_notification_channel_if_empty.py index bcf9a7b28c..43cf813c74 100644 --- a/frappe/patches/v13_0/update_notification_channel_if_empty.py +++ b/frappe/patches/v13_0/update_notification_channel_if_empty.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/patches/v13_0/web_template_set_module.py b/frappe/patches/v13_0/web_template_set_module.py index 2ee9e3ba2d..d200f4e0da 100644 --- a/frappe/patches/v13_0/web_template_set_module.py +++ b/frappe/patches/v13_0/web_template_set_module.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/permissions.py b/frappe/permissions.py index af7bc3b602..7ee1119ebb 100644 --- a/frappe/permissions.py +++ b/frappe/permissions.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import copy import frappe diff --git a/frappe/printing/doctype/letter_head/letter_head.py b/frappe/printing/doctype/letter_head/letter_head.py index 948be60b88..eeaef28393 100644 --- a/frappe/printing/doctype/letter_head/letter_head.py +++ b/frappe/printing/doctype/letter_head/letter_head.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.utils import is_image diff --git a/frappe/printing/doctype/letter_head/test_letter_head.py b/frappe/printing/doctype/letter_head/test_letter_head.py index 96dfc68705..67d307ee8b 100644 --- a/frappe/printing/doctype/letter_head/test_letter_head.py +++ b/frappe/printing/doctype/letter_head/test_letter_head.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/printing/doctype/print_format/print_format.py b/frappe/printing/doctype/print_format/print_format.py index 5d4ff92fe2..878a864b38 100644 --- a/frappe/printing/doctype/print_format/print_format.py +++ b/frappe/printing/doctype/print_format/print_format.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import frappe.utils diff --git a/frappe/printing/doctype/print_format/test_print_format.py b/frappe/printing/doctype/print_format/test_print_format.py index e65eb0183f..564a2c750c 100644 --- a/frappe/printing/doctype/print_format/test_print_format.py +++ b/frappe/printing/doctype/print_format/test_print_format.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest import re diff --git a/frappe/printing/doctype/print_heading/print_heading.py b/frappe/printing/doctype/print_heading/print_heading.py index f9955c019d..39c46ad152 100644 --- a/frappe/printing/doctype/print_heading/print_heading.py +++ b/frappe/printing/doctype/print_heading/print_heading.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/printing/doctype/print_heading/test_print_heading.py b/frappe/printing/doctype/print_heading/test_print_heading.py index ce99cde607..7eaa1bc6ba 100644 --- a/frappe/printing/doctype/print_heading/test_print_heading.py +++ b/frappe/printing/doctype/print_heading/test_print_heading.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/printing/doctype/print_settings/print_settings.py b/frappe/printing/doctype/print_settings/print_settings.py index 610c083097..a7e59c9078 100644 --- a/frappe/printing/doctype/print_settings/print_settings.py +++ b/frappe/printing/doctype/print_settings/print_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/printing/doctype/print_settings/test_print_settings.py b/frappe/printing/doctype/print_settings/test_print_settings.py index d1dec861b2..82883eaee5 100644 --- a/frappe/printing/doctype/print_settings/test_print_settings.py +++ b/frappe/printing/doctype/print_settings/test_print_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import unittest class TestPrintSettings(unittest.TestCase): diff --git a/frappe/printing/doctype/print_style/print_style.py b/frappe/printing/doctype/print_style/print_style.py index a91786795c..7985c006f4 100644 --- a/frappe/printing/doctype/print_style/print_style.py +++ b/frappe/printing/doctype/print_style/print_style.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/printing/doctype/print_style/test_print_style.py b/frappe/printing/doctype/print_style/test_print_style.py index b717b23df8..cbf5c465d1 100644 --- a/frappe/printing/doctype/print_style/test_print_style.py +++ b/frappe/printing/doctype/print_style/test_print_style.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/rate_limiter.py b/frappe/rate_limiter.py index 528e5d6b56..2772d4b0e0 100644 --- a/frappe/rate_limiter.py +++ b/frappe/rate_limiter.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from datetime import datetime from functools import wraps diff --git a/frappe/realtime.py b/frappe/realtime.py index 6c812e8868..aa0e2fddad 100644 --- a/frappe/realtime.py +++ b/frappe/realtime.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import os diff --git a/frappe/recorder.py b/frappe/recorder.py index 969e7aa4fa..d4d9a275db 100644 --- a/frappe/recorder.py +++ b/frappe/recorder.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from collections import Counter import datetime import inspect diff --git a/frappe/search/__init__.py b/frappe/search/__init__.py index 0436775417..8e1302c0b4 100644 --- a/frappe/search/__init__.py +++ b/frappe/search/__init__.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.utils import cint diff --git a/frappe/search/full_text_search.py b/frappe/search/full_text_search.py index 9dd181323e..104398b0ef 100644 --- a/frappe/search/full_text_search.py +++ b/frappe/search/full_text_search.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.utils import update_progress_bar diff --git a/frappe/search/test_full_text_search.py b/frappe/search/test_full_text_search.py index be9669d3c5..348a0ec72a 100644 --- a/frappe/search/test_full_text_search.py +++ b/frappe/search/test_full_text_search.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest from frappe.search.full_text_search import FullTextSearch diff --git a/frappe/search/website_search.py b/frappe/search/website_search.py index ad9d8c3ba8..0bc06d1a9b 100644 --- a/frappe/search/website_search.py +++ b/frappe/search/website_search.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import os diff --git a/frappe/sessions.py b/frappe/sessions.py index 4f769ea88f..ce104968ad 100644 --- a/frappe/sessions.py +++ b/frappe/sessions.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """ Boot session from cache or build diff --git a/frappe/share.py b/frappe/share.py index 10c0f26c22..030feea8fa 100644 --- a/frappe/share.py +++ b/frappe/share.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/social/doctype/energy_point_log/energy_point_log.py b/frappe/social/doctype/energy_point_log/energy_point_log.py index aff3c7cd59..3ffabcd241 100644 --- a/frappe/social/doctype/energy_point_log/energy_point_log.py +++ b/frappe/social/doctype/energy_point_log/energy_point_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/social/doctype/energy_point_log/test_energy_point_log.py b/frappe/social/doctype/energy_point_log/test_energy_point_log.py index eb03058760..c2bcbde825 100644 --- a/frappe/social/doctype/energy_point_log/test_energy_point_log.py +++ b/frappe/social/doctype/energy_point_log/test_energy_point_log.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest from .energy_point_log import get_energy_points as _get_energy_points, create_review_points_log, review diff --git a/frappe/social/doctype/energy_point_rule/energy_point_rule.py b/frappe/social/doctype/energy_point_rule/energy_point_rule.py index b673e8e199..b48ec396de 100644 --- a/frappe/social/doctype/energy_point_rule/energy_point_rule.py +++ b/frappe/social/doctype/energy_point_rule/energy_point_rule.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/social/doctype/energy_point_settings/energy_point_settings.py b/frappe/social/doctype/energy_point_settings/energy_point_settings.py index 64944d64e8..cac0e0b4a5 100644 --- a/frappe/social/doctype/energy_point_settings/energy_point_settings.py +++ b/frappe/social/doctype/energy_point_settings/energy_point_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/social/doctype/post/post.py b/frappe/social/doctype/post/post.py index 62a0155d3c..a00f647b55 100644 --- a/frappe/social/doctype/post/post.py +++ b/frappe/social/doctype/post/post.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import requests diff --git a/frappe/social/doctype/post_comment/post_comment.py b/frappe/social/doctype/post_comment/post_comment.py index 14001ba537..a3394f3ac9 100644 --- a/frappe/social/doctype/post_comment/post_comment.py +++ b/frappe/social/doctype/post_comment/post_comment.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/social/doctype/review_level/review_level.py b/frappe/social/doctype/review_level/review_level.py index 6622a89ab9..1951233552 100644 --- a/frappe/social/doctype/review_level/review_level.py +++ b/frappe/social/doctype/review_level/review_level.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/templates/includes/comments/comments.py b/frappe/templates/includes/comments/comments.py index 44d09dd287..3bba388ac2 100644 --- a/frappe/templates/includes/comments/comments.py +++ b/frappe/templates/includes/comments/comments.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import re from frappe.website.utils import clear_cache diff --git a/frappe/templates/includes/feedback/feedback.py b/frappe/templates/includes/feedback/feedback.py index b15d9567d7..63502f137a 100644 --- a/frappe/templates/includes/feedback/feedback.py +++ b/frappe/templates/includes/feedback/feedback.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from __future__ import unicode_literals import frappe diff --git a/frappe/templates/pages/integrations/payment_cancel.py b/frappe/templates/pages/integrations/payment_cancel.py index 0387c9e50a..9c0b972cb2 100644 --- a/frappe/templates/pages/integrations/payment_cancel.py +++ b/frappe/templates/pages/integrations/payment_cancel.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/templates/pages/integrations/payment_success.py b/frappe/templates/pages/integrations/payment_success.py index 1eb9215121..bb584ee577 100644 --- a/frappe/templates/pages/integrations/payment_success.py +++ b/frappe/templates/pages/integrations/payment_success.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe no_cache = True diff --git a/frappe/test_runner.py b/frappe/test_runner.py index ed46c9c071..ecacaa1a89 100644 --- a/frappe/test_runner.py +++ b/frappe/test_runner.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import unittest, json, sys, os import time diff --git a/frappe/tests/test_assign.py b/frappe/tests/test_assign.py index e553fc3f5d..05bf7e2fb3 100644 --- a/frappe/tests/test_assign.py +++ b/frappe/tests/test_assign.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, unittest import frappe.desk.form.assign_to from frappe.desk.listview import get_group_by_count diff --git a/frappe/tests/test_auth.py b/frappe/tests/test_auth.py index b02b53338d..4ab5eaef37 100644 --- a/frappe/tests/test_auth.py +++ b/frappe/tests/test_auth.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import time import unittest diff --git a/frappe/tests/test_bot.py b/frappe/tests/test_bot.py index 4500ab95ac..9d20895338 100644 --- a/frappe/tests/test_bot.py +++ b/frappe/tests/test_bot.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest diff --git a/frappe/tests/test_cors.py b/frappe/tests/test_cors.py index 38c3fd8132..0376531712 100644 --- a/frappe/tests/test_cors.py +++ b/frappe/tests/test_cors.py @@ -1,5 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, unittest from werkzeug.wrappers import Response from frappe.app import process_response diff --git a/frappe/tests/test_db.py b/frappe/tests/test_db.py index 044ce455d9..069ec25cca 100644 --- a/frappe/tests/test_db.py +++ b/frappe/tests/test_db.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest from random import choice @@ -75,7 +75,7 @@ class TestDB(unittest.TestCase): frappe.db.set_value("Print Settings", "Print Settings", fieldname, inp["value"]) self.assertEqual(frappe.db.get_single_value("Print Settings", fieldname), inp["value"]) - #teardown + #teardown clear_custom_fields("Print Settings") def test_log_touched_tables(self): diff --git a/frappe/tests/test_db_query.py b/frappe/tests/test_db_query.py index 3724b46d9d..c18db29259 100644 --- a/frappe/tests/test_db_query.py +++ b/frappe/tests/test_db_query.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, unittest from frappe.model.db_query import DatabaseQuery diff --git a/frappe/tests/test_defaults.py b/frappe/tests/test_defaults.py index d051c0a184..84d482d8ca 100644 --- a/frappe/tests/test_defaults.py +++ b/frappe/tests/test_defaults.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, unittest from frappe.defaults import * diff --git a/frappe/tests/test_document.py b/frappe/tests/test_document.py index 68c19a8bbf..47ad029274 100644 --- a/frappe/tests/test_document.py +++ b/frappe/tests/test_document.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import os import unittest diff --git a/frappe/tests/test_document_locks.py b/frappe/tests/test_document_locks.py index 650a913bee..4173410024 100644 --- a/frappe/tests/test_document_locks.py +++ b/frappe/tests/test_document_locks.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, unittest class TestDocumentLocks(unittest.TestCase): diff --git a/frappe/tests/test_domainification.py b/frappe/tests/test_domainification.py index bc972efe1f..054a9031c3 100644 --- a/frappe/tests/test_domainification.py +++ b/frappe/tests/test_domainification.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest, frappe from frappe.core.page.permission_manager.permission_manager import get_roles_and_doctypes from frappe.desk.doctype.desktop_icon.desktop_icon import (get_desktop_icons, add_user_icon, diff --git a/frappe/tests/test_dynamic_links.py b/frappe/tests/test_dynamic_links.py index 5ca12ddf13..b74c5867ca 100644 --- a/frappe/tests/test_dynamic_links.py +++ b/frappe/tests/test_dynamic_links.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, unittest class TestDynamicLinks(unittest.TestCase): diff --git a/frappe/tests/test_email.py b/frappe/tests/test_email.py index 68ab80cb8b..ef9515f5ba 100644 --- a/frappe/tests/test_email.py +++ b/frappe/tests/test_email.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest, frappe, re, email diff --git a/frappe/tests/test_exporter_fixtures.py b/frappe/tests/test_exporter_fixtures.py index 0893500daf..f1b9e8fa5a 100644 --- a/frappe/tests/test_exporter_fixtures.py +++ b/frappe/tests/test_exporter_fixtures.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import frappe.defaults from frappe.core.doctype.data_import.data_import import export_csv diff --git a/frappe/tests/test_fmt_datetime.py b/frappe/tests/test_fmt_datetime.py index 8f5408948d..ea75747157 100644 --- a/frappe/tests/test_fmt_datetime.py +++ b/frappe/tests/test_fmt_datetime.py @@ -1,5 +1,5 @@ # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import datetime import frappe diff --git a/frappe/tests/test_fmt_money.py b/frappe/tests/test_fmt_money.py index 96f220447a..61a2e8c69e 100644 --- a/frappe/tests/test_fmt_money.py +++ b/frappe/tests/test_fmt_money.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.utils import fmt_money import unittest diff --git a/frappe/tests/test_form_load.py b/frappe/tests/test_form_load.py index dd6ccd9bcd..d59e8f1570 100644 --- a/frappe/tests/test_form_load.py +++ b/frappe/tests/test_form_load.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, unittest from frappe.desk.form.load import getdoctype, getdoc from frappe.core.page.permission_manager.permission_manager import update, reset, add diff --git a/frappe/tests/test_frappe_client.py b/frappe/tests/test_frappe_client.py index d192952e92..66e1160eea 100644 --- a/frappe/tests/test_frappe_client.py +++ b/frappe/tests/test_frappe_client.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest, frappe from frappe.core.doctype.user.user import generate_keys diff --git a/frappe/tests/test_geo_ip.py b/frappe/tests/test_geo_ip.py index f085838f37..b1811917e5 100644 --- a/frappe/tests/test_geo_ip.py +++ b/frappe/tests/test_geo_ip.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest class TestGeoIP(unittest.TestCase): diff --git a/frappe/tests/test_global_search.py b/frappe/tests/test_global_search.py index c227abfb99..41d6427b77 100644 --- a/frappe/tests/test_global_search.py +++ b/frappe/tests/test_global_search.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest import frappe diff --git a/frappe/tests/test_goal.py b/frappe/tests/test_goal.py index 55b1b9aad8..428855ade5 100644 --- a/frappe/tests/test_goal.py +++ b/frappe/tests/test_goal.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest import frappe diff --git a/frappe/tests/test_hooks.py b/frappe/tests/test_hooks.py index 5966db09cb..e172a52828 100644 --- a/frappe/tests/test_hooks.py +++ b/frappe/tests/test_hooks.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest import frappe diff --git a/frappe/tests/test_listview.py b/frappe/tests/test_listview.py index 4efb570e7e..3dbe2f3fa5 100644 --- a/frappe/tests/test_listview.py +++ b/frappe/tests/test_listview.py @@ -1,5 +1,5 @@ # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest import frappe import json diff --git a/frappe/tests/test_monitor.py b/frappe/tests/test_monitor.py index dbc5fe35e1..7b3a6f7147 100644 --- a/frappe/tests/test_monitor.py +++ b/frappe/tests/test_monitor.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest import frappe diff --git a/frappe/tests/test_naming.py b/frappe/tests/test_naming.py index 3a8e2445d7..4435a8bb20 100644 --- a/frappe/tests/test_naming.py +++ b/frappe/tests/test_naming.py @@ -1,5 +1,5 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest import frappe diff --git a/frappe/tests/test_oauth20.py b/frappe/tests/test_oauth20.py index 2a5bed34b3..93daed2bf7 100644 --- a/frappe/tests/test_oauth20.py +++ b/frappe/tests/test_oauth20.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest from urllib.parse import parse_qs, urljoin, urlparse diff --git a/frappe/tests/test_password.py b/frappe/tests/test_password.py index 731841737c..6062a960e6 100644 --- a/frappe/tests/test_password.py +++ b/frappe/tests/test_password.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import unittest from frappe.utils.password import update_password, check_password, passlibctx, encrypt, decrypt @@ -110,7 +110,7 @@ class TestPassword(unittest.TestCase): encrypted_text = encrypt(text, encryption_key=custom_encryption_key) decrypted_text = decrypt(encrypted_text, encryption_key=custom_encryption_key) - + self.assertEqual(text, decrypted_text) pass diff --git a/frappe/tests/test_pdf.py b/frappe/tests/test_pdf.py index 9e22b9ddbf..f23db32845 100644 --- a/frappe/tests/test_pdf.py +++ b/frappe/tests/test_pdf.py @@ -1,5 +1,5 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import io import unittest diff --git a/frappe/tests/test_permissions.py b/frappe/tests/test_permissions.py index 9586660535..48510f55f6 100644 --- a/frappe/tests/test_permissions.py +++ b/frappe/tests/test_permissions.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """Use blog post test to test user permissions logic""" import frappe diff --git a/frappe/tests/test_query_report.py b/frappe/tests/test_query_report.py index 3d9791d399..656894fc9b 100644 --- a/frappe/tests/test_query_report.py +++ b/frappe/tests/test_query_report.py @@ -1,5 +1,5 @@ # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest diff --git a/frappe/tests/test_rate_limiter.py b/frappe/tests/test_rate_limiter.py index 71977935a9..e3a1831159 100644 --- a/frappe/tests/test_rate_limiter.py +++ b/frappe/tests/test_rate_limiter.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest from werkzeug.wrappers import Response diff --git a/frappe/tests/test_recorder.py b/frappe/tests/test_recorder.py index d9386ca25b..9e8b194d72 100644 --- a/frappe/tests/test_recorder.py +++ b/frappe/tests/test_recorder.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest import frappe diff --git a/frappe/tests/test_search.py b/frappe/tests/test_search.py index affaf44466..f644f2dfcc 100644 --- a/frappe/tests/test_search.py +++ b/frappe/tests/test_search.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest import frappe diff --git a/frappe/tests/test_seen.py b/frappe/tests/test_seen.py index 7f4e8719a3..48b6345005 100644 --- a/frappe/tests/test_seen.py +++ b/frappe/tests/test_seen.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, unittest, json class TestSeen(unittest.TestCase): diff --git a/frappe/tests/test_translate.py b/frappe/tests/test_translate.py index 605e704342..9620978c4f 100644 --- a/frappe/tests/test_translate.py +++ b/frappe/tests/test_translate.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import os import unittest from random import choices diff --git a/frappe/tests/test_twofactor.py b/frappe/tests/test_twofactor.py index 7de155bc96..72c29cd47b 100644 --- a/frappe/tests/test_twofactor.py +++ b/frappe/tests/test_twofactor.py @@ -1,5 +1,5 @@ # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest, frappe, pyotp from frappe.auth import HTTPRequest from frappe.utils import cint diff --git a/frappe/tests/test_utils.py b/frappe/tests/test_utils.py index 3033673224..b35d973963 100644 --- a/frappe/tests/test_utils.py +++ b/frappe/tests/test_utils.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import unittest import frappe diff --git a/frappe/tests/tests_geo_utils.py b/frappe/tests/tests_geo_utils.py index e928bc0fef..28b987e21e 100644 --- a/frappe/tests/tests_geo_utils.py +++ b/frappe/tests/tests_geo_utils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import unittest diff --git a/frappe/translate.py b/frappe/translate.py index 102d08bd26..f1dbfdec59 100644 --- a/frappe/translate.py +++ b/frappe/translate.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """ frappe.translate ~~~~~~~~~~~~~~~~ diff --git a/frappe/twofactor.py b/frappe/twofactor.py index b2f562c20d..0df4baec50 100644 --- a/frappe/twofactor.py +++ b/frappe/twofactor.py @@ -1,5 +1,5 @@ # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ import pyotp, os diff --git a/frappe/utils/__init__.py b/frappe/utils/__init__.py index b97585aa04..a90da543f3 100644 --- a/frappe/utils/__init__.py +++ b/frappe/utils/__init__.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import functools import hashlib diff --git a/frappe/utils/backups.py b/frappe/utils/backups.py index f13710dcfe..b2b5ae8237 100644 --- a/frappe/utils/backups.py +++ b/frappe/utils/backups.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE # imports - standard imports import gzip diff --git a/frappe/utils/boilerplate.py b/frappe/utils/boilerplate.py index d88eaa5745..d0dd1669b4 100755 --- a/frappe/utils/boilerplate.py +++ b/frappe/utils/boilerplate.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, os, re, git from frappe.utils import touch_file, cstr diff --git a/frappe/utils/bot.py b/frappe/utils/bot.py index c75b48ab49..d077847e25 100644 --- a/frappe/utils/bot.py +++ b/frappe/utils/bot.py @@ -1,5 +1,5 @@ # Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe, re, frappe.utils from frappe.desk.notifications import get_notifications diff --git a/frappe/utils/change_log.py b/frappe/utils/change_log.py index ddd11265eb..109778b87b 100644 --- a/frappe/utils/change_log.py +++ b/frappe/utils/change_log.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import json import os diff --git a/frappe/utils/csvutils.py b/frappe/utils/csvutils.py index 69b7f6f2d3..e26da3da1c 100644 --- a/frappe/utils/csvutils.py +++ b/frappe/utils/csvutils.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import msgprint, _ import json diff --git a/frappe/utils/dashboard.py b/frappe/utils/dashboard.py index ad61486113..3b5378ef90 100644 --- a/frappe/utils/dashboard.py +++ b/frappe/utils/dashboard.py @@ -1,5 +1,5 @@ # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ from functools import wraps diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 5a7328b07e..950a3662af 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from typing import Optional import frappe diff --git a/frappe/utils/dateutils.py b/frappe/utils/dateutils.py index 2c2537da5f..2aa8ab664d 100644 --- a/frappe/utils/dateutils.py +++ b/frappe/utils/dateutils.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import frappe.defaults diff --git a/frappe/utils/error.py b/frappe/utils/error.py index 05b578d7e8..c38b320d98 100644 --- a/frappe/utils/error.py +++ b/frappe/utils/error.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Maxwell Morais and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import os import sys diff --git a/frappe/utils/file_lock.py b/frappe/utils/file_lock.py index 8c65dd32ce..9ffe5150fc 100644 --- a/frappe/utils/file_lock.py +++ b/frappe/utils/file_lock.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE ''' File based locking utility diff --git a/frappe/utils/file_manager.py b/frappe/utils/file_manager.py index b1e088d641..1157ee03b2 100644 --- a/frappe/utils/file_manager.py +++ b/frappe/utils/file_manager.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import os, base64, re, json diff --git a/frappe/utils/fixtures.py b/frappe/utils/fixtures.py index 895a3c8373..fe05a4dc30 100644 --- a/frappe/utils/fixtures.py +++ b/frappe/utils/fixtures.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import os diff --git a/frappe/utils/formatters.py b/frappe/utils/formatters.py index cca2b4f1ba..9436dea2c2 100644 --- a/frappe/utils/formatters.py +++ b/frappe/utils/formatters.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import datetime diff --git a/frappe/utils/image.py b/frappe/utils/image.py index 88d885e442..fcde948f6c 100644 --- a/frappe/utils/image.py +++ b/frappe/utils/image.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import os from PIL import Image import io diff --git a/frappe/utils/install.py b/frappe/utils/install.py index 3d6a2fed97..1cc94a68d6 100644 --- a/frappe/utils/install.py +++ b/frappe/utils/install.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import getpass from frappe.utils.password import update_password diff --git a/frappe/utils/jinja.py b/frappe/utils/jinja.py index 65ea2c20b8..12d00a78d8 100644 --- a/frappe/utils/jinja.py +++ b/frappe/utils/jinja.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE def get_jenv(): import frappe from frappe.utils.safe_exec import get_safe_globals diff --git a/frappe/utils/jinja_globals.py b/frappe/utils/jinja_globals.py index 67ca9d108a..2e3f9db592 100644 --- a/frappe/utils/jinja_globals.py +++ b/frappe/utils/jinja_globals.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE def resolve_class(classes): diff --git a/frappe/utils/nestedset.py b/frappe/utils/nestedset.py index 4a65140449..836d735439 100644 --- a/frappe/utils/nestedset.py +++ b/frappe/utils/nestedset.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE # Tree (Hierarchical) Nested Set Model (nsm) # diff --git a/frappe/utils/oauth.py b/frappe/utils/oauth.py index 9f5ff9d360..c28663d138 100644 --- a/frappe/utils/oauth.py +++ b/frappe/utils/oauth.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import frappe.utils diff --git a/frappe/utils/password.py b/frappe/utils/password.py index a097c58b31..8f1670e9bd 100644 --- a/frappe/utils/password.py +++ b/frappe/utils/password.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import string import frappe diff --git a/frappe/utils/password_strength.py b/frappe/utils/password_strength.py index 3959d8c3dd..fdfa2054ba 100644 --- a/frappe/utils/password_strength.py +++ b/frappe/utils/password_strength.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE try: from zxcvbn import zxcvbn diff --git a/frappe/utils/pdf.py b/frappe/utils/pdf.py index fc82bc2749..90bb4f63de 100644 --- a/frappe/utils/pdf.py +++ b/frappe/utils/pdf.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import io import os import re diff --git a/frappe/utils/redis_wrapper.py b/frappe/utils/redis_wrapper.py index 8a7ff8334b..dac9ab7a6d 100644 --- a/frappe/utils/redis_wrapper.py +++ b/frappe/utils/redis_wrapper.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import pickle import re diff --git a/frappe/utils/response.py b/frappe/utils/response.py index ca04f6def4..d7119ebe3b 100644 --- a/frappe/utils/response.py +++ b/frappe/utils/response.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import json import datetime diff --git a/frappe/utils/scheduler.py b/frappe/utils/scheduler.py index 0bfc50eab5..43580c1287 100755 --- a/frappe/utils/scheduler.py +++ b/frappe/utils/scheduler.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE """ Events: always diff --git a/frappe/utils/testutils.py b/frappe/utils/testutils.py index 9a2b2da791..6fec393eb2 100644 --- a/frappe/utils/testutils.py +++ b/frappe/utils/testutils.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe def add_custom_field(doctype, fieldname, fieldtype='Data', options=None): diff --git a/frappe/utils/user.py b/frappe/utils/user.py index fe768c28c5..377b7555bc 100755 --- a/frappe/utils/user.py +++ b/frappe/utils/user.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, json from frappe import _dict diff --git a/frappe/utils/verified_command.py b/frappe/utils/verified_command.py index 4b038b88c3..582e0226aa 100644 --- a/frappe/utils/verified_command.py +++ b/frappe/utils/verified_command.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import hmac, hashlib from urllib.parse import urlencode from frappe import _ diff --git a/frappe/utils/xlsxutils.py b/frappe/utils/xlsxutils.py index 356e2ddfdb..3f3ba94b19 100644 --- a/frappe/utils/xlsxutils.py +++ b/frappe/utils/xlsxutils.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import re from io import BytesIO diff --git a/frappe/website/__init__.py b/frappe/website/__init__.py index f064a66c17..98029dd956 100644 --- a/frappe/website/__init__.py +++ b/frappe/website/__init__.py @@ -1,2 +1,2 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/website/doctype/about_us_settings/about_us_settings.py b/frappe/website/doctype/about_us_settings/about_us_settings.py index 1d45adeb42..0b9458323f 100644 --- a/frappe/website/doctype/about_us_settings/about_us_settings.py +++ b/frappe/website/doctype/about_us_settings/about_us_settings.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/website/doctype/about_us_settings/test_about_us_settings.py b/frappe/website/doctype/about_us_settings/test_about_us_settings.py index ab47505fb1..17dbb2c9a8 100644 --- a/frappe/website/doctype/about_us_settings/test_about_us_settings.py +++ b/frappe/website/doctype/about_us_settings/test_about_us_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/website/doctype/about_us_team_member/about_us_team_member.py b/frappe/website/doctype/about_us_team_member/about_us_team_member.py index 864b6a3e81..b9a003073a 100644 --- a/frappe/website/doctype/about_us_team_member/about_us_team_member.py +++ b/frappe/website/doctype/about_us_team_member/about_us_team_member.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/website/doctype/blog_category/blog_category.py b/frappe/website/doctype/blog_category/blog_category.py index d7eb92ca7a..3f8cbad85e 100644 --- a/frappe/website/doctype/blog_category/blog_category.py +++ b/frappe/website/doctype/blog_category/blog_category.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from frappe.website.website_generator import WebsiteGenerator from frappe.website.utils import clear_cache diff --git a/frappe/website/doctype/blog_category/test_blog_category.py b/frappe/website/doctype/blog_category/test_blog_category.py index d9093e76f0..495473856a 100644 --- a/frappe/website/doctype/blog_category/test_blog_category.py +++ b/frappe/website/doctype/blog_category/test_blog_category.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/website/doctype/blog_post/blog_post.py b/frappe/website/doctype/blog_post/blog_post.py index cb887a2ffc..817408ab3a 100644 --- a/frappe/website/doctype/blog_post/blog_post.py +++ b/frappe/website/doctype/blog_post/blog_post.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/website/doctype/blog_post/test_blog_post.py b/frappe/website/doctype/blog_post/test_blog_post.py index 3d6bd735ae..7a09d0a3ca 100644 --- a/frappe/website/doctype/blog_post/test_blog_post.py +++ b/frappe/website/doctype/blog_post/test_blog_post.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import unittest from bs4 import BeautifulSoup diff --git a/frappe/website/doctype/blog_settings/blog_settings.py b/frappe/website/doctype/blog_settings/blog_settings.py index 3f730252db..dadabc8f11 100644 --- a/frappe/website/doctype/blog_settings/blog_settings.py +++ b/frappe/website/doctype/blog_settings/blog_settings.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/website/doctype/blog_settings/test_blog_settings.py b/frappe/website/doctype/blog_settings/test_blog_settings.py index 6b03ab88d9..b7659d58a4 100644 --- a/frappe/website/doctype/blog_settings/test_blog_settings.py +++ b/frappe/website/doctype/blog_settings/test_blog_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/website/doctype/blogger/blogger.py b/frappe/website/doctype/blogger/blogger.py index 77e7a6e7a1..fb1c3e2831 100644 --- a/frappe/website/doctype/blogger/blogger.py +++ b/frappe/website/doctype/blogger/blogger.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/website/doctype/blogger/test_blogger.py b/frappe/website/doctype/blogger/test_blogger.py index f121859cbb..68d7311906 100644 --- a/frappe/website/doctype/blogger/test_blogger.py +++ b/frappe/website/doctype/blogger/test_blogger.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe test_records = frappe.get_test_records('Blogger') \ No newline at end of file diff --git a/frappe/website/doctype/color/color.py b/frappe/website/doctype/color/color.py index 080e51e406..888ad5dd69 100644 --- a/frappe/website/doctype/color/color.py +++ b/frappe/website/doctype/color/color.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/color/test_color.py b/frappe/website/doctype/color/test_color.py index 99e4310a1c..300fce61a9 100644 --- a/frappe/website/doctype/color/test_color.py +++ b/frappe/website/doctype/color/test_color.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/website/doctype/company_history/company_history.py b/frappe/website/doctype/company_history/company_history.py index 128aefe636..f161952dba 100644 --- a/frappe/website/doctype/company_history/company_history.py +++ b/frappe/website/doctype/company_history/company_history.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/website/doctype/contact_us_settings/contact_us_settings.py b/frappe/website/doctype/contact_us_settings/contact_us_settings.py index 50dc13039d..1fce8377d4 100644 --- a/frappe/website/doctype/contact_us_settings/contact_us_settings.py +++ b/frappe/website/doctype/contact_us_settings/contact_us_settings.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/website/doctype/help_article/help_article.py b/frappe/website/doctype/help_article/help_article.py index be5c9d00b7..ba6f79f0b9 100644 --- a/frappe/website/doctype/help_article/help_article.py +++ b/frappe/website/doctype/help_article/help_article.py @@ -1,5 +1,5 @@ # Copyright (c) 2013, Frappe and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.website.website_generator import WebsiteGenerator diff --git a/frappe/website/doctype/help_article/test_help_article.py b/frappe/website/doctype/help_article/test_help_article.py index a1a0a59a24..ef988544e0 100644 --- a/frappe/website/doctype/help_article/test_help_article.py +++ b/frappe/website/doctype/help_article/test_help_article.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/website/doctype/help_category/help_category.py b/frappe/website/doctype/help_category/help_category.py index 912c1f568e..69e15029a8 100644 --- a/frappe/website/doctype/help_category/help_category.py +++ b/frappe/website/doctype/help_category/help_category.py @@ -1,5 +1,5 @@ # Copyright (c) 2013, Frappe and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.website.website_generator import WebsiteGenerator diff --git a/frappe/website/doctype/help_category/test_help_category.py b/frappe/website/doctype/help_category/test_help_category.py index 68fcbd2872..e7b603561a 100644 --- a/frappe/website/doctype/help_category/test_help_category.py +++ b/frappe/website/doctype/help_category/test_help_category.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/website/doctype/personal_data_deletion_request/personal_data_deletion_request.py b/frappe/website/doctype/personal_data_deletion_request/personal_data_deletion_request.py index 63ba96d138..8a72fa269f 100644 --- a/frappe/website/doctype/personal_data_deletion_request/personal_data_deletion_request.py +++ b/frappe/website/doctype/personal_data_deletion_request/personal_data_deletion_request.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import re diff --git a/frappe/website/doctype/personal_data_deletion_request/test_personal_data_deletion_request.py b/frappe/website/doctype/personal_data_deletion_request/test_personal_data_deletion_request.py index 606e5aad34..240e37adef 100644 --- a/frappe/website/doctype/personal_data_deletion_request/test_personal_data_deletion_request.py +++ b/frappe/website/doctype/personal_data_deletion_request/test_personal_data_deletion_request.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest from frappe.website.doctype.personal_data_deletion_request.personal_data_deletion_request import ( diff --git a/frappe/website/doctype/personal_data_deletion_step/personal_data_deletion_step.py b/frappe/website/doctype/personal_data_deletion_step/personal_data_deletion_step.py index 7cd1277f6c..6259f70a24 100644 --- a/frappe/website/doctype/personal_data_deletion_step/personal_data_deletion_step.py +++ b/frappe/website/doctype/personal_data_deletion_step/personal_data_deletion_step.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/personal_data_download_request/personal_data_download_request.py b/frappe/website/doctype/personal_data_download_request/personal_data_download_request.py index e74e8190c4..845d28ba6e 100644 --- a/frappe/website/doctype/personal_data_download_request/personal_data_download_request.py +++ b/frappe/website/doctype/personal_data_download_request/personal_data_download_request.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe import json diff --git a/frappe/website/doctype/personal_data_download_request/test_personal_data_download_request.py b/frappe/website/doctype/personal_data_download_request/test_personal_data_download_request.py index 2efac5af12..e038279437 100644 --- a/frappe/website/doctype/personal_data_download_request/test_personal_data_download_request.py +++ b/frappe/website/doctype/personal_data_download_request/test_personal_data_download_request.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest import json diff --git a/frappe/website/doctype/portal_menu_item/portal_menu_item.py b/frappe/website/doctype/portal_menu_item/portal_menu_item.py index 5effb3a195..fadd3e276a 100644 --- a/frappe/website/doctype/portal_menu_item/portal_menu_item.py +++ b/frappe/website/doctype/portal_menu_item/portal_menu_item.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/portal_settings/portal_settings.py b/frappe/website/doctype/portal_settings/portal_settings.py index 1f339130e8..315c7aaf15 100644 --- a/frappe/website/doctype/portal_settings/portal_settings.py +++ b/frappe/website/doctype/portal_settings/portal_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/portal_settings/test_portal_settings.py b/frappe/website/doctype/portal_settings/test_portal_settings.py index 40f6eaac2c..3945ac04ec 100644 --- a/frappe/website/doctype/portal_settings/test_portal_settings.py +++ b/frappe/website/doctype/portal_settings/test_portal_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/website/doctype/social_link_settings/social_link_settings.py b/frappe/website/doctype/social_link_settings/social_link_settings.py index 093a21ea10..11777d3eba 100644 --- a/frappe/website/doctype/social_link_settings/social_link_settings.py +++ b/frappe/website/doctype/social_link_settings/social_link_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/top_bar_item/top_bar_item.py b/frappe/website/doctype/top_bar_item/top_bar_item.py index 14e579dae2..8896aa404b 100644 --- a/frappe/website/doctype/top_bar_item/top_bar_item.py +++ b/frappe/website/doctype/top_bar_item/top_bar_item.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/website/doctype/web_form/test_web_form.py b/frappe/website/doctype/web_form/test_web_form.py index 603b0c9df7..befad6a783 100644 --- a/frappe/website/doctype/web_form/test_web_form.py +++ b/frappe/website/doctype/web_form/test_web_form.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest, json diff --git a/frappe/website/doctype/web_form/web_form.py b/frappe/website/doctype/web_form/web_form.py index 32f7e030a6..bd14125403 100644 --- a/frappe/website/doctype/web_form/web_form.py +++ b/frappe/website/doctype/web_form/web_form.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import json import os diff --git a/frappe/website/doctype/web_form_field/web_form_field.py b/frappe/website/doctype/web_form_field/web_form_field.py index 44005d27e3..342b329164 100644 --- a/frappe/website/doctype/web_form_field/web_form_field.py +++ b/frappe/website/doctype/web_form_field/web_form_field.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/web_page/web_page.py b/frappe/website/doctype/web_page/web_page.py index 05f5cac546..3ce266dfdd 100644 --- a/frappe/website/doctype/web_page/web_page.py +++ b/frappe/website/doctype/web_page/web_page.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import re diff --git a/frappe/website/doctype/web_page_block/web_page_block.py b/frappe/website/doctype/web_page_block/web_page_block.py index 77e7dec155..790ab98b6a 100644 --- a/frappe/website/doctype/web_page_block/web_page_block.py +++ b/frappe/website/doctype/web_page_block/web_page_block.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/web_page_view/test_web_page_view.py b/frappe/website/doctype/web_page_view/test_web_page_view.py index c3d05fcaab..e0e571a25c 100644 --- a/frappe/website/doctype/web_page_view/test_web_page_view.py +++ b/frappe/website/doctype/web_page_view/test_web_page_view.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/website/doctype/web_page_view/web_page_view.py b/frappe/website/doctype/web_page_view/web_page_view.py index e679b58043..cd6b4ba940 100644 --- a/frappe/website/doctype/web_page_view/web_page_view.py +++ b/frappe/website/doctype/web_page_view/web_page_view.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/web_template/test_web_template.py b/frappe/website/doctype/web_template/test_web_template.py index 2f2dbdc40a..9789fbd13e 100644 --- a/frappe/website/doctype/web_template/test_web_template.py +++ b/frappe/website/doctype/web_template/test_web_template.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest from bs4 import BeautifulSoup diff --git a/frappe/website/doctype/web_template/web_template.py b/frappe/website/doctype/web_template/web_template.py index 6905680523..b7cc6f3caa 100644 --- a/frappe/website/doctype/web_template/web_template.py +++ b/frappe/website/doctype/web_template/web_template.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import os from shutil import rmtree diff --git a/frappe/website/doctype/web_template_field/test_web_template_field.py b/frappe/website/doctype/web_template_field/test_web_template_field.py index 5628da37db..33f2d5545c 100644 --- a/frappe/website/doctype/web_template_field/test_web_template_field.py +++ b/frappe/website/doctype/web_template_field/test_web_template_field.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/website/doctype/web_template_field/web_template_field.py b/frappe/website/doctype/web_template_field/web_template_field.py index 8270ac7845..01b3346911 100644 --- a/frappe/website/doctype/web_template_field/web_template_field.py +++ b/frappe/website/doctype/web_template_field/web_template_field.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/website_meta_tag/website_meta_tag.py b/frappe/website/doctype/website_meta_tag/website_meta_tag.py index 0856440663..e02da067ec 100644 --- a/frappe/website/doctype/website_meta_tag/website_meta_tag.py +++ b/frappe/website/doctype/website_meta_tag/website_meta_tag.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/website_route_meta/test_website_route_meta.py b/frappe/website/doctype/website_route_meta/test_website_route_meta.py index c55dcce1ca..627e7dd1cd 100644 --- a/frappe/website/doctype/website_route_meta/test_website_route_meta.py +++ b/frappe/website/doctype/website_route_meta/test_website_route_meta.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest from frappe.utils import set_request diff --git a/frappe/website/doctype/website_route_meta/website_route_meta.py b/frappe/website/doctype/website_route_meta/website_route_meta.py index 78d440a1a1..2800a1a02b 100644 --- a/frappe/website/doctype/website_route_meta/website_route_meta.py +++ b/frappe/website/doctype/website_route_meta/website_route_meta.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/website/doctype/website_route_redirect/website_route_redirect.py b/frappe/website/doctype/website_route_redirect/website_route_redirect.py index f721ab81cb..b285a172bc 100644 --- a/frappe/website/doctype/website_route_redirect/website_route_redirect.py +++ b/frappe/website/doctype/website_route_redirect/website_route_redirect.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/website_script/website_script.py b/frappe/website/doctype/website_script/website_script.py index 6ec10291cd..340f15bb61 100644 --- a/frappe/website/doctype/website_script/website_script.py +++ b/frappe/website/doctype/website_script/website_script.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/website/doctype/website_settings/google_indexing.py b/frappe/website/doctype/website_settings/google_indexing.py index 75095bd7df..e99152d6ae 100644 --- a/frappe/website/doctype/website_settings/google_indexing.py +++ b/frappe/website/doctype/website_settings/google_indexing.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from urllib.parse import quote diff --git a/frappe/website/doctype/website_settings/test_website_settings.py b/frappe/website/doctype/website_settings/test_website_settings.py index f7bf9d3bf1..28629716b3 100644 --- a/frappe/website/doctype/website_settings/test_website_settings.py +++ b/frappe/website/doctype/website_settings/test_website_settings.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/website/doctype/website_settings/website_settings.py b/frappe/website/doctype/website_settings/website_settings.py index cf45a94459..dfe0574e80 100644 --- a/frappe/website/doctype/website_settings/website_settings.py +++ b/frappe/website/doctype/website_settings/website_settings.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from urllib.parse import quote import frappe diff --git a/frappe/website/doctype/website_sidebar/test_website_sidebar.py b/frappe/website/doctype/website_sidebar/test_website_sidebar.py index bfaee51169..a92cb04568 100644 --- a/frappe/website/doctype/website_sidebar/test_website_sidebar.py +++ b/frappe/website/doctype/website_sidebar/test_website_sidebar.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/website/doctype/website_sidebar/website_sidebar.py b/frappe/website/doctype/website_sidebar/website_sidebar.py index f8a431ac15..d1f3915752 100644 --- a/frappe/website/doctype/website_sidebar/website_sidebar.py +++ b/frappe/website/doctype/website_sidebar/website_sidebar.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/website_sidebar_item/website_sidebar_item.py b/frappe/website/doctype/website_sidebar_item/website_sidebar_item.py index f4d88e3259..43d3a10508 100644 --- a/frappe/website/doctype/website_sidebar_item/website_sidebar_item.py +++ b/frappe/website/doctype/website_sidebar_item/website_sidebar_item.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/website/doctype/website_slideshow/test_website_slideshow.py b/frappe/website/doctype/website_slideshow/test_website_slideshow.py index 5e3ca3c617..d8683a7cda 100644 --- a/frappe/website/doctype/website_slideshow/test_website_slideshow.py +++ b/frappe/website/doctype/website_slideshow/test_website_slideshow.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest diff --git a/frappe/website/doctype/website_slideshow/website_slideshow.py b/frappe/website/doctype/website_slideshow/website_slideshow.py index 8566475b33..0959680872 100644 --- a/frappe/website/doctype/website_slideshow/website_slideshow.py +++ b/frappe/website/doctype/website_slideshow/website_slideshow.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/website/doctype/website_slideshow_item/website_slideshow_item.py b/frappe/website/doctype/website_slideshow_item/website_slideshow_item.py index beaa9ecf9e..cc58596af9 100644 --- a/frappe/website/doctype/website_slideshow_item/website_slideshow_item.py +++ b/frappe/website/doctype/website_slideshow_item/website_slideshow_item.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/website/doctype/website_theme/test_website_theme.py b/frappe/website/doctype/website_theme/test_website_theme.py index 4ff4e269da..926a9d3bc3 100644 --- a/frappe/website/doctype/website_theme/test_website_theme.py +++ b/frappe/website/doctype/website_theme/test_website_theme.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import os import frappe diff --git a/frappe/website/doctype/website_theme/website_theme.py b/frappe/website/doctype/website_theme/website_theme.py index 248c4bc176..f5b0b04487 100644 --- a/frappe/website/doctype/website_theme/website_theme.py +++ b/frappe/website/doctype/website_theme/website_theme.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/website/doctype/website_theme_ignore_app/website_theme_ignore_app.py b/frappe/website/doctype/website_theme_ignore_app/website_theme_ignore_app.py index ec232c0c79..99e523cf16 100644 --- a/frappe/website/doctype/website_theme_ignore_app/website_theme_ignore_app.py +++ b/frappe/website/doctype/website_theme_ignore_app/website_theme_ignore_app.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE # import frappe from frappe.model.document import Document diff --git a/frappe/website/report/website_analytics/website_analytics.py b/frappe/website/report/website_analytics/website_analytics.py index b4e76ba9fd..028bbe14a7 100644 --- a/frappe/website/report/website_analytics/website_analytics.py +++ b/frappe/website/report/website_analytics/website_analytics.py @@ -1,5 +1,5 @@ # Copyright (c) 2013, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from datetime import datetime diff --git a/frappe/website/router.py b/frappe/website/router.py index 9809a73e48..eb3e77a0a2 100644 --- a/frappe/website/router.py +++ b/frappe/website/router.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import io import os diff --git a/frappe/website/utils.py b/frappe/website/utils.py index 472e86d8f5..869c82b917 100644 --- a/frappe/website/utils.py +++ b/frappe/website/utils.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import json import mimetypes import os diff --git a/frappe/website/website_generator.py b/frappe/website/website_generator.py index 3afe486944..e66496aa89 100644 --- a/frappe/website/website_generator.py +++ b/frappe/website/website_generator.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/workflow/doctype/workflow/__init__.py b/frappe/workflow/doctype/workflow/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/workflow/doctype/workflow/__init__.py +++ b/frappe/workflow/doctype/workflow/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/workflow/doctype/workflow/test_workflow.py b/frappe/workflow/doctype/workflow/test_workflow.py index fb19352c67..d2d85e696b 100644 --- a/frappe/workflow/doctype/workflow/test_workflow.py +++ b/frappe/workflow/doctype/workflow/test_workflow.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt +# License: MIT. See LICENSE import frappe import unittest from frappe.utils import random_string diff --git a/frappe/workflow/doctype/workflow/workflow.py b/frappe/workflow/doctype/workflow/workflow.py index 4959ee5639..4a8ae05e6b 100644 --- a/frappe/workflow/doctype/workflow/workflow.py +++ b/frappe/workflow/doctype/workflow/workflow.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/workflow/doctype/workflow_action/__init__.py b/frappe/workflow/doctype/workflow_action/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/workflow/doctype/workflow_action/__init__.py +++ b/frappe/workflow/doctype/workflow_action/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/workflow/doctype/workflow_action/test_workflow_action.py b/frappe/workflow/doctype/workflow_action/test_workflow_action.py index a2f4f26193..bbd027ba12 100644 --- a/frappe/workflow/doctype/workflow_action/test_workflow_action.py +++ b/frappe/workflow/doctype/workflow_action/test_workflow_action.py @@ -1,5 +1,5 @@ # Copyright (c) 2021, Frappe Technologies and Contributors -# See license.txt +# License: MIT. See LICENSE # import frappe import unittest diff --git a/frappe/workflow/doctype/workflow_action/workflow_action.py b/frappe/workflow/doctype/workflow_action/workflow_action.py index 5eedc27d9c..a04e9356cd 100644 --- a/frappe/workflow/doctype/workflow_action/workflow_action.py +++ b/frappe/workflow/doctype/workflow_action/workflow_action.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.model.document import Document diff --git a/frappe/workflow/doctype/workflow_action_master/workflow_action_master.py b/frappe/workflow/doctype/workflow_action_master/workflow_action_master.py index b438a708dc..3f71fb7fe8 100644 --- a/frappe/workflow/doctype/workflow_action_master/workflow_action_master.py +++ b/frappe/workflow/doctype/workflow_action_master/workflow_action_master.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors -# For license information, please see license.txt +# License: MIT. See LICENSE from frappe.model.document import Document diff --git a/frappe/workflow/doctype/workflow_document_state/__init__.py b/frappe/workflow/doctype/workflow_document_state/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/workflow/doctype/workflow_document_state/__init__.py +++ b/frappe/workflow/doctype/workflow_document_state/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/workflow/doctype/workflow_document_state/workflow_document_state.py b/frappe/workflow/doctype/workflow_document_state/workflow_document_state.py index ae7372f5c2..2764036614 100644 --- a/frappe/workflow/doctype/workflow_document_state/workflow_document_state.py +++ b/frappe/workflow/doctype/workflow_document_state/workflow_document_state.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/workflow/doctype/workflow_state/__init__.py b/frappe/workflow/doctype/workflow_state/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/workflow/doctype/workflow_state/__init__.py +++ b/frappe/workflow/doctype/workflow_state/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/workflow/doctype/workflow_state/test_workflow_state.py b/frappe/workflow/doctype/workflow_state/test_workflow_state.py index eeb0807d52..f38461c1a7 100644 --- a/frappe/workflow/doctype/workflow_state/test_workflow_state.py +++ b/frappe/workflow/doctype/workflow_state/test_workflow_state.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe test_records = frappe.get_test_records('Workflow State') \ No newline at end of file diff --git a/frappe/workflow/doctype/workflow_state/workflow_state.py b/frappe/workflow/doctype/workflow_state/workflow_state.py index 40f7d370dd..495876bddb 100644 --- a/frappe/workflow/doctype/workflow_state/workflow_state.py +++ b/frappe/workflow/doctype/workflow_state/workflow_state.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/workflow/doctype/workflow_transition/__init__.py b/frappe/workflow/doctype/workflow_transition/__init__.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/workflow/doctype/workflow_transition/__init__.py +++ b/frappe/workflow/doctype/workflow_transition/__init__.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/workflow/doctype/workflow_transition/workflow_transition.py b/frappe/workflow/doctype/workflow_transition/workflow_transition.py index e49a90f9d6..5043b765a9 100644 --- a/frappe/workflow/doctype/workflow_transition/workflow_transition.py +++ b/frappe/workflow/doctype/workflow_transition/workflow_transition.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/www/404.py b/frappe/www/404.py index 1e6bdc177d..d2a5eeb700 100644 --- a/frappe/www/404.py +++ b/frappe/www/404.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE def get_context(context): context.http_status_code = 404 diff --git a/frappe/www/about.py b/frappe/www/about.py index 05fe34b162..7c33ed0140 100644 --- a/frappe/www/about.py +++ b/frappe/www/about.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/www/app.py b/frappe/www/app.py index acf6dde000..92107816c7 100644 --- a/frappe/www/app.py +++ b/frappe/www/app.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE no_cache = 1 import os, re diff --git a/frappe/www/complete_signup.py b/frappe/www/complete_signup.py index 0e57cb68c3..eb5ba62e5c 100644 --- a/frappe/www/complete_signup.py +++ b/frappe/www/complete_signup.py @@ -1,3 +1,3 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE diff --git a/frappe/www/contact.py b/frappe/www/contact.py index 53b0666be8..2caf69a53a 100644 --- a/frappe/www/contact.py +++ b/frappe/www/contact.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.utils import now diff --git a/frappe/www/error.py b/frappe/www/error.py index 11151ef766..e535bebe12 100644 --- a/frappe/www/error.py +++ b/frappe/www/error.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe no_cache = 1 diff --git a/frappe/www/list.py b/frappe/www/list.py index 5e4e491c80..6462c2914a 100644 --- a/frappe/www/list.py +++ b/frappe/www/list.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, json from frappe.utils import cint, quoted diff --git a/frappe/www/login.py b/frappe/www/login.py index f816b2f91e..261e4d72af 100644 --- a/frappe/www/login.py +++ b/frappe/www/login.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe import frappe.utils diff --git a/frappe/www/me.py b/frappe/www/me.py index f8356b6d07..fbb6d53ac6 100644 --- a/frappe/www/me.py +++ b/frappe/www/me.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/www/message.py b/frappe/www/message.py index db9479fea1..b73f162dcf 100644 --- a/frappe/www/message.py +++ b/frappe/www/message.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe diff --git a/frappe/www/printview.py b/frappe/www/printview.py index cdf47790eb..569ebe27d6 100644 --- a/frappe/www/printview.py +++ b/frappe/www/printview.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe, os, copy, json, re from frappe import _ diff --git a/frappe/www/profile.py b/frappe/www/profile.py index 7db7beb7d8..32a5239318 100644 --- a/frappe/www/profile.py +++ b/frappe/www/profile.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE no_cache = 1 diff --git a/frappe/www/qrcode.py b/frappe/www/qrcode.py index 37ee204925..d02525846d 100644 --- a/frappe/www/qrcode.py +++ b/frappe/www/qrcode.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe import _ diff --git a/frappe/www/rss.py b/frappe/www/rss.py index 8a1a38dabb..093cdf2d19 100644 --- a/frappe/www/rss.py +++ b/frappe/www/rss.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.utils import escape_html, get_request_site_address, now, cstr diff --git a/frappe/www/sitemap.py b/frappe/www/sitemap.py index e56dd59ebc..d2fbdc434d 100644 --- a/frappe/www/sitemap.py +++ b/frappe/www/sitemap.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from urllib.parse import quote diff --git a/frappe/www/update_password.py b/frappe/www/update_password.py index 4c7d3d5401..abba3234a8 100644 --- a/frappe/www/update_password.py +++ b/frappe/www/update_password.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE from frappe import _ no_cache = 1 diff --git a/frappe/www/website_script.py b/frappe/www/website_script.py index 04f154db43..8fe81dc591 100644 --- a/frappe/www/website_script.py +++ b/frappe/www/website_script.py @@ -1,5 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# MIT License. See license.txt +# License: MIT. See LICENSE import frappe from frappe.utils import strip From 816dd709f43f12751318b719f709b863b8de3bfc Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 3 Sep 2021 12:12:11 +0530 Subject: [PATCH 40/58] chore: Ignore updating license header from blame This adds the previous style changes in the license header (for consistency) in the ignore-revs file --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 4faece896a..f02694846d 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -10,3 +10,6 @@ # Replace use of Class.extend with native JS class fe20515c23a3ac41f1092bf0eaf0a0a452ec2e85 + +# Updating license headers +34460265554242a8d05fb09f049033b1117e1a2b From cce3a381fce5380fc94ac77536a9d899193b3d6e Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 3 Sep 2021 12:19:15 +0530 Subject: [PATCH 41/58] chore: Update copyright until date to 2021 INAL but this date range is purely decorational. If the date hasnt been updated in a while, doesn't really matter AFAIK. MIT license and copyright is still under effect if the license exists in the published source --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 5dfc0fd5bd..6919960f8b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2016-2018 Frappe Technologies Pvt. Ltd. +Copyright (c) 2016-2021 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 From b20e543de91cf49c5df9d9967b97dc92bcc47524 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Fri, 3 Sep 2021 16:55:44 +0530 Subject: [PATCH 42/58] test: test hook to get website_list_context --- frappe/tests/test_webform.py | 67 +++++++++++++++++++++++++++++++ frappe/www/_test/_test_webform.py | 6 +++ 2 files changed, 73 insertions(+) create mode 100644 frappe/tests/test_webform.py create mode 100644 frappe/www/_test/_test_webform.py diff --git a/frappe/tests/test_webform.py b/frappe/tests/test_webform.py new file mode 100644 index 0000000000..92dc441bdf --- /dev/null +++ b/frappe/tests/test_webform.py @@ -0,0 +1,67 @@ +import unittest + +import frappe +from frappe.www.list import get_list_context + + +class TestWebsite(unittest.TestCase): + def test_get_context_hook_of_webform(self): + create_custom_doctype() + create_webform() + + # check context for apps without any hook + context_list = get_list_context("", "Custom Doctype", "test-webform") + self.assertFalse(context_list) + + # create a hook to get webform_context + set_webform_hook( + "webform_list_context", + "frappe.www._test._test_webform.webform_list_context", + ) + # check context for apps with hook + context_list = get_list_context("", "Custom Doctype", "test-webform") + self.assertTrue(context_list) + + +def create_custom_doctype(): + frappe.get_doc( + { + "doctype": "DocType", + "name": "Custom Doctype", + "module": "Core", + "custom": 1, + "fields": [{"label": "Title", "fieldname": "title", "fieldtype": "Data"}], + } + ).insert(ignore_if_duplicate=True) + + +def create_webform(): + frappe.get_doc( + { + "doctype": "Web Form", + "module": "Core", + "title": "Test Webform", + "route": "test-webform", + "doc_type": "Custom Doctype", + "web_form_fields": [ + { + "doctype": "Web Form Field", + "fieldname": "title", + "fieldtype": "Data", + "label": "Title", + } + ], + } + ).insert(ignore_if_duplicate=True) + + +def set_webform_hook(key, value): + from frappe import hooks + + # reset hooks + for hook in "webform_list_context": + if hasattr(hooks, hook): + delattr(hooks, hook) + + setattr(hooks, key, value) + frappe.cache().delete_key("app_hooks") diff --git a/frappe/www/_test/_test_webform.py b/frappe/www/_test/_test_webform.py new file mode 100644 index 0000000000..3209e3e03c --- /dev/null +++ b/frappe/www/_test/_test_webform.py @@ -0,0 +1,6 @@ +def webform_list_context(module): + return {"get_list": get_webform_context_list} + + +def get_webform_context_list(): + pass From 20dea906706180afe8461e38a9978edea3ea11ef Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Sun, 5 Sep 2021 22:01:55 +0530 Subject: [PATCH 43/58] feat(minor): Packages! also cleanup of DocField and other minor fixes --- frappe/core/doctype/docfield/docfield.json | 132 ++-- frappe/core/doctype/doctype/doctype.js | 64 ++ frappe/core/doctype/doctype/doctype.json | 10 +- frappe/core/doctype/doctype/doctype.py | 23 +- frappe/core/doctype/file/file.py | 5 +- frappe/core/doctype/module_def/module_def.js | 3 + .../core/doctype/module_def/module_def.json | 64 +- frappe/core/doctype/package/__init__.py | 0 .../GNU Affero General Public License.md | 614 +++++++++++++++++ .../licenses/GNU General Public License.md | 617 ++++++++++++++++++ .../doctype/package/licenses/MIT License.md | 17 + frappe/core/doctype/package/package.js | 17 + frappe/core/doctype/package/package.json | 76 +++ frappe/core/doctype/package/package.py | 17 + frappe/core/doctype/package/test_package.py | 87 +++ .../core/doctype/package_import/__init__.py | 0 .../doctype/package_import/package_import.js | 8 + .../package_import/package_import.json | 65 ++ .../doctype/package_import/package_import.py | 56 ++ .../package_import/test_package_import.py | 8 + .../core/doctype/package_release/__init__.py | 0 .../package_release/package_release.js | 8 + .../package_release/package_release.json | 95 +++ .../package_release/package_release.py | 79 +++ .../package_release/test_package_release.py | 8 + .../doctype/server_script/server_script.json | 9 +- .../doctype/server_script/server_script.py | 5 + frappe/core/workspace/build/build.json | 32 +- .../doctype/client_script/client_script.json | 19 +- .../doctype/custom_field/custom_field.json | 9 +- .../property_setter/property_setter.json | 14 +- frappe/database/database.py | 17 + frappe/database/mariadb/framework_mariadb.sql | 2 + .../database/postgres/framework_postgres.sql | 2 + frappe/model/naming.py | 2 +- frappe/model/sync.py | 8 +- frappe/modules.txt | 4 +- frappe/modules/export_file.py | 63 +- frappe/modules/import_file.py | 113 ++-- frappe/public/js/frappe/form/controls/code.js | 6 +- frappe/public/js/frappe/form/controls/text.js | 3 + frappe/tests/test_db.py | 8 +- frappe/utils/safe_exec.py | 7 +- frappe/website/doctype/web_page/web_page.json | 22 +- .../doctype/web_template/web_template.json | 11 +- 45 files changed, 2291 insertions(+), 138 deletions(-) create mode 100644 frappe/core/doctype/package/__init__.py create mode 100644 frappe/core/doctype/package/licenses/GNU Affero General Public License.md create mode 100644 frappe/core/doctype/package/licenses/GNU General Public License.md create mode 100644 frappe/core/doctype/package/licenses/MIT License.md create mode 100644 frappe/core/doctype/package/package.js create mode 100644 frappe/core/doctype/package/package.json create mode 100644 frappe/core/doctype/package/package.py create mode 100644 frappe/core/doctype/package/test_package.py create mode 100644 frappe/core/doctype/package_import/__init__.py create mode 100644 frappe/core/doctype/package_import/package_import.js create mode 100644 frappe/core/doctype/package_import/package_import.json create mode 100644 frappe/core/doctype/package_import/package_import.py create mode 100644 frappe/core/doctype/package_import/test_package_import.py create mode 100644 frappe/core/doctype/package_release/__init__.py create mode 100644 frappe/core/doctype/package_release/package_release.js create mode 100644 frappe/core/doctype/package_release/package_release.json create mode 100644 frappe/core/doctype/package_release/package_release.py create mode 100644 frappe/core/doctype/package_release/test_package_release.py diff --git a/frappe/core/doctype/docfield/docfield.json b/frappe/core/doctype/docfield/docfield.json index ce62adc8be..b240d29446 100644 --- a/frappe/core/doctype/docfield/docfield.json +++ b/frappe/core/doctype/docfield/docfield.json @@ -18,46 +18,53 @@ "hide_seconds", "reqd", "search_index", - "in_list_view", - "in_standard_filter", - "in_global_search", - "in_preview", - "allow_in_quick_entry", - "bold", - "translatable", - "collapsible", - "collapsible_depends_on", - "column_break_6", + "column_break_18", "options", + "defaults_section", "default", + "column_break_6", "fetch_from", "fetch_if_empty", - "permissions", - "depends_on", + "visibility_section", "hidden", + "bold", + "allow_in_quick_entry", + "translatable", + "print_hide", + "print_hide_if_no_value", + "report_hide", + "column_break_28", + "depends_on", + "collapsible", + "collapsible_depends_on", + "hide_border", + "list__search_settings_section", + "in_list_view", + "in_standard_filter", + "in_preview", + "column_break_35", + "in_filter", + "in_global_search", + "permissions", "read_only", - "unique", - "set_only_once", + "allow_on_submit", + "ignore_user_permissions", "allow_bulk_edit", "column_break_13", "permlevel", - "ignore_user_permissions", - "allow_on_submit", - "report_hide", - "remember_last_selected_value", "ignore_xss_filter", - "hide_border", - "property_depends_on_section", - "mandatory_depends_on", + "constraints_section", + "unique", + "no_copy", + "set_only_once", + "remember_last_selected_value", "column_break_38", + "mandatory_depends_on", "read_only_depends_on", "display", - "in_filter", - "no_copy", - "print_hide", - "print_hide_if_no_value", "print_width", "width", + "max_height", "columns", "column_break_22", "description", @@ -153,7 +160,7 @@ "default": "0", "fieldname": "in_standard_filter", "fieldtype": "Check", - "label": "In Standard Filter" + "label": "In List Filter" }, { "default": "0", @@ -197,10 +204,11 @@ "length": 255 }, { - "depends_on": "eval:doc.fieldtype==\"Section Break\"", + "depends_on": "eval:doc.fieldtype==\"Section Break\" && doc.collapsible", "fieldname": "collapsible_depends_on", "fieldtype": "Code", - "label": "Collapsible Depends On", + "label": "Collapsible Depends On (JS)", + "max_height": "3rem", "options": "JS" }, { @@ -220,6 +228,7 @@ "fieldname": "default", "fieldtype": "Small Text", "label": "Default", + "max_height": "3rem", "oldfieldname": "default", "oldfieldtype": "Text" }, @@ -230,10 +239,9 @@ }, { "default": "0", - "description": "If checked, this field will be not overwritten based on Fetch From if a value already exists.", "fieldname": "fetch_if_empty", "fieldtype": "Check", - "label": "Fetch If Empty" + "label": "Fetch only if value is not set" }, { "fieldname": "permissions", @@ -243,8 +251,9 @@ { "fieldname": "depends_on", "fieldtype": "Code", - "label": "Display Depends On", + "label": "Display Depends On (JS)", "length": 255, + "max_height": "3rem", "oldfieldname": "depends_on", "oldfieldtype": "Data", "options": "JS" @@ -275,10 +284,9 @@ }, { "default": "0", - "description": "Do not allow user to change after set the first time", "fieldname": "set_only_once", "fieldtype": "Check", - "label": "Set Only Once" + "label": "Set only once" }, { "default": "0", @@ -303,7 +311,6 @@ }, { "default": "0", - "description": "User permissions should not apply for this Link", "fieldname": "ignore_user_permissions", "fieldtype": "Check", "label": "Ignore User Permissions" @@ -388,12 +395,14 @@ { "fieldname": "print_width", "fieldtype": "Data", - "label": "Print Width" + "label": "Print Width", + "length": 10 }, { "fieldname": "width", "fieldtype": "Data", "label": "Width", + "length": 10, "oldfieldname": "width", "oldfieldtype": "Data", "print_width": "50px", @@ -436,20 +445,17 @@ { "fieldname": "mandatory_depends_on", "fieldtype": "Code", - "label": "Mandatory Depends On", + "label": "Mandatory Depends On (JS)", + "max_height": "3rem", "options": "JS" }, { "fieldname": "read_only_depends_on", "fieldtype": "Code", - "label": "Read Only Depends On", + "label": "Read Only Depends On (JS)", + "max_height": "3rem", "options": "JS" }, - { - "fieldname": "property_depends_on_section", - "fieldtype": "Section Break", - "label": "Property Depends On" - }, { "fieldname": "column_break_38", "fieldtype": "Column Break" @@ -481,16 +487,56 @@ "fieldname": "non_negative", "fieldtype": "Check", "label": "Non Negative" + }, + { + "fieldname": "column_break_18", + "fieldtype": "Column Break" + }, + { + "fieldname": "defaults_section", + "fieldtype": "Section Break", + "label": "Defaults", + "max_height": "2rem" + }, + { + "fieldname": "visibility_section", + "fieldtype": "Section Break", + "label": "Visibility" + }, + { + "fieldname": "column_break_28", + "fieldtype": "Column Break" + }, + { + "fieldname": "constraints_section", + "fieldtype": "Section Break", + "label": "Constraints" + }, + { + "fieldname": "max_height", + "fieldtype": "Data", + "label": "Max Height", + "length": 10 + }, + { + "fieldname": "list__search_settings_section", + "fieldtype": "Section Break", + "label": "List / Search Settings" + }, + { + "fieldname": "column_break_35", + "fieldtype": "Column Break" } ], "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2021-07-10 21:56:04.167745", + "modified": "2021-09-04 19:41:53.684094", "modified_by": "Administrator", "module": "Core", "name": "DocField", + "naming_rule": "Random", "owner": "Administrator", "permissions": [], "sort_field": "modified", diff --git a/frappe/core/doctype/doctype/doctype.js b/frappe/core/doctype/doctype/doctype.js index 3f1b5bb7ad..a6b46a9dc0 100644 --- a/frappe/core/doctype/doctype/doctype.js +++ b/frappe/core/doctype/doctype/doctype.js @@ -61,9 +61,73 @@ frappe.ui.form.on('DocType', { __('In Grid View') : __('In List View'); frm.events.autoname(frm); + frm.events.set_naming_rule_description(frm); + }, + + naming_rule: function(frm) { + // set the "autoname" property based on naming_rule + if (frm.doc.naming_rule && !frm.__from_autoname) { + + // flag to avoid recursion + frm.__from_naming_rule = true; + + if (frm.doc.naming_rule=='Set by user') { + frm.set_value('autoname', 'Prompt'); + } else if (frm.doc.naming_rule=='By fieldname') { + frm.set_value('autoname', 'field:'); + } else if (frm.doc.naming_rule=='By "Naming Series" field') { + frm.set_value('autoname', 'naming_series:'); + } else if (frm.doc.naming_rule=='Expression') { + frm.set_value('autoname', 'format:'); + } else if (frm.doc.naming_rule=='Expression (old style)') { + // pass + } else if (frm.doc.naming_rule=='Random') { + frm.set_value('autoname', 'hash'); + } + setTimeout(() =>frm.__from_naming_rule = false, 500); + + frm.events.set_naming_rule_description(frm); + } + + }, + + set_naming_rule_description(frm) { + let naming_rule_description = { + 'Set by user': '', + 'By fieldname': 'Format: field:[fieldname]. Valid fieldname must exist', + 'By "Naming Series" field': 'Format: naming_series:[fieldname]. Fieldname called naming_series must exist', + 'Expression': 'Format: format:EXAMPLE-{MM}morewords{fieldname1}-{fieldname2}-{#####} - Replace all braced words (fieldnames, date words (DD, MM, YY), series) with their value. Outside braces, any characters can be used.', + 'Expression (old style)': 'Format: EXAMPLE-.##### Series by prefix (separated by a dot)', + 'Random': '', + 'By script': '' + } + + if (frm.doc.naming_rule) { + frm.get_field('autoname').set_description(naming_rule_description[frm.doc.naming_rule]) + } }, autoname: function(frm) { + // set naming_rule based on autoname (for old doctypes where its not been set) + if (frm.doc.autoname && !frm.doc.naming_rule && !frm.__from_naming_rule) { + // flag to avoid recursion + frm.__from_autoname = true; + if (frm.doc.autoname.toLowerCase() === 'prompt') { + frm.set_value('naming_rule', 'Set by user'); + } else if (frm.doc.autoname.startsWith('field:')) { + frm.set_value('naming_rule', 'By fieldname'); + } else if (frm.doc.autoname.startsWith('naming_series:')) { + frm.set_value('naming_rule', 'By "Naming Series" field'); + } else if (frm.doc.autoname.startsWith('format:')) { + frm.set_value('naming_rule', 'Expression'); + } else if (frm.doc.autoname.toLowerCase() === 'hash') { + frm.set_value('naming_rule', 'Random'); + } else { + frm.set_value('naming_rule', 'Expression (old style)'); + } + setTimeout(() => frm.__from_autoname = false, 500); + } + frm.set_df_property('fields', 'reqd', frm.doc.autoname !== 'Prompt'); } }); diff --git a/frappe/core/doctype/doctype/doctype.json b/frappe/core/doctype/doctype/doctype.json index 63e0426eb3..18435f8873 100644 --- a/frappe/core/doctype/doctype/doctype.json +++ b/frappe/core/doctype/doctype/doctype.json @@ -26,6 +26,7 @@ "fields_section_break", "fields", "sb1", + "naming_rule", "autoname", "name_case", "allow_rename", @@ -554,6 +555,13 @@ "fieldname": "website_search_field", "fieldtype": "Data", "label": "Website Search Field" + }, + { + "fieldname": "naming_rule", + "fieldtype": "Select", + "label": "Naming Rule", + "length": 40, + "options": "\nSet by user\nBy fieldname\nBy \"Naming Series\" field\nExpression\nExpression (old style)\nRandom\nBy script" } ], "icon": "fa fa-bolt", @@ -635,7 +643,7 @@ "link_fieldname": "reference_doctype" } ], - "modified": "2021-08-31 15:26:19.077164", + "modified": "2021-09-05 15:39:13.233403", "modified_by": "Administrator", "module": "Core", "name": "DocType", diff --git a/frappe/core/doctype/doctype/doctype.py b/frappe/core/doctype/doctype/doctype.py index 1050ccb460..70153268f5 100644 --- a/frappe/core/doctype/doctype/doctype.py +++ b/frappe/core/doctype/doctype/doctype.py @@ -493,6 +493,9 @@ class DocType(Document): # retain order of 'fields' table and change order in 'field_order' docdict["field_order"] = [f.fieldname for f in self.fields] + if self.custom: + return + path = get_file_path(self.module, "DocType", self.name) if os.path.exists(path): try: @@ -719,20 +722,20 @@ def validate_links_table_fieldnames(meta): for index, link in enumerate(meta.links): link_meta = frappe.get_meta(link.link_doctype) if not link_meta.get_field(link.link_fieldname): - message = _("Row #{0}: Could not find field {1} in {2} DocType").format(index+1, frappe.bold(link.link_fieldname), frappe.bold(link.link_doctype)) + message = _("Document Links Row #{0}: Could not find field {1} in {2} DocType").format(index+1, frappe.bold(link.link_fieldname), frappe.bold(link.link_doctype)) frappe.throw(message, InvalidFieldNameError, _("Invalid Fieldname")) if link.is_child_table and not meta.get_field(link.table_fieldname): - message = _("Row #{0}: Could not find field {1} in {2} DocType").format(index+1, frappe.bold(link.table_fieldname), frappe.bold(meta.name)) + message = _("Document Links Row #{0}: Could not find field {1} in {2} DocType").format(index+1, frappe.bold(link.table_fieldname), frappe.bold(meta.name)) frappe.throw(message, frappe.ValidationError, _("Invalid Table Fieldname")) if link.is_child_table: if not link.parent_doctype: - message = _("Row #{0}: Parent DocType is mandatory for internal links").format(index+1) + message = _("Document Links Row #{0}: Parent DocType is mandatory for internal links").format(index+1) frappe.throw(message, frappe.ValidationError, _("Parent Missing")) if not link.table_fieldname: - message = _("Row #{0}: Table Fieldname is mandatory for internal links").format(index+1) + message = _("Document Links Row #{0}: Table Fieldname is mandatory for internal links").format(index+1) frappe.throw(message, frappe.ValidationError, _("Table Fieldname Missing")) def validate_fields_for_doctype(doctype): @@ -1027,6 +1030,9 @@ def validate_fields(meta): frappe.throw(_('Option {0} for field {1} is not a child table') .format(frappe.bold(doctype), frappe.bold(docfield.fieldname)), title=_("Invalid Option")) + def check_max_height(docfield): + if getattr(docfield, 'max_height', None) and (docfield.max_height[-2:] not in ('px', 'em')): + frappe.throw('Max for {1} height must be in px, em, rem'.format(frappe.bold(docfield.fieldname))) fields = meta.get("fields") fieldname_list = [d.fieldname for d in fields] @@ -1060,6 +1066,7 @@ def validate_fields(meta): scrub_options_in_select(d) scrub_fetch_from(d) validate_data_field_type(d) + check_max_height(d) check_fold(fields) check_search_fields(meta, fields) @@ -1216,8 +1223,14 @@ def make_module_and_roles(doc, perm_fieldname="permissions"): if ("tabModule Def" in frappe.db.get_tables() and not frappe.db.exists("Module Def", doc.module)): m = frappe.get_doc({"doctype": "Module Def", "module_name": doc.module}) - m.app_name = frappe.local.module_app[frappe.scrub(doc.module)] + if frappe.scrub(doc.module) in frappe.local.module_app: + m.app_name = frappe.local.module_app[frappe.scrub(doc.module)] + else: + m.app_name = 'frappe' m.flags.ignore_mandatory = m.flags.ignore_permissions = True + if frappe.flags.package: + m.package = frappe.flags.package.name + m.custom = 1 m.insert() default_roles = ["Administrator", "Guest", "All"] diff --git a/frappe/core/doctype/file/file.py b/frappe/core/doctype/file/file.py index ebbcdcee17..d9ecd85533 100755 --- a/frappe/core/doctype/file/file.py +++ b/frappe/core/doctype/file/file.py @@ -254,10 +254,11 @@ class File(Document): return file_name = self.file_url.split('/')[-1] try: - with open(get_files_path(file_name, is_private=self.is_private), "rb") as f: + file_path = get_files_path(file_name, is_private=self.is_private) + with open(file_path, "rb") as f: self.content_hash = get_content_hash(f.read()) except IOError: - frappe.throw(_("File {0} does not exist").format(self.file_url)) + frappe.throw(_("File {0} does not exist").format(file_path)) def on_trash(self): if self.is_home_folder or self.is_attachments_folder: diff --git a/frappe/core/doctype/module_def/module_def.js b/frappe/core/doctype/module_def/module_def.js index c7a6cf85f9..73d2d6562c 100644 --- a/frappe/core/doctype/module_def/module_def.js +++ b/frappe/core/doctype/module_def/module_def.js @@ -5,6 +5,9 @@ frappe.ui.form.on('Module Def', { refresh: function(frm) { frappe.xcall('frappe.core.doctype.module_def.module_def.get_installed_apps').then(r => { frm.set_df_property('app_name', 'options', JSON.parse(r)); + if (!frm.doc.app_name) { + frm.set_value('app_name', 'frappe'); + } }); } }); diff --git a/frappe/core/doctype/module_def/module_def.json b/frappe/core/doctype/module_def/module_def.json index 4de046bbb6..7ddc55fce5 100644 --- a/frappe/core/doctype/module_def/module_def.json +++ b/frappe/core/doctype/module_def/module_def.json @@ -8,6 +8,7 @@ "field_order": [ "module_name", "custom", + "package", "app_name", "restrict_to_domain" ], @@ -23,6 +24,7 @@ "unique": 1 }, { + "depends_on": "eval:!doc.custom", "fieldname": "app_name", "fieldtype": "Select", "in_list_view": 1, @@ -41,24 +43,84 @@ "fieldname": "custom", "fieldtype": "Check", "label": "Custom" + }, + { + "depends_on": "custom", + "fieldname": "package", + "fieldtype": "Link", + "label": "Package", + "options": "Package" } ], "icon": "fa fa-sitemap", "idx": 1, "links": [ { + "group": "DocType", "link_doctype": "DocType", "link_fieldname": "module" }, { + "group": "DocType", + "link_doctype": "Client Script", + "link_fieldname": "module" + }, + { + "group": "DocType", + "link_doctype": "Server Script", + "link_fieldname": "module" + }, + { + "group": "Website", + "link_doctype": "Web Page", + "link_fieldname": "module" + }, + { + "group": "Website", + "link_doctype": "Web Template", + "link_fieldname": "module" + }, + { + "group": "Website", + "link_doctype": "Website Theme", + "link_fieldname": "module" + }, + { + "group": "Website", + "link_doctype": "Web Form", + "link_fieldname": "module" + }, + { + "group": "Customization", "link_doctype": "Workspace", "link_fieldname": "module" + }, + { + "group": "Customization", + "link_doctype": "Custom Field", + "link_fieldname": "module" + }, + { + "group": "Customization", + "link_doctype": "Property Setter", + "link_fieldname": "module" + }, + { + "group": "Customization", + "link_doctype": "Print Format", + "link_fieldname": "module" + }, + { + "group": "Customization", + "link_doctype": "Notification", + "link_fieldname": "module" } ], - "modified": "2021-06-02 13:04:53.118716", + "modified": "2021-09-05 21:58:40.253909", "modified_by": "Administrator", "module": "Core", "name": "Module Def", + "naming_rule": "By fieldname", "owner": "Administrator", "permissions": [ { diff --git a/frappe/core/doctype/package/__init__.py b/frappe/core/doctype/package/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/core/doctype/package/licenses/GNU Affero General Public License.md b/frappe/core/doctype/package/licenses/GNU Affero General Public License.md new file mode 100644 index 0000000000..c7f159aed8 --- /dev/null +++ b/frappe/core/doctype/package/licenses/GNU Affero General Public License.md @@ -0,0 +1,614 @@ +### GNU AFFERO GENERAL PUBLIC LICENSE + +Version 3, 19 November 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +### Preamble + +The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains +free software for all its users. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + +A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + +The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + +An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing +under this license. + +The precise terms and conditions for copying, distribution and +modification follow. + +### TERMS AND CONDITIONS + +#### 0. Definitions. + +"This License" refers to version 3 of the GNU Affero General Public +License. + +"Copyright" also means copyright-like laws that apply to other kinds +of works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of +an exact copy. The resulting work is called a "modified version" of +the earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based +on the Program. + +To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user +through a computer network, with no transfer of a copy, is not +conveying. + +An interactive user interface displays "Appropriate Legal Notices" to +the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +#### 1. Source Code. + +The "source code" for a work means the preferred form of the work for +making modifications to it. "Object code" means any non-source form of +a work. + +A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can +regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same +work. + +#### 2. Basic Permissions. + +All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, +without conditions so long as your license otherwise remains in force. +You may convey covered works to others for the sole purpose of having +them make modifications exclusively for you, or provide you with +facilities for running those works, provided that you comply with the +terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for +you must do so exclusively on your behalf, under your direction and +control, on terms that prohibit them from making any copies of your +copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the +conditions stated below. Sublicensing is not allowed; section 10 makes +it unnecessary. + +#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such +circumvention is effected by exercising rights under this License with +respect to the covered work, and you disclaim any intention to limit +operation or modification of the work as a means of enforcing, against +the work's users, your or third parties' legal rights to forbid +circumvention of technological measures. + +#### 4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +#### 5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these +conditions: + +- a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- b) The work must carry prominent notices stating that it is + released under this License and any conditions added under + section 7. This requirement modifies the requirement in section 4 + to "keep intact all notices". +- c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + +A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +#### 6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of +sections 4 and 5, provided that you also convey the machine-readable +Corresponding Source under the terms of this License, in one of these +ways: + +- a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the Corresponding + Source from a network server at no charge. +- c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- e) Convey the object code using peer-to-peer transmission, + provided you inform other peers where the object code and + Corresponding Source of the work are being offered to the general + public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, +family, or household purposes, or (2) anything designed or sold for +incorporation into a dwelling. In determining whether a product is a +consumer product, doubtful cases shall be resolved in favor of +coverage. For a particular product received by a particular user, +"normally used" refers to a typical or common use of that class of +product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected +to use, the product. A product is a consumer product regardless of +whether the product has substantial commercial, industrial or +non-consumer uses, unless such uses represent the only significant +mode of use of the product. + +"Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to +install and execute modified versions of a covered work in that User +Product from a modified version of its Corresponding Source. The +information must suffice to ensure that the continued functioning of +the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or +updates for a work that has been modified or installed by the +recipient, or for the User Product in which it has been modified or +installed. Access to a network may be denied when the modification +itself materially and adversely affects the operation of the network +or violates the rules and protocols for communication across the +network. + +Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +#### 7. Additional Terms. + +"Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders +of that material) supplement the terms of this License with terms: + +- a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- c) Prohibiting misrepresentation of the origin of that material, + or requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- d) Limiting the use for publicity purposes of names of licensors + or authors of the material; or +- e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions + of it) with contractual assumptions of liability to the recipient, + for any liability that these contractual assumptions directly + impose on those licensors and authors. + +All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; the +above requirements apply either way. + +#### 8. Termination. + +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +#### 9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run +a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +#### 10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +#### 11. Patents. + +A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims owned +or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +A patent license is "discriminatory" if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on +the non-exercise of one or more of the rights that are specifically +granted under this License. You may not convey a covered work if you +are a party to an arrangement with a third party that is in the +business of distributing software, under which you make payment to the +third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties +who would receive the covered work from you, a discriminatory patent +license (a) in connection with copies of the covered work conveyed by +you (or copies made from those copies), or (b) primarily for and in +connection with specific products or compilations that contain the +covered work, unless you entered into that arrangement, or that patent +license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +#### 12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under +this License and any other pertinent obligations, then as a +consequence you may not convey it at all. For example, if you agree to +terms that obligate you to collect a royalty for further conveying +from those to whom you convey the Program, the only way you could +satisfy both those terms and this License would be to refrain entirely +from conveying the Program. + +#### 13. Remote Network Interaction; Use with the GNU General Public License. + +Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your +version supports such interaction) an opportunity to receive the +Corresponding Source of your version by providing access to the +Corresponding Source from a network server at no charge, through some +standard or customary means of facilitating copying of software. This +Corresponding Source shall include the Corresponding Source for any +work covered by version 3 of the GNU General Public License that is +incorporated pursuant to the following paragraph. + +Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + +#### 14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions +of the GNU Affero General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever +published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions +of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + +#### 15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT +WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. + +#### 16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR +CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT +NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR +LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM +TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +#### 17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. diff --git a/frappe/core/doctype/package/licenses/GNU General Public License.md b/frappe/core/doctype/package/licenses/GNU General Public License.md new file mode 100644 index 0000000000..c4580f2eb6 --- /dev/null +++ b/frappe/core/doctype/package/licenses/GNU General Public License.md @@ -0,0 +1,617 @@ +### GNU GENERAL PUBLIC LICENSE + +Version 3, 29 June 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +### Preamble + +The GNU General Public License is a free, copyleft license for +software and other kinds of works. + +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom +to share and change all versions of a program--to make sure it remains +free software for all its users. We, the Free Software Foundation, use +the GNU General Public License for most of our software; it applies +also to any other work released this way by its authors. You can apply +it to your programs, too. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you +have certain responsibilities if you distribute copies of the +software, or if you modify it: responsibilities to respect the freedom +of others. + +For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + +Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + +Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the +manufacturer can do so. This is fundamentally incompatible with the +aim of protecting users' freedom to change the software. The +systematic pattern of such abuse occurs in the area of products for +individuals to use, which is precisely where it is most unacceptable. +Therefore, we have designed this version of the GPL to prohibit the +practice for those products. If such problems arise substantially in +other domains, we stand ready to extend this provision to those +domains in future versions of the GPL, as needed to protect the +freedom of users. + +Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish +to avoid the special danger that patents applied to a free program +could make it effectively proprietary. To prevent this, the GPL +assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and +modification follow. + +### TERMS AND CONDITIONS + +#### 0. Definitions. + +"This License" refers to version 3 of the GNU General Public License. + +"Copyright" also means copyright-like laws that apply to other kinds +of works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of +an exact copy. The resulting work is called a "modified version" of +the earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based +on the Program. + +To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user +through a computer network, with no transfer of a copy, is not +conveying. + +An interactive user interface displays "Appropriate Legal Notices" to +the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +#### 1. Source Code. + +The "source code" for a work means the preferred form of the work for +making modifications to it. "Object code" means any non-source form of +a work. + +A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can +regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same +work. + +#### 2. Basic Permissions. + +All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, +without conditions so long as your license otherwise remains in force. +You may convey covered works to others for the sole purpose of having +them make modifications exclusively for you, or provide you with +facilities for running those works, provided that you comply with the +terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for +you must do so exclusively on your behalf, under your direction and +control, on terms that prohibit them from making any copies of your +copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the +conditions stated below. Sublicensing is not allowed; section 10 makes +it unnecessary. + +#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such +circumvention is effected by exercising rights under this License with +respect to the covered work, and you disclaim any intention to limit +operation or modification of the work as a means of enforcing, against +the work's users, your or third parties' legal rights to forbid +circumvention of technological measures. + +#### 4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +#### 5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these +conditions: + +- a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- b) The work must carry prominent notices stating that it is + released under this License and any conditions added under + section 7. This requirement modifies the requirement in section 4 + to "keep intact all notices". +- c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + +A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +#### 6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of +sections 4 and 5, provided that you also convey the machine-readable +Corresponding Source under the terms of this License, in one of these +ways: + +- a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the Corresponding + Source from a network server at no charge. +- c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- e) Convey the object code using peer-to-peer transmission, + provided you inform other peers where the object code and + Corresponding Source of the work are being offered to the general + public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, +family, or household purposes, or (2) anything designed or sold for +incorporation into a dwelling. In determining whether a product is a +consumer product, doubtful cases shall be resolved in favor of +coverage. For a particular product received by a particular user, +"normally used" refers to a typical or common use of that class of +product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected +to use, the product. A product is a consumer product regardless of +whether the product has substantial commercial, industrial or +non-consumer uses, unless such uses represent the only significant +mode of use of the product. + +"Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to +install and execute modified versions of a covered work in that User +Product from a modified version of its Corresponding Source. The +information must suffice to ensure that the continued functioning of +the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or +updates for a work that has been modified or installed by the +recipient, or for the User Product in which it has been modified or +installed. Access to a network may be denied when the modification +itself materially and adversely affects the operation of the network +or violates the rules and protocols for communication across the +network. + +Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +#### 7. Additional Terms. + +"Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders +of that material) supplement the terms of this License with terms: + +- a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- c) Prohibiting misrepresentation of the origin of that material, + or requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- d) Limiting the use for publicity purposes of names of licensors + or authors of the material; or +- e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions + of it) with contractual assumptions of liability to the recipient, + for any liability that these contractual assumptions directly + impose on those licensors and authors. + +All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; the +above requirements apply either way. + +#### 8. Termination. + +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +#### 9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run +a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +#### 10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +#### 11. Patents. + +A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims owned +or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +A patent license is "discriminatory" if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on +the non-exercise of one or more of the rights that are specifically +granted under this License. You may not convey a covered work if you +are a party to an arrangement with a third party that is in the +business of distributing software, under which you make payment to the +third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties +who would receive the covered work from you, a discriminatory patent +license (a) in connection with copies of the covered work conveyed by +you (or copies made from those copies), or (b) primarily for and in +connection with specific products or compilations that contain the +covered work, unless you entered into that arrangement, or that patent +license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +#### 12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under +this License and any other pertinent obligations, then as a +consequence you may not convey it at all. For example, if you agree to +terms that obligate you to collect a royalty for further conveying +from those to whom you convey the Program, the only way you could +satisfy both those terms and this License would be to refrain entirely +from conveying the Program. + +#### 13. Use with the GNU Affero General Public License. + +Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + +#### 14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions +of the GNU General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in +detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies that a certain numbered version of the GNU General Public +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that numbered version or +of any later version published by the Free Software Foundation. If the +Program does not specify a version number of the GNU General Public +License, you may choose any version ever published by the Free +Software Foundation. + +If the Program specifies that a proxy can decide which future versions +of the GNU General Public License can be used, that proxy's public +statement of acceptance of a version permanently authorizes you to +choose that version for the Program. + +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + +#### 15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT +WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. + +#### 16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR +CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT +NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR +LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM +TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +#### 17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. diff --git a/frappe/core/doctype/package/licenses/MIT License.md b/frappe/core/doctype/package/licenses/MIT License.md new file mode 100644 index 0000000000..c038ee76ae --- /dev/null +++ b/frappe/core/doctype/package/licenses/MIT License.md @@ -0,0 +1,17 @@ +### MIT License + +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. diff --git a/frappe/core/doctype/package/package.js b/frappe/core/doctype/package/package.js new file mode 100644 index 0000000000..90e2eed1e3 --- /dev/null +++ b/frappe/core/doctype/package/package.js @@ -0,0 +1,17 @@ +// Copyright (c) 2021, Frappe Technologies and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Package', { + validate: function(frm) { + if (!frm.doc.package_name) { + frm.set_value('package_name', frm.doc.name.toLowerCase().replace(' ', '-')); + } + }, + + license_type: function(frm) { + frappe.call('frappe.core.doctype.package.package.get_license_text', + {'license_type': frm.doc.license_type}).then(r => { + frm.set_value('license', r.message); + }); + } +}); diff --git a/frappe/core/doctype/package/package.json b/frappe/core/doctype/package/package.json new file mode 100644 index 0000000000..285e17a5bb --- /dev/null +++ b/frappe/core/doctype/package/package.json @@ -0,0 +1,76 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "Prompt", + "creation": "2021-09-04 11:54:35.155687", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "package_name", + "readme", + "license_type", + "license" + ], + "fields": [ + { + "fieldname": "readme", + "fieldtype": "Markdown Editor", + "label": "Readme" + }, + { + "fieldname": "package_name", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Package Name", + "reqd": 1 + }, + { + "fieldname": "license_type", + "fieldtype": "Select", + "label": "License Type", + "options": "\nMIT License\nGNU General Public License\nGNU Affero General Public License" + }, + { + "fieldname": "license", + "fieldtype": "Markdown Editor", + "label": "License" + } + ], + "index_web_pages_for_search": 1, + "links": [ + { + "group": "Modules", + "link_doctype": "Module Def", + "link_fieldname": "package" + }, + { + "group": "Release", + "link_doctype": "Package Release", + "link_fieldname": "package" + } + ], + "modified": "2021-09-05 13:15:01.130982", + "modified_by": "Administrator", + "module": "Core", + "name": "Package", + "naming_rule": "Set by user", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/frappe/core/doctype/package/package.py b/frappe/core/doctype/package/package.py new file mode 100644 index 0000000000..340496079d --- /dev/null +++ b/frappe/core/doctype/package/package.py @@ -0,0 +1,17 @@ +# Copyright (c) 2021, Frappe Technologies and contributors +# For license information, please see license.txt + +import frappe, os +from frappe.model.document import Document + +class Package(Document): + def validate(self): + if not self.package_name: + self.package_name = self.name.lower().replace(' ', '-') + +@frappe.whitelist() +def get_license_text(license_type): + with open(os.path.join(os.path.dirname(__file__), 'licenses', + license_type + '.md'), 'r') as textfile: + return textfile.read() + diff --git a/frappe/core/doctype/package/test_package.py b/frappe/core/doctype/package/test_package.py new file mode 100644 index 0000000000..21ae50d250 --- /dev/null +++ b/frappe/core/doctype/package/test_package.py @@ -0,0 +1,87 @@ +# Copyright (c) 2021, Frappe Technologies and Contributors +# See license.txt + +import frappe, os, json +import unittest + +class TestPackage(unittest.TestCase): + def test_package_release(self): + make_test_package() + make_test_module() + make_test_doctype() + make_test_server_script() + make_test_web_page() + + # make release + frappe.get_doc(dict( + doctype = 'Package Release', + package = 'Test Package', + publish = 1 + )).insert() + + self.assertTrue(os.path.exists(frappe.get_site_path('packages', 'test-package'))) + self.assertTrue(os.path.exists(frappe.get_site_path('packages', 'test-package', 'test_module_for_package'))) + self.assertTrue(os.path.exists(frappe.get_site_path('packages', 'test-package', 'test_module_for_package', 'doctype', 'test_doctype_for_package'))) + with open(frappe.get_site_path('packages', 'test-package', 'test_module_for_package', + 'doctype', 'test_doctype_for_package', 'test_doctype_for_package.json')) as f: + doctype = json.loads(f.read()) + self.assertEqual(doctype['doctype'], 'DocType') + self.assertEqual(doctype['name'], 'Test DocType for Package') + self.assertEqual(doctype['fields'][0]['fieldname'], 'test_field') + + +def make_test_package(): + if not frappe.db.exists('Package', 'Test Package'): + frappe.get_doc(dict( + doctype = 'Package', + name = 'Test Package', + package_name = 'test-package', + readme = '# Test Package' + )).insert() + +def make_test_module(): + if not frappe.db.exists('Module Def', 'Test Module for Package'): + frappe.get_doc(dict( + doctype = 'Module Def', + module_name = 'Test Module for Package', + custom = 1, + app_name = 'frappe', + package = 'Test Package' + )).insert() + +def make_test_doctype(): + if not frappe.db.exists('DocType', 'Test DocType for Package'): + frappe.get_doc(dict( + doctype = 'DocType', + name = 'Test DocType for Package', + custom = 1, + module = 'Test Module for Package', + autoname = 'Prompt', + fields = [dict( + fieldname = 'test_field', + fieldtype = 'Data', + label = 'Test Field' + )] + )).insert() + +def make_test_server_script(): + if not frappe.db.exists('Server Script', 'Test Script for Package'): + frappe.get_doc(dict( + doctype = 'Server Script', + name = 'Test Script for Package', + module = 'Test Module for Package', + script_type = 'DocType Event', + reference_doctype = 'Test DocType for Package', + doctype_event = 'Before Save', + script = 'frappe.msgprint("Test")' + )).insert() + +def make_test_web_page(): + if not frappe.db.exists('Web Page', 'test-web-page-for-package'): + frappe.get_doc(dict( + doctype = "Web Page", + module = 'Test Module for Package', + main_section = "Some content", + published = 1, + title = "Test Web Page for Package" + )).insert() diff --git a/frappe/core/doctype/package_import/__init__.py b/frappe/core/doctype/package_import/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/core/doctype/package_import/package_import.js b/frappe/core/doctype/package_import/package_import.js new file mode 100644 index 0000000000..c01a6266cc --- /dev/null +++ b/frappe/core/doctype/package_import/package_import.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, Frappe Technologies and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Package Import', { + // refresh: function(frm) { + + // } +}); diff --git a/frappe/core/doctype/package_import/package_import.json b/frappe/core/doctype/package_import/package_import.json new file mode 100644 index 0000000000..f3c6168f8d --- /dev/null +++ b/frappe/core/doctype/package_import/package_import.json @@ -0,0 +1,65 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "format:Package Import at {creation}", + "creation": "2021-09-05 16:36:46.680094", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "attach_package", + "activate", + "force", + "log" + ], + "fields": [ + { + "fieldname": "attach_package", + "fieldtype": "Attach", + "label": "Attach Package" + }, + { + "default": "0", + "fieldname": "activate", + "fieldtype": "Check", + "label": "Activate" + }, + { + "fieldname": "log", + "fieldtype": "Code", + "label": "Log", + "read_only": 1 + }, + { + "default": "0", + "fieldname": "force", + "fieldtype": "Check", + "label": "Force" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2021-09-05 21:30:04.796090", + "modified_by": "Administrator", + "module": "Core", + "name": "Package Import", + "naming_rule": "Expression", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/frappe/core/doctype/package_import/package_import.py b/frappe/core/doctype/package_import/package_import.py new file mode 100644 index 0000000000..b307a3bff9 --- /dev/null +++ b/frappe/core/doctype/package_import/package_import.py @@ -0,0 +1,56 @@ +# Copyright (c) 2021, Frappe Technologies and contributors +# For license information, please see license.txt + +import frappe, os, json +import subprocess +from frappe.model.document import Document +from frappe.desk.form.load import get_attachments +from frappe.model.sync import get_doc_files +from frappe.modules.import_file import import_file_by_path, import_doc + +class PackageImport(Document): + def validate(self): + if self.activate: + self.import_package() + + def import_package(self): + attachment = get_attachments(self.doctype, self.name) + + if not attachment: + frappe.throw('Please attach the package') + + attachment = attachment[0] + + # get package_name from file (package_name-0.0.0.tar.gz) + package_name = attachment.file_name.split('.')[0].rsplit('-', 1)[0] + if not os.path.exists(frappe.get_site_path('packages')): + os.makedirs(frappe.get_site_path('packages')) + + # extract + subprocess.check_output(['tar', 'xzf', + frappe.get_site_path(attachment.file_url.strip('/')), '-C', + frappe.get_site_path('packages')]) + + package_path = frappe.get_site_path('packages', package_name) + + # import Package + with open(os.path.join(package_path, package_name + '.json'), 'r') as packagefile: + doc_dict = json.loads(packagefile.read()) + + frappe.flags.package = import_doc(doc_dict) + + # collect modules + files = [] + log = [] + for module in os.listdir(package_path): + module_path = os.path.join(package_path, module) + if os.path.isdir(module_path): + get_doc_files(files, module_path) + + # import files + for file in files: + import_file_by_path(file, force=self.force, ignore_version=True, + for_sync=True) + log.append('Imported {}'.format(file)) + + self.log = '\n'.join(log) diff --git a/frappe/core/doctype/package_import/test_package_import.py b/frappe/core/doctype/package_import/test_package_import.py new file mode 100644 index 0000000000..04628fed93 --- /dev/null +++ b/frappe/core/doctype/package_import/test_package_import.py @@ -0,0 +1,8 @@ +# Copyright (c) 2021, Frappe Technologies and Contributors +# See license.txt + +# import frappe +import unittest + +class TestPackageImport(unittest.TestCase): + pass diff --git a/frappe/core/doctype/package_release/__init__.py b/frappe/core/doctype/package_release/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/core/doctype/package_release/package_release.js b/frappe/core/doctype/package_release/package_release.js new file mode 100644 index 0000000000..9eabe36839 --- /dev/null +++ b/frappe/core/doctype/package_release/package_release.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, Frappe Technologies and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Package Release', { + // refresh: function(frm) { + + // } +}); diff --git a/frappe/core/doctype/package_release/package_release.json b/frappe/core/doctype/package_release/package_release.json new file mode 100644 index 0000000000..b651d699c4 --- /dev/null +++ b/frappe/core/doctype/package_release/package_release.json @@ -0,0 +1,95 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2021-09-05 12:59:01.932327", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "package", + "publish", + "path", + "column_break_3", + "major", + "minor", + "patch", + "section_break_7", + "release_notes" + ], + "fields": [ + { + "fieldname": "package", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Package", + "options": "Package", + "reqd": 1 + }, + { + "fieldname": "major", + "fieldtype": "Int", + "label": "Major" + }, + { + "fieldname": "minor", + "fieldtype": "Int", + "label": "Minor" + }, + { + "fieldname": "patch", + "fieldtype": "Int", + "label": "Patch", + "no_copy": 1 + }, + { + "fieldname": "path", + "fieldtype": "Small Text", + "label": "Path", + "read_only": 1 + }, + { + "fieldname": "column_break_3", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_7", + "fieldtype": "Section Break" + }, + { + "fieldname": "release_notes", + "fieldtype": "Markdown Editor", + "label": "Release Notes" + }, + { + "default": "0", + "fieldname": "publish", + "fieldtype": "Check", + "label": "Publish" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2021-09-05 16:04:32.860988", + "modified_by": "Administrator", + "module": "Core", + "name": "Package Release", + "naming_rule": "By script", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/frappe/core/doctype/package_release/package_release.py b/frappe/core/doctype/package_release/package_release.py new file mode 100644 index 0000000000..ea6906a190 --- /dev/null +++ b/frappe/core/doctype/package_release/package_release.py @@ -0,0 +1,79 @@ +# Copyright (c) 2021, Frappe Technologies and contributors +# For license information, please see license.txt + +import frappe +from frappe.model.document import Document +from frappe.modules.export_file import export_doc +import os, subprocess + +class PackageRelease(Document): + def set_version(self): + # set the next patch release by default + if not self.major: + self.major = frappe.db.max('Package Release', 'major', dict(package=self.package)) + if not self.minor: + self.minor = frappe.db.max('Package Release', 'minor', dict(package=self.package)) + if not self.patch: + self.patch = frappe.db.max('Package Release', 'patch', dict(package=self.package)) + 1 + + def autoname(self): + self.set_version() + self.name = '{}-{}.{}.{}'.format( + frappe.db.get_value('Package', self.package, 'package_name'), + self.major, self.minor, self.patch) + + def validate(self): + if self.publish: + self.export_files() + + def export_files(self): + '''Export all the documents in this package to site/packages folder''' + package = frappe.get_doc('Package', self.package) + + self.export_modules() + self.export_package_files(package) + self.make_tarfile(package) + + def export_modules(self): + for m in frappe.db.get_all('Module Def', dict(package=self.package)): + module = frappe.get_doc('Module Def', m.name) + for l in module.meta.links: + if l.link_doctype == 'Module Def': continue + # all documents of the type in the module + for d in frappe.get_all(l.link_doctype, dict(module=m.name)): + export_doc(frappe.get_doc(l.link_doctype, d.name)) + + def export_package_files(self, package): + # write readme + with open(frappe.get_site_path('packages', package.package_name, 'README.md'), 'w') as readme: + readme.write(package.readme) + + # write license + if package.license: + with open(frappe.get_site_path('packages', package.package_name, 'LICENSE.md'), 'w') as license: + license.write(package.license) + + # write package.json as `frappe_package.json` + with open(frappe.get_site_path('packages', package.package_name, package.package_name + '.json'), 'w') as packagefile: + packagefile.write(frappe.as_json(package.as_dict(no_nulls=True))) + + def make_tarfile(self, package): + # make tarfile + filename = '{}.tar.gz'.format(self.name) + subprocess.check_output(['tar', 'czf', filename, package.package_name], + cwd=frappe.get_site_path('packages')) + + # move file + subprocess.check_output(['mv', frappe.get_site_path('packages', filename), + frappe.get_site_path('public', 'files')]) + + # make attachment + file = frappe.get_doc(dict( + doctype = 'File', + file_url = '/' + os.path.join('files', filename), + attached_to_doctype = self.doctype, + attached_to_name = self.name + )) + + file.flags.ignore_duplicate_entry_error = True + file.insert() diff --git a/frappe/core/doctype/package_release/test_package_release.py b/frappe/core/doctype/package_release/test_package_release.py new file mode 100644 index 0000000000..6a15e8625b --- /dev/null +++ b/frappe/core/doctype/package_release/test_package_release.py @@ -0,0 +1,8 @@ +# Copyright (c) 2021, Frappe Technologies and Contributors +# See license.txt + +# import frappe +import unittest + +class TestPackageRelease(unittest.TestCase): + pass diff --git a/frappe/core/doctype/server_script/server_script.json b/frappe/core/doctype/server_script/server_script.json index b7e49673f8..520c0008c5 100644 --- a/frappe/core/doctype/server_script/server_script.json +++ b/frappe/core/doctype/server_script/server_script.json @@ -13,6 +13,7 @@ "api_method", "allow_guest", "column_break_3", + "module", "disabled", "section_break_8", "script", @@ -93,6 +94,12 @@ "label": "Event Frequency", "mandatory_depends_on": "eval:doc.script_type == \"Scheduler Event\"", "options": "All\nHourly\nDaily\nWeekly\nMonthly\nYearly\nHourly Long\nDaily Long\nWeekly Long\nMonthly Long" + }, + { + "fieldname": "module", + "fieldtype": "Link", + "label": "Module (for export)", + "options": "Module Def" } ], "index_web_pages_for_search": 1, @@ -102,7 +109,7 @@ "link_fieldname": "server_script" } ], - "modified": "2021-02-18 12:36:19.803425", + "modified": "2021-09-04 12:02:43.671240", "modified_by": "Administrator", "module": "Core", "name": "Server Script", diff --git a/frappe/core/doctype/server_script/server_script.py b/frappe/core/doctype/server_script/server_script.py index 036e3638af..79fe7a9140 100644 --- a/frappe/core/doctype/server_script/server_script.py +++ b/frappe/core/doctype/server_script/server_script.py @@ -27,6 +27,11 @@ class ServerScript(Document): for job in self.scheduled_jobs: frappe.delete_doc("Scheduled Job Type", job.name) + def get_code_fields(self): + return { + 'script': 'py' + } + @property def scheduled_jobs(self) -> List[Dict[str, str]]: return frappe.get_all( diff --git a/frappe/core/workspace/build/build.json b/frappe/core/workspace/build/build.json index 464052ba39..8536c807d2 100644 --- a/frappe/core/workspace/build/build.json +++ b/frappe/core/workspace/build/build.json @@ -2,7 +2,7 @@ "cards_label": "Elements", "category": "", "charts": [], - "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"DocType\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Workspace\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Report\", \"col\": 4}}, {\"type\": \"spacer\", \"data\": {\"col\": 12}}, {\"type\": \"header\", \"data\": {\"text\": \"Elements\", \"level\": 4, \"col\": 12}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Modules\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Models\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Views\", \"col\": 4}}, {\"type\": \"card\", \"data\": {\"card_name\": \"Scripting\", \"col\": 4}}]", + "content": "[{\"type\":\"header\",\"data\":{\"text\":\"Your Shortcuts\",\"level\":4,\"col\":12}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"DocType\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Workspace\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Report\",\"col\":4}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"Elements\",\"level\":4,\"col\":12}},{\"type\":\"card\",\"data\":{\"card_name\":\"Modules\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Models\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Views\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Scripting\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Packages\",\"col\":4}}]", "creation": "2021-01-02 10:51:16.579957", "developer_mode_only": 0, "disable_user_customization": 0, @@ -200,9 +200,37 @@ "onboard": 0, "only_for": "", "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Packages", + "link_count": 2, + "onboard": 0, + "type": "Card Break" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Package", + "link_count": 0, + "link_to": "Package", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Package Import", + "link_count": 0, + "link_to": "Package Import", + "link_type": "DocType", + "onboard": 0, + "type": "Link" } ], - "modified": "2021-08-05 12:15:55.793022", + "modified": "2021-09-05 21:14:52.384815", "modified_by": "Administrator", "module": "Core", "name": "Build", diff --git a/frappe/custom/doctype/client_script/client_script.json b/frappe/custom/doctype/client_script/client_script.json index db02d8d4bc..50f6bf3cc4 100644 --- a/frappe/custom/doctype/client_script/client_script.json +++ b/frappe/custom/doctype/client_script/client_script.json @@ -9,7 +9,10 @@ "field_order": [ "dt", "view", + "column_break_3", + "module", "enabled", + "section_break_6", "script", "sample" ], @@ -53,13 +56,27 @@ "label": "Apply To", "options": "List\nForm", "set_only_once": 1 + }, + { + "fieldname": "column_break_3", + "fieldtype": "Column Break" + }, + { + "fieldname": "module", + "fieldtype": "Link", + "label": "Module (for export)", + "options": "Module Def" + }, + { + "fieldname": "section_break_6", + "fieldtype": "Section Break" } ], "icon": "fa fa-glass", "idx": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2021-03-16 20:33:51.400191", + "modified": "2021-09-04 12:03:27.029815", "modified_by": "Administrator", "module": "Custom", "name": "Client Script", diff --git a/frappe/custom/doctype/custom_field/custom_field.json b/frappe/custom/doctype/custom_field/custom_field.json index 55a7ec5963..a8b1fb0e23 100644 --- a/frappe/custom/doctype/custom_field/custom_field.json +++ b/frappe/custom/doctype/custom_field/custom_field.json @@ -8,6 +8,7 @@ "engine": "InnoDB", "field_order": [ "dt", + "module", "label", "label_help", "fieldname", @@ -411,13 +412,19 @@ "fieldname": "non_negative", "fieldtype": "Check", "label": "Non Negative" + }, + { + "fieldname": "module", + "fieldtype": "Link", + "label": "Module (for export)", + "options": "Module Def" } ], "icon": "fa fa-glass", "idx": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2021-07-12 05:54:13.042319", + "modified": "2021-09-04 12:45:22.810120", "modified_by": "Administrator", "module": "Custom", "name": "Custom Field", diff --git a/frappe/custom/doctype/property_setter/property_setter.json b/frappe/custom/doctype/property_setter/property_setter.json index b318d92c5a..fcb36637fe 100644 --- a/frappe/custom/doctype/property_setter/property_setter.json +++ b/frappe/custom/doctype/property_setter/property_setter.json @@ -13,6 +13,8 @@ "field_name", "row_name", "column_break0", + "module", + "section_break_9", "property", "property_type", "value", @@ -91,13 +93,23 @@ "fieldname": "row_name", "fieldtype": "Data", "label": "Row Name" + }, + { + "fieldname": "module", + "fieldtype": "Link", + "label": "Module (for export)", + "options": "Module Def" + }, + { + "fieldname": "section_break_9", + "fieldtype": "Section Break" } ], "icon": "fa fa-glass", "idx": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2020-09-24 14:42:38.599684", + "modified": "2021-09-04 12:46:17.860769", "modified_by": "Administrator", "module": "Custom", "name": "Property Setter", diff --git a/frappe/database/database.py b/frappe/database/database.py index 227530e415..7a2d3e8b70 100644 --- a/frappe/database/database.py +++ b/frappe/database/database.py @@ -839,6 +839,23 @@ class Database(object): return count + def sum(self, dt, fieldname, filters=None): + return self._get_aggregation('SUM', dt, fieldname, filters) + + def avg(self, dt, fieldname, filters=None): + return self._get_aggregation('AVG', dt, fieldname, filters) + + def min(self, dt, fieldname, filters=None): + return self._get_aggregation('MIN', dt, fieldname, filters) + + def max(self, dt, fieldname, filters=None): + return self._get_aggregation('MAX', dt, fieldname, filters) + + def _get_aggregation(self, function, dt, fieldname, filters=None): + if not self.has_column(dt, fieldname): + frappe.throw('Invalid column', self.InvalidColumnName) + return self.get_all(dt, fields = ['%s(%s) as value' % (function, fieldname)], filters=filters)[0].get('value') or 0 + @staticmethod def format_date(date): return getdate(date).strftime("%Y-%m-%d") diff --git a/frappe/database/mariadb/framework_mariadb.sql b/frappe/database/mariadb/framework_mariadb.sql index f8841e9417..777e036049 100644 --- a/frappe/database/mariadb/framework_mariadb.sql +++ b/frappe/database/mariadb/framework_mariadb.sql @@ -61,6 +61,7 @@ CREATE TABLE `tabDocField` ( `in_preview` int(1) NOT NULL DEFAULT 0, `read_only` int(1) NOT NULL DEFAULT 0, `precision` varchar(255) DEFAULT NULL, + `max_height` varchar(10) DEFAULT NULL, `length` int(11) NOT NULL DEFAULT 0, `translatable` int(1) NOT NULL DEFAULT 0, `hide_border` int(1) NOT NULL DEFAULT 0, @@ -183,6 +184,7 @@ CREATE TABLE `tabDocType` ( `restrict_to_domain` varchar(255) DEFAULT NULL, `app` varchar(255) DEFAULT NULL, `autoname` varchar(255) DEFAULT NULL, + `naming_rule` varchar(40) DEFAULT NULL, `name_case` varchar(255) DEFAULT NULL, `title_field` varchar(255) DEFAULT NULL, `image_field` varchar(255) DEFAULT NULL, diff --git a/frappe/database/postgres/framework_postgres.sql b/frappe/database/postgres/framework_postgres.sql index a4e94aa326..868f98fc98 100644 --- a/frappe/database/postgres/framework_postgres.sql +++ b/frappe/database/postgres/framework_postgres.sql @@ -61,6 +61,7 @@ CREATE TABLE "tabDocField" ( "in_preview" smallint NOT NULL DEFAULT 0, "read_only" smallint NOT NULL DEFAULT 0, "precision" varchar(255) DEFAULT NULL, + "max_height" varchar(10) DEFAULT NULL, "length" bigint NOT NULL DEFAULT 0, "translatable" smallint NOT NULL DEFAULT 0, "hide_border" smallint NOT NULL DEFAULT 0, @@ -188,6 +189,7 @@ CREATE TABLE "tabDocType" ( "restrict_to_domain" varchar(255) DEFAULT NULL, "app" varchar(255) DEFAULT NULL, "autoname" varchar(255) DEFAULT NULL, + "naming_rule" varchar(40) DEFAULT NULL, "name_case" varchar(255) DEFAULT NULL, "title_field" varchar(255) DEFAULT NULL, "image_field" varchar(255) DEFAULT NULL, diff --git a/frappe/model/naming.py b/frappe/model/naming.py index 2e7f54938f..71ff281642 100644 --- a/frappe/model/naming.py +++ b/frappe/model/naming.py @@ -346,7 +346,7 @@ def _prompt_autoname(autoname, doc): """ # set from __newname in save.py if not doc.name: - frappe.throw(_("Name not set via prompt")) + frappe.throw(_("Please set the document name")) def _format_autoname(autoname, doc): """ diff --git a/frappe/model/sync.py b/frappe/model/sync.py index c2e3fcac08..138f9eaad4 100644 --- a/frappe/model/sync.py +++ b/frappe/model/sync.py @@ -80,9 +80,11 @@ def get_doc_files(files, start_path): # load in sequence - warning for devs document_types = ['doctype', 'page', 'report', 'dashboard_chart_source', 'print_format', - 'website_theme', 'web_form', 'web_template', 'notification', 'print_style', - 'data_migration_mapping', 'data_migration_plan', 'workspace', - 'onboarding_step', 'module_onboarding', 'form_tour'] + 'web_page', 'website_theme', 'web_form', 'web_template', + 'notification', 'print_style', + 'data_migration_mapping', 'data_migration_plan', + 'workspace', 'onboarding_step', 'module_onboarding', 'form_tour', + 'client_script', 'server_script', 'custom_field', 'property_setter'] for doctype in document_types: doctype_path = os.path.join(start_path, doctype) diff --git a/frappe/modules.txt b/frappe/modules.txt index ae10c3ad55..d45817409d 100644 --- a/frappe/modules.txt +++ b/frappe/modules.txt @@ -12,4 +12,6 @@ Data Migration Chat Social Automation -Event Streaming \ No newline at end of file +Event Streaming +Test Module +Test Module for Package \ No newline at end of file diff --git a/frappe/modules/export_file.py b/frappe/modules/export_file.py index 4a00295022..17e84ee488 100644 --- a/frappe/modules/export_file.py +++ b/frappe/modules/export_file.py @@ -6,7 +6,7 @@ import frappe.model from frappe.modules import scrub, get_module_path, scrub_dt_dn def export_doc(doc): - export_to_files([[doc.doctype, doc.name]]) + write_document_file(doc) def export_to_files(record_list=None, record_module=None, verbose=0, create_init=None): """ @@ -21,16 +21,10 @@ def export_to_files(record_list=None, record_module=None, verbose=0, create_init write_document_file(frappe.get_doc(record[0], record[1]), record_module, create_init=create_init, folder_name=folder_name) def write_document_file(doc, record_module=None, create_init=True, folder_name=None): - newdoc = doc.as_dict(no_nulls=True) - doc.run_method("before_export", newdoc) - - # strip out default fields from children - for df in doc.meta.get_table_fields(): - for d in newdoc.get(df.fieldname): - for fieldname in frappe.model.default_fields: - if fieldname in d: - del d[fieldname] + doc_export = doc.as_dict(no_nulls=True) + doc.run_method("before_export", doc_export) + strip_default_fields(doc, doc_export) module = record_module or get_module_name(doc) # create folder @@ -39,10 +33,33 @@ def write_document_file(doc, record_module=None, create_init=True, folder_name=N else: folder = create_folder(module, doc.doctype, doc.name, create_init) - # write the data file fname = scrub(doc.name) + write_code_files(folder, fname, doc, doc_export) + + # write the data file with open(os.path.join(folder, fname + ".json"), 'w+') as txtfile: - txtfile.write(frappe.as_json(newdoc)) + txtfile.write(frappe.as_json(doc_export)) + +def strip_default_fields(doc, doc_export): + # strip out default fields from children + for df in doc.meta.get_table_fields(): + for d in doc_export.get(df.fieldname): + for fieldname in frappe.model.default_fields: + if fieldname in d: + del d[fieldname] + +def write_code_files(folder, fname, doc, doc_export): + '''Export code files and strip from values''' + if hasattr(doc, 'get_code_fields'): + for key, extn in doc.get_code_fields().items(): + if doc.get(key): + with open(os.path.join(folder, fname + "." + extn), 'w+') as txtfile: + txtfile.write(doc.get(key)) + + # remove from exporting + del doc_export[key] + + def get_module_name(doc): if doc.doctype == 'Module Def': @@ -57,7 +74,10 @@ def get_module_name(doc): return module def create_folder(module, dt, dn, create_init): - module_path = get_module_path(module) + if frappe.db.get_value('Module Def', module, 'custom'): + module_path = get_custom_module_path(module) + else: + module_path = get_module_path(module) dt, dn = scrub_dt_dn(dt, dn) @@ -72,6 +92,23 @@ def create_folder(module, dt, dn, create_init): return folder +def get_custom_module_path(module): + package = frappe.db.get_value('Module Def', module, 'package') + if not package: + frappe.throw('Package must be set for custom Module {module}'.format(module=module)) + + path = os.path.join(get_package_path(package), scrub(module)) + if not os.path.exists(path): + os.makedirs(path) + + return path + +def get_package_path(package): + path = os.path.join(frappe.get_site_path('packages'), frappe.db.get_value('Package', package, 'package_name')) + if not os.path.exists(path): + os.makedirs(path) + return path + def create_init_py(module_path, dt, dn): def create_if_not_exists(path): initpy = os.path.join(path, '__init__.py') diff --git a/frappe/modules/import_file.py b/frappe/modules/import_file.py index e398e384e3..ecef0a2cc5 100644 --- a/frappe/modules/import_file.py +++ b/frappe/modules/import_file.py @@ -54,31 +54,26 @@ def import_file_by_path(path, force=False, data_import=False, pre_process=None, docs = [docs] for doc in docs: - if not force: - # check if timestamps match - db_modified = frappe.db.get_value(doc['doctype'], doc['name'], 'modified') - if db_modified and doc.get('modified')==get_datetime_str(db_modified): - return False + if not force and not is_changed(doc): + return False original_modified = doc.get("modified") - frappe.flags.in_import = True import_doc(doc, force=force, data_import=data_import, pre_process=pre_process, - ignore_version=ignore_version, reset_permissions=reset_permissions) - frappe.flags.in_import = False + ignore_version=ignore_version, reset_permissions=reset_permissions, path=path) if original_modified: - # since there is a new timestamp on the file, update timestamp in - if doc["doctype"] == doc["name"] and doc["name"]!="DocType": - frappe.db.sql("""update tabSingles set value=%s where field="modified" and doctype=%s""", - (original_modified, doc["name"])) - else: - frappe.db.sql("update `tab%s` set modified=%s where name=%s" % \ - (doc['doctype'], '%s', '%s'), - (original_modified, doc['name'])) + update_modified(original_modified, doc) return True +def is_changed(doc): + # check if timestamps match + db_modified = frappe.db.get_value(doc['doctype'], doc['name'], 'modified') + if db_modified and doc.get('modified')==get_datetime_str(db_modified): + return False + return True + def read_doc_from_file(path): doc = None if os.path.exists(path): @@ -93,8 +88,18 @@ def read_doc_from_file(path): return doc +def update_modified(original_modified, doc): + # since there is a new timestamp on the file, update timestamp in + if doc["doctype"] == doc["name"] and doc["name"]!="DocType": + frappe.db.sql("""update tabSingles set value=%s where field="modified" and doctype=%s""", + (original_modified, doc["name"])) + else: + frappe.db.sql("update `tab%s` set modified=%s where name=%s" % \ + (doc['doctype'], '%s', '%s'), + (original_modified, doc['name'])) + def import_doc(docdict, force=False, data_import=False, pre_process=None, - ignore_version=None, reset_permissions=False): + ignore_version=None, reset_permissions=False, path=None): frappe.flags.in_import = True docdict["__islocal"] = 1 @@ -104,14 +109,8 @@ def import_doc(docdict, force=False, data_import=False, pre_process=None, doc = frappe.get_doc(docdict) - # Note on Tree DocTypes: - # The tree structure is maintained in the database via the fields "lft" and - # "rgt". They are automatically set and kept up-to-date. Importing them - # would destroy any existing tree structure. - if getattr(doc.meta, 'is_tree', None) and any([doc.lft, doc.rgt]): - print('Ignoring values of `lft` and `rgt` for {} "{}"'.format(doc.doctype, doc.name)) - doc.lft = None - doc.rgt = None + reset_tree_properties(doc) + load_code_properties(doc, path) doc.run_method("before_import") @@ -119,27 +118,9 @@ def import_doc(docdict, force=False, data_import=False, pre_process=None, if pre_process: pre_process(doc) - ignore = [] - if frappe.db.exists(doc.doctype, doc.name): + delete_old_doc(doc, reset_permissions) - old_doc = frappe.get_doc(doc.doctype, doc.name) - - if doc.doctype in ignore_values: - # update ignore values - for key in ignore_values.get(doc.doctype) or []: - doc.set(key, old_doc.get(key)) - - # update ignored docs into new doc - for df in doc.meta.get_table_fields(): - if df.options in ignore_doctypes and not reset_permissions: - doc.set(df.fieldname, []) - ignore.append(df.options) - - # delete old - frappe.delete_doc(doc.doctype, doc.name, force=1, ignore_doctypes=ignore, for_reload=True) - - doc.flags.ignore_children_type = ignore doc.flags.ignore_links = True if not data_import: doc.flags.ignore_validate = True @@ -149,3 +130,47 @@ def import_doc(docdict, force=False, data_import=False, pre_process=None, doc.insert() frappe.flags.in_import = False + + return doc + +def load_code_properties(doc, path): + '''Load code files stored in separate files with extensions''' + if path: + if hasattr(doc, 'get_code_fields'): + dirname, filename = os.path.split(path) + for key, extn in doc.get_code_fields().items(): + codefile = os.path.join(dirname, filename.split('.')[0]+'.'+extn) + if os.path.exists(codefile): + with open(codefile,'r') as txtfile: + doc.set(key, txtfile.read()) + + +def delete_old_doc(doc, reset_permissions): + ignore = [] + old_doc = frappe.get_doc(doc.doctype, doc.name) + + if doc.doctype in ignore_values: + # update ignore values + for key in ignore_values.get(doc.doctype) or []: + doc.set(key, old_doc.get(key)) + + # update ignored docs into new doc + for df in doc.meta.get_table_fields(): + if df.options in ignore_doctypes and not reset_permissions: + doc.set(df.fieldname, []) + ignore.append(df.options) + + # delete old + frappe.delete_doc(doc.doctype, doc.name, force=1, ignore_doctypes=ignore, for_reload=True) + + doc.flags.ignore_children_type = ignore + +def reset_tree_properties(doc): + # Note on Tree DocTypes: + # The tree structure is maintained in the database via the fields "lft" and + # "rgt". They are automatically set and kept up-to-date. Importing them + # would destroy any existing tree structure. + if getattr(doc.meta, 'is_tree', None) and any([doc.lft, doc.rgt]): + print('Ignoring values of `lft` and `rgt` for {} "{}"'.format(doc.doctype, doc.name)) + doc.lft = None + doc.rgt = None diff --git a/frappe/public/js/frappe/form/controls/code.js b/frappe/public/js/frappe/form/controls/code.js index 5fbfa28073..60805b75de 100644 --- a/frappe/public/js/frappe/form/controls/code.js +++ b/frappe/public/js/frappe/form/controls/code.js @@ -14,11 +14,15 @@ frappe.ui.form.ControlCode = class ControlCode extends frappe.ui.form.ControlTex this.ace_editor_target.addClass('border rounded'); this.ace_editor_target.css('height', 300); + if (this.df.max_height) { + this.ace_editor_target.css('max-height', this.df.max_height); + } + // initialize const ace = window.ace; this.editor = ace.edit(this.ace_editor_target.get(0)); - if (this.df.max_lines || this.df.min_lines) { + if (this.df.max_lines || this.df.min_lines || this.df.max_height) { if (this.df.max_lines) this.editor.setOption("maxLines", this.df.max_lines); if (this.df.min_lines) diff --git a/frappe/public/js/frappe/form/controls/text.js b/frappe/public/js/frappe/form/controls/text.js index 3156df6d1c..ccf9a85feb 100644 --- a/frappe/public/js/frappe/form/controls/text.js +++ b/frappe/public/js/frappe/form/controls/text.js @@ -8,6 +8,9 @@ frappe.ui.form.ControlText = class ControlText extends frappe.ui.form.ControlDat make_input() { super.make_input(); this.$input.css({'height': '300px'}); + if (this.df.max_height) { + this.$input.css({'max-height': this.df.max_height}); + } } }; diff --git a/frappe/tests/test_db.py b/frappe/tests/test_db.py index 069ec25cca..73bb3e122f 100644 --- a/frappe/tests/test_db.py +++ b/frappe/tests/test_db.py @@ -43,10 +43,15 @@ class TestDB(unittest.TestCase): self.assertEqual(frappe.db.get_value('ToDo', todo1.name, 'description'), 'change 2') self.assertEqual(frappe.db.get_value('ToDo', todo2.name, 'description'), 'change 2') - def test_escape(self): frappe.db.escape("香港濟生堂製藥有限公司 - IT".encode("utf-8")) + def test_aggregation(self): + self.assertTrue(type(frappe.db.sum('DocField', 'permlevel')) in (int, float)) + self.assertTrue(type(frappe.db.avg('DocField', 'permlevel')) in (int, float)) + self.assertTrue(type(frappe.db.min('DocField', 'permlevel')) in (int, float)) + self.assertTrue(type(frappe.db.max('DocField', 'permlevel')) in (int, float)) + def test_get_single_value(self): #setup values_dict = { @@ -286,3 +291,4 @@ class TestDDLCommandsPost(unittest.TestCase): ) self.assertGreater(len(check_change), 0) self.assertIn("character varying", check_change[0]) + diff --git a/frappe/utils/safe_exec.py b/frappe/utils/safe_exec.py index 7ccd80e346..e18c498b3c 100644 --- a/frappe/utils/safe_exec.py +++ b/frappe/utils/safe_exec.py @@ -147,7 +147,12 @@ def get_safe_globals(): get_single_value = frappe.db.get_single_value, get_default = frappe.db.get_default, escape = frappe.db.escape, - sql = read_sql + sql = read_sql, + sum = frappe.db.sum, + avg = frappe.db.avg, + count = frappe.db.count, + min = frappe.db.min, + max = frappe.db.max ) if frappe.response: diff --git a/frappe/website/doctype/web_page/web_page.json b/frappe/website/doctype/web_page/web_page.json index 1ff3dcc359..2852d93705 100644 --- a/frappe/website/doctype/web_page/web_page.json +++ b/frappe/website/doctype/web_page/web_page.json @@ -11,16 +11,15 @@ "section_title", "title", "route", - "dynamic_route", - "slideshow", - "cb1", "published", - "full_width", - "show_title", + "dynamic_route", + "cb1", + "module", "start_date", "end_date", "sb1", "content_type", + "slideshow", "dynamic_template", "main_section", "main_section_md", @@ -34,7 +33,9 @@ "insert_style", "text_align", "css", + "full_width", "settings", + "show_title", "section_break_17", "show_sidebar", "website_sidebar", @@ -75,6 +76,7 @@ "unique": 1 }, { + "depends_on": "eval:doc.content_type=='Slideshow'", "fieldname": "slideshow", "fieldtype": "Link", "label": "Slideshow", @@ -118,7 +120,7 @@ "fieldname": "content_type", "fieldtype": "Select", "label": "Content Type", - "options": "Rich Text\nMarkdown\nHTML\nPage Builder" + "options": "Rich Text\nMarkdown\nHTML\nPage Builder\nSlideshow" }, { "depends_on": "eval:doc.content_type==='Rich Text'", @@ -305,6 +307,12 @@ "fieldtype": "Code", "label": "Context Script", "options": "Python" + }, + { + "fieldname": "module", + "fieldtype": "Link", + "label": "Module (for export)", + "options": "Module Def" } ], "has_web_view": 1, @@ -314,7 +322,7 @@ "is_published_field": "published", "links": [], "max_attachments": 20, - "modified": "2021-04-13 10:23:28.681197", + "modified": "2021-09-04 12:11:56.070994", "modified_by": "Administrator", "module": "Website", "name": "Web Page", diff --git a/frappe/website/doctype/web_template/web_template.json b/frappe/website/doctype/web_template/web_template.json index 3f7cd9b312..d2b909f950 100644 --- a/frappe/website/doctype/web_template/web_template.json +++ b/frappe/website/doctype/web_template/web_template.json @@ -45,7 +45,6 @@ "options": "Component\nSection\nNavbar\nFooter" }, { - "depends_on": "standard", "fieldname": "module", "fieldtype": "Link", "label": "Module", @@ -54,16 +53,12 @@ } ], "index_web_pages_for_search": 1, - "links": [ - { - "link_doctype": "Web Page", - "link_fieldname": "web_template" - } - ], - "modified": "2020-10-26 17:22:55.459453", + "links": [], + "modified": "2021-09-04 12:38:27.656042", "modified_by": "Administrator", "module": "Website", "name": "Web Template", + "naming_rule": "Set by user", "owner": "Administrator", "permissions": [ { From c2e93256f294aea5e7469a8eacc7e080825cd635 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Sun, 5 Sep 2021 22:14:24 +0530 Subject: [PATCH 44/58] fix(minor): remove test modules --- frappe/modules.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/frappe/modules.txt b/frappe/modules.txt index d45817409d..1229116a2e 100644 --- a/frappe/modules.txt +++ b/frappe/modules.txt @@ -13,5 +13,3 @@ Chat Social Automation Event Streaming -Test Module -Test Module for Package \ No newline at end of file From 5befc80cd4ed9f17bf821c50a340aeb3ed7dcc77 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Sun, 5 Sep 2021 22:30:09 +0530 Subject: [PATCH 45/58] fix(minor): linting --- frappe/core/doctype/doctype/doctype.js | 4 ++-- frappe/core/doctype/doctype/doctype.py | 2 +- frappe/core/doctype/package/package.py | 3 ++- frappe/core/doctype/package/test_package.py | 4 +++- frappe/core/doctype/package_import/package_import.py | 6 ++++-- frappe/core/doctype/package_release/package_release.py | 6 ++++-- frappe/database/database.py | 2 +- frappe/modules/import_file.py | 5 ++--- 8 files changed, 19 insertions(+), 13 deletions(-) diff --git a/frappe/core/doctype/doctype/doctype.js b/frappe/core/doctype/doctype/doctype.js index a6b46a9dc0..262a6efd90 100644 --- a/frappe/core/doctype/doctype/doctype.js +++ b/frappe/core/doctype/doctype/doctype.js @@ -100,10 +100,10 @@ frappe.ui.form.on('DocType', { 'Expression (old style)': 'Format: EXAMPLE-.##### Series by prefix (separated by a dot)', 'Random': '', 'By script': '' - } + }; if (frm.doc.naming_rule) { - frm.get_field('autoname').set_description(naming_rule_description[frm.doc.naming_rule]) + frm.get_field('autoname').set_description(naming_rule_description[frm.doc.naming_rule]); } }, diff --git a/frappe/core/doctype/doctype/doctype.py b/frappe/core/doctype/doctype/doctype.py index 70153268f5..9bf21690fc 100644 --- a/frappe/core/doctype/doctype/doctype.py +++ b/frappe/core/doctype/doctype/doctype.py @@ -1032,7 +1032,7 @@ def validate_fields(meta): def check_max_height(docfield): if getattr(docfield, 'max_height', None) and (docfield.max_height[-2:] not in ('px', 'em')): - frappe.throw('Max for {1} height must be in px, em, rem'.format(frappe.bold(docfield.fieldname))) + frappe.throw('Max for {} height must be in px, em, rem'.format(frappe.bold(docfield.fieldname))) fields = meta.get("fields") fieldname_list = [d.fieldname for d in fields] diff --git a/frappe/core/doctype/package/package.py b/frappe/core/doctype/package/package.py index 340496079d..aa9735c061 100644 --- a/frappe/core/doctype/package/package.py +++ b/frappe/core/doctype/package/package.py @@ -1,7 +1,8 @@ # Copyright (c) 2021, Frappe Technologies and contributors # For license information, please see license.txt -import frappe, os +import frappe +import os from frappe.model.document import Document class Package(Document): diff --git a/frappe/core/doctype/package/test_package.py b/frappe/core/doctype/package/test_package.py index 21ae50d250..3fb8d48274 100644 --- a/frappe/core/doctype/package/test_package.py +++ b/frappe/core/doctype/package/test_package.py @@ -1,7 +1,9 @@ # Copyright (c) 2021, Frappe Technologies and Contributors # See license.txt -import frappe, os, json +import frappe +import os +import json import unittest class TestPackage(unittest.TestCase): diff --git a/frappe/core/doctype/package_import/package_import.py b/frappe/core/doctype/package_import/package_import.py index b307a3bff9..f4a2d666dd 100644 --- a/frappe/core/doctype/package_import/package_import.py +++ b/frappe/core/doctype/package_import/package_import.py @@ -1,7 +1,9 @@ # Copyright (c) 2021, Frappe Technologies and contributors # For license information, please see license.txt -import frappe, os, json +import frappe +import os +import json import subprocess from frappe.model.document import Document from frappe.desk.form.load import get_attachments @@ -17,7 +19,7 @@ class PackageImport(Document): attachment = get_attachments(self.doctype, self.name) if not attachment: - frappe.throw('Please attach the package') + frappe.throw(frappe._('Please attach the package')) attachment = attachment[0] diff --git a/frappe/core/doctype/package_release/package_release.py b/frappe/core/doctype/package_release/package_release.py index ea6906a190..1fb8796882 100644 --- a/frappe/core/doctype/package_release/package_release.py +++ b/frappe/core/doctype/package_release/package_release.py @@ -4,7 +4,8 @@ import frappe from frappe.model.document import Document from frappe.modules.export_file import export_doc -import os, subprocess +import os +import subprocess class PackageRelease(Document): def set_version(self): @@ -38,7 +39,8 @@ class PackageRelease(Document): for m in frappe.db.get_all('Module Def', dict(package=self.package)): module = frappe.get_doc('Module Def', m.name) for l in module.meta.links: - if l.link_doctype == 'Module Def': continue + if l.link_doctype == 'Module Def': + continue # all documents of the type in the module for d in frappe.get_all(l.link_doctype, dict(module=m.name)): export_doc(frappe.get_doc(l.link_doctype, d.name)) diff --git a/frappe/database/database.py b/frappe/database/database.py index 7a2d3e8b70..45a496a621 100644 --- a/frappe/database/database.py +++ b/frappe/database/database.py @@ -853,7 +853,7 @@ class Database(object): def _get_aggregation(self, function, dt, fieldname, filters=None): if not self.has_column(dt, fieldname): - frappe.throw('Invalid column', self.InvalidColumnName) + frappe.throw(frappe._('Invalid column'), self.InvalidColumnName) return self.get_all(dt, fields = ['%s(%s) as value' % (function, fieldname)], filters=filters)[0].get('value') or 0 @staticmethod diff --git a/frappe/modules/import_file.py b/frappe/modules/import_file.py index ecef0a2cc5..e7a1f5f97c 100644 --- a/frappe/modules/import_file.py +++ b/frappe/modules/import_file.py @@ -94,9 +94,8 @@ def update_modified(original_modified, doc): frappe.db.sql("""update tabSingles set value=%s where field="modified" and doctype=%s""", (original_modified, doc["name"])) else: - frappe.db.sql("update `tab%s` set modified=%s where name=%s" % \ - (doc['doctype'], '%s', '%s'), - (original_modified, doc['name'])) + frappe.db.sql("update `tab%s` set modified=%s where name=%s" % (doc['doctype'], + '%s', '%s'), (original_modified, doc['name'])) def import_doc(docdict, force=False, data_import=False, pre_process=None, ignore_version=None, reset_permissions=False, path=None): From d807e3b1e2ac1a442149287c18d171b43f467400 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 6 Sep 2021 09:11:58 +0530 Subject: [PATCH 46/58] fix(minor): fix for aggregate functions, use special query --- frappe/database/database.py | 9 ++++++++- frappe/tests/test_db.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frappe/database/database.py b/frappe/database/database.py index 45a496a621..84bfa76cd7 100644 --- a/frappe/database/database.py +++ b/frappe/database/database.py @@ -854,7 +854,14 @@ class Database(object): def _get_aggregation(self, function, dt, fieldname, filters=None): if not self.has_column(dt, fieldname): frappe.throw(frappe._('Invalid column'), self.InvalidColumnName) - return self.get_all(dt, fields = ['%s(%s) as value' % (function, fieldname)], filters=filters)[0].get('value') or 0 + + query = f'SELECT {function}({fieldname}) AS value FROM `tab{dt}`' + values = () + if filters: + conditions, values = self.build_conditions(filters) + query = f"{query} WHERE {conditions}" + + return self.sql(query, values)[0][0] or 0 @staticmethod def format_date(date): diff --git a/frappe/tests/test_db.py b/frappe/tests/test_db.py index 73bb3e122f..e153220a1d 100644 --- a/frappe/tests/test_db.py +++ b/frappe/tests/test_db.py @@ -47,7 +47,7 @@ class TestDB(unittest.TestCase): frappe.db.escape("香港濟生堂製藥有限公司 - IT".encode("utf-8")) def test_aggregation(self): - self.assertTrue(type(frappe.db.sum('DocField', 'permlevel')) in (int, float)) + self.assertTrue(type(frappe.db.sum('DocField', 'permlevel', dict(parent=('like', 'doc')))) in (int, float)) self.assertTrue(type(frappe.db.avg('DocField', 'permlevel')) in (int, float)) self.assertTrue(type(frappe.db.min('DocField', 'permlevel')) in (int, float)) self.assertTrue(type(frappe.db.max('DocField', 'permlevel')) in (int, float)) From 5ccda1d5ac8d32f33c9095aed05f5ac5379cdd52 Mon Sep 17 00:00:00 2001 From: leela Date: Mon, 6 Sep 2021 10:27:10 +0530 Subject: [PATCH 47/58] fix: RTL support for text editor (cherry picked from commit 99f914698f7b86048c25087eb74dbd1fae707ac4) --- frappe/public/js/frappe/form/controls/comment.js | 2 ++ frappe/public/js/frappe/form/controls/text_editor.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/frappe/public/js/frappe/form/controls/comment.js b/frappe/public/js/frappe/form/controls/comment.js index 7c10b61366..b9b2d6a987 100644 --- a/frappe/public/js/frappe/form/controls/comment.js +++ b/frappe/public/js/frappe/form/controls/comment.js @@ -104,8 +104,10 @@ frappe.ui.form.ControlComment = class ControlComment extends frappe.ui.form.Cont return [ ['bold', 'italic', 'underline'], ['blockquote', 'code-block'], + [{ 'direction': "rtl" }], ['link', 'image'], [{ 'list': 'ordered' }, { 'list': 'bullet' }], + [{ 'align': [] }], ['clean'] ]; } diff --git a/frappe/public/js/frappe/form/controls/text_editor.js b/frappe/public/js/frappe/form/controls/text_editor.js index 99e87c5f21..2ce8fd1046 100644 --- a/frappe/public/js/frappe/form/controls/text_editor.js +++ b/frappe/public/js/frappe/form/controls/text_editor.js @@ -164,8 +164,11 @@ frappe.ui.form.ControlTextEditor = class ControlTextEditor extends frappe.ui.for ['bold', 'italic', 'underline', 'clean'], [{ 'color': [] }, { 'background': [] }], ['blockquote', 'code-block'], + // Adding Direction tool to give the user the ability to change text direction. + [{ 'direction': "rtl" }], ['link', 'image'], [{ 'list': 'ordered' }, { 'list': 'bullet' }, { 'list': 'check' }], + [{ 'align': [] }], [{ 'indent': '-1'}, { 'indent': '+1' }], [{'table': [ 'insert-table', From 768e4052f9de0d5bde38e11475617c3a4a69c677 Mon Sep 17 00:00:00 2001 From: leela Date: Fri, 3 Sep 2021 12:32:05 +0530 Subject: [PATCH 48/58] fix: node creation from tree view (cherry picked from commit f8cd2ad388c96eefff4730ce130806231bc0d87e) --- frappe/desk/treeview.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/frappe/desk/treeview.py b/frappe/desk/treeview.py index 704e5d8ed6..f40c135653 100644 --- a/frappe/desk/treeview.py +++ b/frappe/desk/treeview.py @@ -69,13 +69,11 @@ def make_tree_args(**kwarg): doctype = kwarg['doctype'] parent_field = 'parent_' + doctype.lower().replace(' ', '_') - name_field = kwarg.get('name_field', doctype.lower().replace(' ', '_') + '_name') if kwarg['is_root'] == 'false': kwarg['is_root'] = False if kwarg['is_root'] == 'true': kwarg['is_root'] = True kwarg.update({ - name_field: kwarg[name_field], parent_field: kwarg.get("parent") or kwarg.get(parent_field) }) From 62a205fe2efd9763b31e67009edce46fee2cad3f Mon Sep 17 00:00:00 2001 From: Saqib Date: Mon, 6 Sep 2021 12:43:17 +0530 Subject: [PATCH 49/58] feat: change custom button type (#14074) * feat: change custom button type using frm --- frappe/public/js/frappe/form/form.js | 4 ++++ frappe/public/js/frappe/ui/page.js | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/frappe/public/js/frappe/form/form.js b/frappe/public/js/frappe/form/form.js index 3588923527..8a691e8012 100644 --- a/frappe/public/js/frappe/form/form.js +++ b/frappe/public/js/frappe/form/form.js @@ -1152,6 +1152,10 @@ frappe.ui.form.Form = class FrappeForm { return btn; } + change_custom_button_type(label, group, type) { + this.page.change_inner_button_type(label, group, type); + } + clear_custom_buttons() { this.page.clear_inner_toolbar(); this.page.clear_user_actions(); diff --git a/frappe/public/js/frappe/ui/page.js b/frappe/public/js/frappe/ui/page.js index 320227b258..c299edb7db 100644 --- a/frappe/public/js/frappe/ui/page.js +++ b/frappe/public/js/frappe/ui/page.js @@ -618,6 +618,23 @@ frappe.ui.Page = class Page { } } + change_inner_button_type(label, group, type) { + let btn; + + if (group) { + var $group = this.get_inner_group_button(__(group)); + if ($group.length) { + btn = $group.find(`.dropdown-item[data-label="${encodeURIComponent(label)}"]`); + } + } else { + btn = this.inner_toolbar.find(`button[data-label="${encodeURIComponent(label)}"]`); + } + + if (btn) { + btn.removeClass().addClass(`btn btn-${type} ellipsis`); + } + } + add_inner_message(message) { let $message = $(`${message}`); this.inner_toolbar.find('.inner-page-message').remove(); From f4d260de0d771fda0c66314d832d253f49aa2e77 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 6 Sep 2021 14:16:27 +0530 Subject: [PATCH 50/58] fix: Problems while using translations via Globe Symbol (#14128) Co-authored-by: Vama Mehta (cherry picked from commit 40f2e915918860ade1e514c8b0bb4cf1bb6d0b2b) Co-authored-by: vama --- frappe/public/js/frappe/form/controls/base_control.js | 2 +- frappe/translate.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/form/controls/base_control.js b/frappe/public/js/frappe/form/controls/base_control.js index d6c268a28a..6a14637f33 100644 --- a/frappe/public/js/frappe/form/controls/base_control.js +++ b/frappe/public/js/frappe/form/controls/base_control.js @@ -131,7 +131,7 @@ frappe.ui.form.Control = class BaseControl { if (!this.doc.__islocal) { new frappe.views.TranslationManager({ 'df': this.df, - 'source_text': value, + 'source_text': this.value, 'target_language': this.doc.language, 'doc': this.doc }); diff --git a/frappe/translate.py b/frappe/translate.py index f1dbfdec59..6f3ed81dc2 100644 --- a/frappe/translate.py +++ b/frappe/translate.py @@ -821,6 +821,9 @@ def update_translations_for_source(source=None, translation_dict=None): translation_dict = json.loads(translation_dict) + if is_html(source): + source = strip_html_tags(source) + # for existing records translation_records = frappe.db.get_values('Translation', { 'source_text': source From 6f0a02aaa533bdf7a0848f46547d2aab61399dfc Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 6 Sep 2021 19:37:39 +0530 Subject: [PATCH 51/58] fix: Handle multiple comment types in get_comments --- frappe/desk/form/load.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/frappe/desk/form/load.py b/frappe/desk/form/load.py index c86efbcefd..80c0b2d471 100644 --- a/frappe/desk/form/load.py +++ b/frappe/desk/form/load.py @@ -1,6 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE +from typing import Dict, List, Union import frappe, json import frappe.utils import frappe.share @@ -138,10 +139,11 @@ def get_communications(doctype, name, start=0, limit=20): return _get_communications(doctype, name, start, limit) -def get_comments(doctype, name, comment_type='Comment'): - comment_types = [comment_type] +def get_comments(doctype: str, name: str, comment_type : Union[str, List[str]] = "Comment") -> List[frappe._dict]: + if isinstance(comment_type, list): + comment_types = comment_type - if comment_type == 'share': + elif comment_type == 'share': comment_types = ['Shared', 'Unshared'] elif comment_type == 'assignment': @@ -150,15 +152,21 @@ def get_comments(doctype, name, comment_type='Comment'): elif comment_type == 'attachment': comment_types = ['Attachment', 'Attachment Removed'] - comments = frappe.get_all('Comment', fields = ['name', 'creation', 'content', 'owner', 'comment_type'], filters=dict( - reference_doctype = doctype, - reference_name = name, - comment_type = ['in', comment_types] - )) + else: + comment_types = [comment_type] + + comments = frappe.get_all("Comment", + fields=["name", "creation", "content", "owner", "comment_type"], + filters={ + "reference_doctype": doctype, + "reference_name": name, + "comment_type": ['in', comment_types], + } + ) # convert to markdown (legacy ?) - if comment_type == 'Comment': - for c in comments: + for c in comments: + if c.comment_type == "Comment": c.content = frappe.utils.markdown(c.content) return comments From a233bf1061ac7ad1deb9df9b169dfcd3a6e63f7d Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 6 Sep 2021 19:39:08 +0530 Subject: [PATCH 52/58] fix: Add workflow comments in form timeline * Add Edit, Label along with Info timeline logs * Added title field for timeline icon --- frappe/desk/form/load.py | 3 ++- .../js/frappe/form/footer/form_timeline.js | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/frappe/desk/form/load.py b/frappe/desk/form/load.py index 80c0b2d471..d276a9707f 100644 --- a/frappe/desk/form/load.py +++ b/frappe/desk/form/load.py @@ -106,9 +106,10 @@ def get_docinfo(doc=None, doctype=None, name=None): "assignment_logs": get_comments(doc.doctype, doc.name, 'assignment'), "permissions": get_doc_permissions(doc), "shared": frappe.share.get_users(doc.doctype, doc.name), - "info_logs": get_comments(doc.doctype, doc.name, 'Info'), + "info_logs": get_comments(doc.doctype, doc.name, comment_type=['Info', 'Edit', 'Label']), "share_logs": get_comments(doc.doctype, doc.name, 'share'), "like_logs": get_comments(doc.doctype, doc.name, 'Like'), + "workflow_logs": get_comments(doc.doctype, doc.name, comment_type="Workflow"), "views": get_view_logs(doc.doctype, doc.name), "energy_point_logs": get_point_logs(doc.doctype, doc.name), "additional_timeline_content": get_additional_timeline_content(doc.doctype, doc.name), diff --git a/frappe/public/js/frappe/form/footer/form_timeline.js b/frappe/public/js/frappe/form/footer/form_timeline.js index 115a62e098..adffce7c9c 100644 --- a/frappe/public/js/frappe/form/footer/form_timeline.js +++ b/frappe/public/js/frappe/form/footer/form_timeline.js @@ -136,6 +136,7 @@ class FormTimeline extends BaseTimeline { this.timeline_items.push(...this.get_energy_point_timeline_contents()); this.timeline_items.push(...this.get_version_timeline_contents()); this.timeline_items.push(...this.get_share_timeline_contents()); + this.timeline_items.push(...this.get_workflow_timeline_contents()); this.timeline_items.push(...this.get_like_timeline_contents()); this.timeline_items.push(...this.get_custom_timeline_contents()); this.timeline_items.push(...this.get_assignment_timeline_contents()); @@ -339,11 +340,26 @@ class FormTimeline extends BaseTimeline { icon_size: 'sm', creation: like_log.creation, content: __('{0} Liked', [this.get_user_link(like_log.owner)]), + title: "Like", }); }); return like_timeline_contents; } + get_workflow_timeline_contents() { + let workflow_timeline_contents = []; + (this.doc_info.workflow_logs || []).forEach(workflow_log => { + workflow_timeline_contents.push({ + icon: 'branch', + icon_size: 'sm', + creation: workflow_log.creation, + content: __(workflow_log.content), + title: "Workflow", + }); + }); + return workflow_timeline_contents; + } + get_custom_timeline_contents() { let custom_timeline_contents = []; (this.doc_info.additional_timeline_content || []).forEach(custom_item => { From f0b9eb5f7c848fa7e81e9ab25c427964674b96e3 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 6 Sep 2021 19:40:45 +0530 Subject: [PATCH 53/58] fix: Update available Frappe icons * Added icons for milestone * Updated Workflow and Branch icons for consistency --- frappe/public/icons/timeless/symbol-defs.svg | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frappe/public/icons/timeless/symbol-defs.svg b/frappe/public/icons/timeless/symbol-defs.svg index b2f1428967..b878f713e9 100644 --- a/frappe/public/icons/timeless/symbol-defs.svg +++ b/frappe/public/icons/timeless/symbol-defs.svg @@ -35,10 +35,13 @@ - + + + + @@ -680,7 +683,7 @@ - + From ab7dee13cfe31fa4882b6a1f4cc313d2c92ed893 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Thu, 2 Sep 2021 02:12:19 +0530 Subject: [PATCH 54/58] chore: Added return type for DatabaseQuery.execute --- frappe/model/db_query.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/model/db_query.py b/frappe/model/db_query.py index ae159c1a69..fd74a8cfe4 100644 --- a/frappe/model/db_query.py +++ b/frappe/model/db_query.py @@ -2,6 +2,7 @@ # License: MIT. See LICENSE """build query for doclistview and return results""" +from typing import List import frappe.defaults import frappe.share from frappe import _ @@ -33,7 +34,7 @@ class DatabaseQuery(object): join='left join', distinct=False, start=None, page_length=None, limit=None, ignore_ifnull=False, save_user_settings=False, save_user_settings_fields=False, update=None, add_total_row=None, user_settings=None, reference_doctype=None, - return_query=False, strict=True, pluck=None, ignore_ddl=False): + return_query=False, strict=True, pluck=None, ignore_ddl=False) -> List: if not ignore_permissions and \ not frappe.has_permission(self.doctype, "select", user=user) and \ not frappe.has_permission(self.doctype, "read", user=user): From d55254e7dc204c1d22685c26f3552da3c2e9d382 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 6 Sep 2021 19:45:44 +0530 Subject: [PATCH 55/58] feat(minor): Show title for form timeline icons --- frappe/public/js/frappe/form/footer/base_timeline.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/form/footer/base_timeline.js b/frappe/public/js/frappe/form/footer/base_timeline.js index ab4ad95a81..702d964442 100644 --- a/frappe/public/js/frappe/form/footer/base_timeline.js +++ b/frappe/public/js/frappe/form/footer/base_timeline.js @@ -86,7 +86,7 @@ class BaseTimeline { }); if (item.icon) { timeline_item.append(` -
+
${frappe.utils.icon(item.icon, item.icon_size || 'md')}
`); From 8b252d493aecf2a5ee6f0d99cd5b98a1087d9a98 Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Mon, 6 Sep 2021 22:49:48 +0530 Subject: [PATCH 56/58] ci: Conditionally run codecov upload --- .github/workflows/server-mariadb-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/server-mariadb-tests.yml b/.github/workflows/server-mariadb-tests.yml index 57a7fa304d..72b085c495 100644 --- a/.github/workflows/server-mariadb-tests.yml +++ b/.github/workflows/server-mariadb-tests.yml @@ -121,6 +121,7 @@ jobs: ORCHESTRATOR_URL: http://test-orchestrator.frappe.io - name: Upload coverage data + if: ${{ steps.check-build.outputs.build == 'strawberry' }} uses: codecov/codecov-action@v2 with: name: MariaDB From fba196484c4efc184f3997779e57dccdb24c7adc Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Mon, 6 Sep 2021 22:50:42 +0530 Subject: [PATCH 57/58] ci: Conditionally run codecov upload --- .github/workflows/server-postgres-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/server-postgres-tests.yml b/.github/workflows/server-postgres-tests.yml index 57ac9c6c60..ddc41c049c 100644 --- a/.github/workflows/server-postgres-tests.yml +++ b/.github/workflows/server-postgres-tests.yml @@ -124,6 +124,7 @@ jobs: ORCHESTRATOR_URL: http://test-orchestrator.frappe.io - name: Upload coverage data + if: ${{ steps.check-build.outputs.build == 'strawberry' }} uses: codecov/codecov-action@v2 with: name: Postgres From 3594890eb283c7b1b8144d5029bb69551da01f61 Mon Sep 17 00:00:00 2001 From: leela Date: Mon, 6 Sep 2021 19:57:09 +0530 Subject: [PATCH 58/58] fix: customizing print formats Currently system managers can only customize the print formats even though the other roles has a permissions to do so. Fixed it to show customize button based on permissions. (cherry picked from commit f9486fce5fb24402fce31e3d36370120c4524a9b) --- .../doctype/print_format/print_format.js | 30 ++++++++++--------- frappe/printing/page/print/print.js | 2 +- frappe/public/js/frappe/views/pageview.js | 2 +- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/frappe/printing/doctype/print_format/print_format.js b/frappe/printing/doctype/print_format/print_format.js index 786f8f97ab..adc5e2363c 100644 --- a/frappe/printing/doctype/print_format/print_format.js +++ b/frappe/printing/doctype/print_format/print_format.js @@ -36,21 +36,23 @@ frappe.ui.form.on("Print Format", { else if (frm.doc.custom_format && !frm.doc.raw_printing) { frm.set_df_property("html", "reqd", 1); } - frappe.db.get_value('DocType', frm.doc.doc_type, 'default_print_format', (r) => { - if (r.default_print_format != frm.doc.name) { - frm.add_custom_button(__("Set as Default"), function () { - frappe.call({ - method: "frappe.printing.doctype.print_format.print_format.make_default", - args: { - name: frm.doc.name - }, - callback: function() { - frm.refresh(); - } + if (frappe.perm.has_perm('DocType', 0, 'read', frm.doc.doc_type)) { + frappe.db.get_value('DocType', frm.doc.doc_type, 'default_print_format', (r) => { + if (r.default_print_format != frm.doc.name) { + frm.add_custom_button(__("Set as Default"), function () { + frappe.call({ + method: "frappe.printing.doctype.print_format.print_format.make_default", + args: { + name: frm.doc.name + }, + callback: function() { + frm.refresh(); + } + }); }); - }); - } - }); + } + }); + } } }, custom_format: function (frm) { diff --git a/frappe/printing/page/print/print.js b/frappe/printing/page/print/print.js index ca2a340661..da34dfda96 100644 --- a/frappe/printing/page/print/print.js +++ b/frappe/printing/page/print/print.js @@ -174,7 +174,7 @@ frappe.ui.form.PrintView = class { }); } - if (frappe.user.has_role('System Manager')) { + if (frappe.perm.has_perm('Print Format', 0, 'create')) { this.page.add_menu_item(__('Customize'), () => this.edit_print_format() ); diff --git a/frappe/public/js/frappe/views/pageview.js b/frappe/public/js/frappe/views/pageview.js index 705d13b7f0..c8944e272a 100644 --- a/frappe/public/js/frappe/views/pageview.js +++ b/frappe/public/js/frappe/views/pageview.js @@ -148,4 +148,4 @@ frappe.show_message_page = function(opts) { ); frappe.container.change_to(opts.page_name); -}; \ No newline at end of file +};