From e5dacb6e1a9693b44d7626413061c2dc565c60a2 Mon Sep 17 00:00:00 2001
From: prssanna
Date: Mon, 30 Mar 2020 18:33:58 +0530
Subject: [PATCH 01/29] fix: add scroll to grid form
---
frappe/public/less/form_grid.less | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/frappe/public/less/form_grid.less b/frappe/public/less/form_grid.less
index 28f08635ba..ed457a9ce8 100644
--- a/frappe/public/less/form_grid.less
+++ b/frappe/public/less/form_grid.less
@@ -262,6 +262,11 @@
border-bottom: 1px solid @border-color;
}
+.grid-form-body {
+ max-height: 75vh;
+ overflow-y: auto;
+}
+
.grid-header-toolbar {
display: flow-root;
}
From 8f4a958b3d82561018759feb1b812f1c9b550e0a Mon Sep 17 00:00:00 2001
From: prssanna
Date: Mon, 30 Mar 2020 18:34:46 +0530
Subject: [PATCH 02/29] fix: scroll back to row in case body is scrolled
---
frappe/public/js/frappe/form/grid_row.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/frappe/public/js/frappe/form/grid_row.js b/frappe/public/js/frappe/form/grid_row.js
index 0e36e671cc..7f6039a2a2 100644
--- a/frappe/public/js/frappe/form/grid_row.js
+++ b/frappe/public/js/frappe/form/grid_row.js
@@ -550,6 +550,7 @@ export default class GridRow {
hide_form() {
frappe.dom.unfreeze();
this.row.toggle(true);
+ frappe.utils.scroll_to(this.row);
this.refresh();
if(cur_frm) cur_frm.cur_grid = null;
this.wrapper.removeClass("grid-row-open");
From bf92c8a4040ba698fdaa0fd35fca8979dd2490f9 Mon Sep 17 00:00:00 2001
From: prssanna
Date: Mon, 30 Mar 2020 19:08:24 +0530
Subject: [PATCH 03/29] refactor: add element_to_be_scrolled as parameter to
frappe.utils.scroll_to
---
frappe/public/js/frappe/form/grid_row_form.js | 1 +
frappe/public/js/frappe/utils/utils.js | 14 ++++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/frappe/public/js/frappe/form/grid_row_form.js b/frappe/public/js/frappe/form/grid_row_form.js
index 73f0856c08..47da96f4d7 100644
--- a/frappe/public/js/frappe/form/grid_row_form.js
+++ b/frappe/public/js/frappe/form/grid_row_form.js
@@ -9,6 +9,7 @@ export default class GridRowForm {
var me = this;
this.make_form();
this.form_area.empty();
+ frappe.utils.scroll_to(0, false, 0, this.wrapper.find('.grid-form-body'))
this.layout = new frappe.ui.form.Layout({
fields: this.row.docfields,
diff --git a/frappe/public/js/frappe/utils/utils.js b/frappe/public/js/frappe/utils/utils.js
index 278c80897e..dd2db371a1 100644
--- a/frappe/public/js/frappe/utils/utils.js
+++ b/frappe/public/js/frappe/utils/utils.js
@@ -122,9 +122,11 @@ Object.assign(frappe.utils, {
');
return content.html();
},
- scroll_to: function(element, animate, additional_offset) {
+ scroll_to: function(element, animate, additional_offset, element_to_be_scrolled) {
+ element_to_be_scrolled = element_to_be_scrolled || $("html, body");
+
var y = 0;
- if(element && typeof element==='number') {
+ if (element && typeof element==="number") {
y = element;
} else if(element) {
var header_offset = $(".navbar").height() + $(".page-head").height();
@@ -136,14 +138,14 @@ Object.assign(frappe.utils, {
}
// already there
- if(y==$('html, body').scrollTop()) {
+ if (y == element_to_be_scrolled.scrollTop()) {
return;
}
- if (animate!==false) {
- $("html, body").animate({ scrollTop: y });
+ if (animate !== false) {
+ element_to_be_scrolled.animate({ scrollTop: y });
} else {
- $(window).scrollTop(y);
+ element_to_be_scrolled.scrollTop(y);
}
},
From 10d2931a19215ae57d3b00e12f50952003f2ffc4 Mon Sep 17 00:00:00 2001
From: prssanna
Date: Mon, 30 Mar 2020 19:08:47 +0530
Subject: [PATCH 04/29] fix: add offset
---
frappe/public/js/frappe/form/grid_row.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frappe/public/js/frappe/form/grid_row.js b/frappe/public/js/frappe/form/grid_row.js
index 7f6039a2a2..8cb7d7d664 100644
--- a/frappe/public/js/frappe/form/grid_row.js
+++ b/frappe/public/js/frappe/form/grid_row.js
@@ -550,7 +550,7 @@ export default class GridRow {
hide_form() {
frappe.dom.unfreeze();
this.row.toggle(true);
- frappe.utils.scroll_to(this.row);
+ frappe.utils.scroll_to(this.row, false, 15);
this.refresh();
if(cur_frm) cur_frm.cur_grid = null;
this.wrapper.removeClass("grid-row-open");
From 34f2a0ada13d3e542d6e19540d7fe1d5aa63437d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 31 Mar 2020 09:38:12 +0000
Subject: [PATCH 05/29] chore(deps): bump bleach from 3.1.2 to 3.1.4
Bumps [bleach](https://github.com/mozilla/bleach) from 3.1.2 to 3.1.4.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v3.1.2...v3.1.4)
Signed-off-by: dependabot[bot]
---
requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index 55a4910056..bcf3760cd8 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
Babel==2.6.0
beautifulsoup4==4.8.2
bleach-whitelist==0.0.10
-bleach==3.1.2
+bleach==3.1.4
boto3==1.10.18
braintree==3.57.1
chardet==3.0.4
From 62b48aeca4306c28c45912854a10932b37c159a4 Mon Sep 17 00:00:00 2001
From: prssanna
Date: Mon, 6 Apr 2020 17:52:44 +0530
Subject: [PATCH 06/29] fix: remove field if no docfield exists
---
frappe/public/js/frappe/list/list_sidebar_group_by.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/frappe/public/js/frappe/list/list_sidebar_group_by.js b/frappe/public/js/frappe/list/list_sidebar_group_by.js
index bd37b71ae4..f72ff33e4c 100644
--- a/frappe/public/js/frappe/list/list_sidebar_group_by.js
+++ b/frappe/public/js/frappe/list/list_sidebar_group_by.js
@@ -53,14 +53,17 @@ frappe.views.ListGroupBy = class ListGroupBy {
render_group_by_items() {
let get_item_html = (fieldname) => {
- let label;
- let fieldtype;
+ let label, fieldtype;
if (fieldname === 'assigned_to') {
label = __('Assigned To');
} else if (fieldname === 'owner') {
label = __('Created By');
} else {
label = frappe.meta.get_label(this.doctype, fieldname);
+ let docfield = frappe.meta.get_docfield(this.doctype, fieldname);
+ if (!docfield) {
+ return;
+ }
fieldtype = frappe.meta.get_docfield(this.doctype, fieldname).fieldtype;
}
From ed9fd709adb8a9296f7d94fce6c213cf0d06bbfa Mon Sep 17 00:00:00 2001
From: "Chinmay D. Pai"
Date: Mon, 6 Apr 2020 19:02:30 +0530
Subject: [PATCH 07/29] fix: update newsletter status on sending
sets email_sent, schedule_send, and scheduled_to_send on newsletter
being sent
also switch to raw sql query to avoid default set by coalesce
Signed-off-by: Chinmay D. Pai
---
frappe/email/doctype/newsletter/newsletter.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/frappe/email/doctype/newsletter/newsletter.py b/frappe/email/doctype/newsletter/newsletter.py
index 2d40ffd800..056f3a0b02 100755
--- a/frappe/email/doctype/newsletter/newsletter.py
+++ b/frappe/email/doctype/newsletter/newsletter.py
@@ -51,9 +51,6 @@ class Newsletter(WebsiteGenerator):
frappe.msgprint(_("Scheduled to send to {0} recipients").format(len(self.recipients)))
- frappe.db.set(self, "email_sent", 1)
- frappe.db.set(self, "schedule_send", now_datetime())
- frappe.db.set(self, 'scheduled_to_send', len(self.recipients))
else:
frappe.msgprint(_("Newsletter should have atleast one recipient"))
@@ -217,6 +214,9 @@ def send_newsletter(newsletter):
try:
doc = frappe.get_doc("Newsletter", newsletter)
doc.queue_all()
+ doc.db_set("email_sent", 1)
+ doc.db_set("schedule_send", now_datetime())
+ doc.db_set("scheduled_to_send", len(self.recipients))
except:
frappe.db.rollback()
@@ -265,9 +265,10 @@ def get_newsletter_list(doctype, txt, filters, limit_start, limit_page_length=20
def send_scheduled_email():
"""Send scheduled newsletter to the recipients."""
- scheduled_newsletter = frappe.get_all('Newsletter', filters = {
- 'schedule_send': ('<=', now_datetime()),
- 'email_sent': 0
- }, fields = ['name'])
+ scheduled_newsletter = frappe.db.sql("""
+SELECT name from `tabNewsletter`
+WHERE schedule_send <= %s
+AND email_sent = 0
+""", now_datetime(), as_dict=1)
for newsletter in scheduled_newsletter:
- send_newsletter(newsletter.name)
\ No newline at end of file
+ send_newsletter(newsletter.name)
From a1e297ecb1754551eeece7e79ab1345b45b8ba7a Mon Sep 17 00:00:00 2001
From: "Chinmay D. Pai"
Date: Mon, 6 Apr 2020 19:46:57 +0530
Subject: [PATCH 08/29] chore: fix codacy issue
Signed-off-by: Chinmay D. Pai
---
frappe/email/doctype/newsletter/newsletter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frappe/email/doctype/newsletter/newsletter.py b/frappe/email/doctype/newsletter/newsletter.py
index 056f3a0b02..ccb2e87264 100755
--- a/frappe/email/doctype/newsletter/newsletter.py
+++ b/frappe/email/doctype/newsletter/newsletter.py
@@ -216,7 +216,7 @@ def send_newsletter(newsletter):
doc.queue_all()
doc.db_set("email_sent", 1)
doc.db_set("schedule_send", now_datetime())
- doc.db_set("scheduled_to_send", len(self.recipients))
+ doc.db_set("scheduled_to_send", len(doc.recipients))
except:
frappe.db.rollback()
From 074be8124d90339a13cf4f4e531d070b2fd681a6 Mon Sep 17 00:00:00 2001
From: "Chinmay D. Pai"
Date: Tue, 7 Apr 2020 15:47:20 +0530
Subject: [PATCH 09/29] fix: set email_sent after enqueuing newsletters
Signed-off-by: Chinmay D. Pai
---
frappe/email/doctype/newsletter/newsletter.py | 22 +++++++++++--------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/frappe/email/doctype/newsletter/newsletter.py b/frappe/email/doctype/newsletter/newsletter.py
index ccb2e87264..a847940448 100755
--- a/frappe/email/doctype/newsletter/newsletter.py
+++ b/frappe/email/doctype/newsletter/newsletter.py
@@ -68,8 +68,8 @@ class Newsletter(WebsiteGenerator):
attachments = []
if self.send_attachements:
- files = frappe.get_all("File", fields = ["name"], filters = {"attached_to_doctype": "Newsletter",
- "attached_to_name":self.name}, order_by="creation desc")
+ files = frappe.get_all("File", fields=["name"], filters={"attached_to_doctype": "Newsletter",
+ "attached_to_name": self.name}, order_by="creation desc")
for file in files:
try:
@@ -79,17 +79,21 @@ class Newsletter(WebsiteGenerator):
except IOError:
frappe.throw(_("Unable to find attachment {0}").format(file.name))
- send(recipients = self.recipients, sender = sender,
- subject = self.subject, message = self.message,
- reference_doctype = self.doctype, reference_name = self.name,
- add_unsubscribe_link = self.send_unsubscribe_link, attachments=attachments,
- unsubscribe_method = "/unsubscribe",
- unsubscribe_params = {"name": self.name},
- send_priority = 0, queue_separately=True)
+ send(recipients=self.recipients, sender=sender,
+ subject=self.subject, message=self.message,
+ reference_doctype=self.doctype, reference_name=self.name,
+ add_unsubscribe_link=self.send_unsubscribe_link, attachments=attachments,
+ unsubscribe_method="/unsubscribe",
+ unsubscribe_params={"name": self.name},
+ send_priority=0, queue_separately=True)
if not frappe.flags.in_test:
frappe.db.auto_commit_on_many_writes = False
+ self.db_set("email_sent", 1)
+ self.db_set("schedule_send", now_datetime())
+ self.db_set("scheduled_to_send", len(self.recipients))
+
def get_recipients(self):
"""Get recipients from Email Group"""
recipients_list = []
From 8e0c9201a566f2276602f5cf12159b8f686cc2e0 Mon Sep 17 00:00:00 2001
From: Mangesh-Khairnar
Date: Tue, 7 Apr 2020 16:08:55 +0530
Subject: [PATCH 10/29] chore: remove duplicate db set
---
frappe/email/doctype/newsletter/newsletter.py | 3 ---
1 file changed, 3 deletions(-)
diff --git a/frappe/email/doctype/newsletter/newsletter.py b/frappe/email/doctype/newsletter/newsletter.py
index a847940448..b022655699 100755
--- a/frappe/email/doctype/newsletter/newsletter.py
+++ b/frappe/email/doctype/newsletter/newsletter.py
@@ -218,9 +218,6 @@ def send_newsletter(newsletter):
try:
doc = frappe.get_doc("Newsletter", newsletter)
doc.queue_all()
- doc.db_set("email_sent", 1)
- doc.db_set("schedule_send", now_datetime())
- doc.db_set("scheduled_to_send", len(doc.recipients))
except:
frappe.db.rollback()
From 3d772709672a43a7546153f25cfb4a87b2a51e7a Mon Sep 17 00:00:00 2001
From: prssanna
Date: Tue, 7 Apr 2020 18:05:17 +0530
Subject: [PATCH 11/29] fix: set animate as true
---
frappe/public/js/frappe/form/grid_row.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frappe/public/js/frappe/form/grid_row.js b/frappe/public/js/frappe/form/grid_row.js
index 8cb7d7d664..31d62dc445 100644
--- a/frappe/public/js/frappe/form/grid_row.js
+++ b/frappe/public/js/frappe/form/grid_row.js
@@ -550,7 +550,7 @@ export default class GridRow {
hide_form() {
frappe.dom.unfreeze();
this.row.toggle(true);
- frappe.utils.scroll_to(this.row, false, 15);
+ frappe.utils.scroll_to(this.row, true, 15);
this.refresh();
if(cur_frm) cur_frm.cur_grid = null;
this.wrapper.removeClass("grid-row-open");
From 0fdcce62a5ba3b67f9b31c4b4695ec34c1882694 Mon Sep 17 00:00:00 2001
From: prssanna
Date: Tue, 7 Apr 2020 18:07:27 +0530
Subject: [PATCH 12/29] style: missing semicolon
---
frappe/public/js/frappe/form/grid_row_form.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frappe/public/js/frappe/form/grid_row_form.js b/frappe/public/js/frappe/form/grid_row_form.js
index 47da96f4d7..f93640936f 100644
--- a/frappe/public/js/frappe/form/grid_row_form.js
+++ b/frappe/public/js/frappe/form/grid_row_form.js
@@ -9,7 +9,7 @@ export default class GridRowForm {
var me = this;
this.make_form();
this.form_area.empty();
- frappe.utils.scroll_to(0, false, 0, this.wrapper.find('.grid-form-body'))
+ frappe.utils.scroll_to(0, false, 0, this.wrapper.find('.grid-form-body'));
this.layout = new frappe.ui.form.Layout({
fields: this.row.docfields,
From 24e0174fcfe9535c8e0e2320c3228a33835b8924 Mon Sep 17 00:00:00 2001
From: Gavin D'souza
Date: Wed, 8 Apr 2020 12:35:33 +0530
Subject: [PATCH 13/29] fix: enable validations for email and phone data fields
---
frappe/contacts/doctype/contact/contact.json | 6 +-
.../doctype/contact_phone/contact_phone.json | 5 +-
frappe/core/doctype/user/user.json | 6 +-
.../core/doctype/user_email/user_email.json | 244 ++-----
.../doctype/email_account/email_account.json | 3 +-
.../contact_us_settings.json | 651 ++++--------------
6 files changed, 185 insertions(+), 730 deletions(-)
diff --git a/frappe/contacts/doctype/contact/contact.json b/frappe/contacts/doctype/contact/contact.json
index 7dd5aad4ce..2e2fb6df67 100644
--- a/frappe/contacts/doctype/contact/contact.json
+++ b/frappe/contacts/doctype/contact/contact.json
@@ -1,4 +1,5 @@
{
+ "actions": [],
"allow_events_in_timeline": 1,
"allow_import": 1,
"allow_rename": 1,
@@ -115,6 +116,7 @@
"label": "Phone",
"oldfieldname": "contact_no",
"oldfieldtype": "Data",
+ "options": "Phone",
"read_only": 1
},
{
@@ -200,6 +202,7 @@
"fieldname": "mobile_no",
"fieldtype": "Data",
"label": "Mobile No",
+ "options": "Phone",
"read_only": 1
},
{
@@ -245,7 +248,8 @@
"icon": "fa fa-user",
"idx": 1,
"image_field": "image",
- "modified": "2019-10-10 22:04:41.070479",
+ "links": [],
+ "modified": "2020-04-06 18:25:28.223693",
"modified_by": "Administrator",
"module": "Contacts",
"name": "Contact",
diff --git a/frappe/contacts/doctype/contact_phone/contact_phone.json b/frappe/contacts/doctype/contact_phone/contact_phone.json
index 3fb203ed69..5412e4a1b7 100644
--- a/frappe/contacts/doctype/contact_phone/contact_phone.json
+++ b/frappe/contacts/doctype/contact_phone/contact_phone.json
@@ -1,4 +1,5 @@
{
+ "actions": [],
"creation": "2019-08-02 13:10:37.890214",
"doctype": "DocType",
"editable_grid": 1,
@@ -14,6 +15,7 @@
"fieldtype": "Data",
"in_list_view": 1,
"label": "Number",
+ "options": "Phone",
"reqd": 1
},
{
@@ -34,7 +36,8 @@
}
],
"istable": 1,
- "modified": "2019-09-24 17:47:50.375326",
+ "links": [],
+ "modified": "2020-04-06 18:28:10.486220",
"modified_by": "Administrator",
"module": "Contacts",
"name": "Contact Phone",
diff --git a/frappe/core/doctype/user/user.json b/frappe/core/doctype/user/user.json
index 5ebde7e7bd..7ed14e094c 100644
--- a/frappe/core/doctype/user/user.json
+++ b/frappe/core/doctype/user/user.json
@@ -238,12 +238,14 @@
{
"fieldname": "phone",
"fieldtype": "Data",
- "label": "Phone"
+ "label": "Phone",
+ "options": "Phone"
},
{
"fieldname": "mobile_no",
"fieldtype": "Data",
"label": "Mobile No",
+ "options": "Phone",
"unique": 1
},
{
@@ -588,7 +590,7 @@
"image_field": "user_image",
"links": [],
"max_attachments": 5,
- "modified": "2020-03-23 22:59:26.154985",
+ "modified": "2020-04-08 12:27:36.716490",
"modified_by": "Administrator",
"module": "Core",
"name": "User",
diff --git a/frappe/core/doctype/user_email/user_email.json b/frappe/core/doctype/user_email/user_email.json
index 16e6b5a24e..b106ed4a19 100644
--- a/frappe/core/doctype/user_email/user_email.json
+++ b/frappe/core/doctype/user_email/user_email.json
@@ -1,201 +1,63 @@
{
- "allow_copy": 0,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2016-03-30 10:04:25.828742",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "",
- "editable_grid": 1,
+ "actions": [],
+ "creation": "2016-03-30 10:04:25.828742",
+ "doctype": "DocType",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+ "email_account",
+ "email_id",
+ "column_break_3",
+ "awaiting_password",
+ "enable_outgoing"
+ ],
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "email_account",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Email Account",
- "length": 0,
- "no_copy": 0,
- "options": "Email Account",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "fieldname": "email_account",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Email Account",
+ "options": "Email Account",
+ "reqd": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
"fetch_from": "email_account.email_id",
- "fieldname": "email_id",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Email ID",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "fieldname": "email_id",
+ "fieldtype": "Data",
+ "label": "Email ID",
+ "options": "Email",
+ "read_only": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fetch_from": "email_account.awaiting_password",
- "fieldname": "awaiting_password",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Awaiting Password",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "default": "0",
+ "fetch_from": "email_account.awaiting_password",
+ "fieldname": "awaiting_password",
+ "fieldtype": "Check",
+ "in_list_view": 1,
+ "label": "Awaiting Password",
+ "read_only": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fetch_from": "email_account.enable_outgoing",
- "fieldname": "enable_outgoing",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Enable Outgoing",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
+ "default": "0",
+ "fetch_from": "email_account.enable_outgoing",
+ "fieldname": "enable_outgoing",
+ "fieldtype": "Check",
+ "label": "Enable Outgoing",
+ "read_only": 1
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 1,
- "max_attachments": 0,
- "modified": "2018-05-25 22:43:34.045787",
- "modified_by": "Administrator",
- "module": "Core",
- "name": "User Email",
- "name_case": "",
- "owner": "Administrator",
- "permissions": [],
- "quick_entry": 0,
- "read_only": 0,
- "read_only_onload": 0,
- "show_name_in_global_search": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "track_changes": 0,
- "track_seen": 0
+ ],
+ "istable": 1,
+ "links": [],
+ "modified": "2020-04-06 19:19:12.130246",
+ "modified_by": "Administrator",
+ "module": "Core",
+ "name": "User Email",
+ "owner": "Administrator",
+ "permissions": [],
+ "sort_field": "modified",
+ "sort_order": "DESC"
}
\ No newline at end of file
diff --git a/frappe/email/doctype/email_account/email_account.json b/frappe/email/doctype/email_account/email_account.json
index e724102fdf..5c57a7f35d 100644
--- a/frappe/email/doctype/email_account/email_account.json
+++ b/frappe/email/doctype/email_account/email_account.json
@@ -66,6 +66,7 @@
"fieldtype": "Data",
"in_global_search": 1,
"label": "Email Address",
+ "options": "Email",
"reqd": 1
},
{
@@ -410,7 +411,7 @@
],
"icon": "fa fa-inbox",
"links": [],
- "modified": "2019-12-18 15:56:39.744520",
+ "modified": "2020-04-06 19:20:50.491146",
"modified_by": "Administrator",
"module": "Email",
"name": "Email Account",
diff --git a/frappe/website/doctype/contact_us_settings/contact_us_settings.json b/frappe/website/doctype/contact_us_settings/contact_us_settings.json
index 3f61032c63..4e7d1cff1b 100644
--- a/frappe/website/doctype/contact_us_settings/contact_us_settings.json
+++ b/frappe/website/doctype/contact_us_settings/contact_us_settings.json
@@ -1,559 +1,142 @@
{
- "allow_copy": 0,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2013-02-21 20:12:42",
- "custom": 0,
- "description": "Settings for Contact Us Page",
- "docstatus": 0,
- "doctype": "DocType",
- "editable_grid": 0,
+ "actions": [],
+ "creation": "2013-02-21 20:12:42",
+ "description": "Settings for Contact Us Page",
+ "doctype": "DocType",
+ "engine": "InnoDB",
+ "field_order": [
+ "introduction_section",
+ "forward_to_email",
+ "heading",
+ "introduction",
+ "query_options",
+ "address",
+ "address_title",
+ "address_line1",
+ "address_line2",
+ "city",
+ "state",
+ "pincode",
+ "country",
+ "column_break_14",
+ "phone",
+ "email_id",
+ "skype"
+ ],
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "introduction_section",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Introduction",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "introduction_section",
+ "fieldtype": "Section Break",
+ "label": "Introduction"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Send enquiries to this email address",
- "fieldname": "forward_to_email",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Forward To Email Address",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "description": "Send enquiries to this email address",
+ "fieldname": "forward_to_email",
+ "fieldtype": "Data",
+ "label": "Forward To Email Address",
+ "options": "Email"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Default: \"Contact Us\"",
- "fieldname": "heading",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Heading",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "description": "Default: \"Contact Us\"",
+ "fieldname": "heading",
+ "fieldtype": "Data",
+ "label": "Heading"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Introductory information for the Contact Us Page",
- "fieldname": "introduction",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Introduction",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "description": "Introductory information for the Contact Us Page",
+ "fieldname": "introduction",
+ "fieldtype": "Text Editor",
+ "label": "Introduction"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Contact options, like \"Sales Query, Support Query\" etc each on a new line or separated by commas.",
- "fieldname": "query_options",
- "fieldtype": "Small Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Query Options",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "description": "Contact options, like \"Sales Query, Support Query\" etc each on a new line or separated by commas.",
+ "fieldname": "query_options",
+ "fieldtype": "Small Text",
+ "label": "Query Options"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "address",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Address",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "address",
+ "fieldtype": "Section Break",
+ "label": "Address"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 1,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "address_title",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Address Title",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "bold": 1,
+ "fieldname": "address_title",
+ "fieldtype": "Data",
+ "label": "Address Title"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "address_line1",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Address Line 1",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "address_line1",
+ "fieldtype": "Data",
+ "label": "Address Line 1"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "address_line2",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Address Line 2",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "address_line2",
+ "fieldtype": "Data",
+ "label": "Address Line 2"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "city",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "City",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "city",
+ "fieldtype": "Data",
+ "label": "City"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "state",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "State",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "state",
+ "fieldtype": "Data",
+ "label": "State"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "pincode",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Pincode",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "pincode",
+ "fieldtype": "Data",
+ "label": "Pincode"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "country",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Country",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "country",
+ "fieldtype": "Data",
+ "label": "Country"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_14",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "column_break_14",
+ "fieldtype": "Column Break"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "phone",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Phone",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "phone",
+ "fieldtype": "Data",
+ "label": "Phone",
+ "options": "Phone"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "email_id",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Email Id",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "email_id",
+ "fieldtype": "Data",
+ "label": "Email Id",
+ "options": "Email"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "skype",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Skype",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
+ "fieldname": "skype",
+ "fieldtype": "Data",
+ "label": "Skype"
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "fa fa-cog",
- "idx": 1,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 1,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2017-09-04 21:41:55.580325",
- "modified_by": "Administrator",
- "module": "Website",
- "name": "Contact Us Settings",
- "owner": "Administrator",
+ ],
+ "icon": "fa fa-cog",
+ "idx": 1,
+ "issingle": 1,
+ "links": [],
+ "modified": "2020-04-06 19:17:46.083764",
+ "modified_by": "Administrator",
+ "module": "Website",
+ "name": "Contact Us Settings",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 0,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 0,
- "role": "Website Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
+ "create": 1,
+ "email": 1,
+ "print": 1,
+ "read": 1,
+ "role": "Website Manager",
+ "share": 1,
"write": 1
}
- ],
- "quick_entry": 0,
- "read_only": 0,
- "read_only_onload": 0,
- "show_name_in_global_search": 0,
- "track_changes": 1,
- "track_seen": 0
+ ],
+ "sort_field": "modified",
+ "sort_order": "DESC"
}
\ No newline at end of file
From 284c70809b2cf03314aedb960889d1561e51cb52 Mon Sep 17 00:00:00 2001
From: Suraj Shetty
Date: Wed, 8 Apr 2020 14:20:52 +0530
Subject: [PATCH 14/29] fix: Translatable strings with trailing spaces
---
.../customize_form_field.json | 4 +-
.../doctype/oauth_client/oauth_client.json | 956 +++++++++---------
frappe/model/naming.py | 6 +-
frappe/public/js/frappe/form/workflow.js | 26 +-
.../emails/delete_data_confirmation.html | 3 +-
5 files changed, 499 insertions(+), 496 deletions(-)
diff --git a/frappe/custom/doctype/customize_form_field/customize_form_field.json b/frappe/custom/doctype/customize_form_field/customize_form_field.json
index 57b4cec23b..34778a76e9 100644
--- a/frappe/custom/doctype/customize_form_field/customize_form_field.json
+++ b/frappe/custom/doctype/customize_form_field/customize_form_field.json
@@ -358,7 +358,7 @@
"default": "0",
"fieldname": "allow_in_quick_entry",
"fieldtype": "Check",
- "label": " Allow in Quick Entry "
+ "label": "Allow in Quick Entry"
},
{
"fieldname": "property_depends_on_section",
@@ -385,7 +385,7 @@
"idx": 1,
"istable": 1,
"links": [],
- "modified": "2020-03-16 14:53:40.619043",
+ "modified": "2020-04-07 14:53:40.619043",
"modified_by": "Administrator",
"module": "Custom",
"name": "Customize Form Field",
diff --git a/frappe/integrations/doctype/oauth_client/oauth_client.json b/frappe/integrations/doctype/oauth_client/oauth_client.json
index 47ede6e280..d0d45c36ab 100644
--- a/frappe/integrations/doctype/oauth_client/oauth_client.json
+++ b/frappe/integrations/doctype/oauth_client/oauth_client.json
@@ -1,517 +1,517 @@
{
- "allow_copy": 0,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "autoname": "",
- "beta": 0,
- "creation": "2016-08-24 14:07:21.955052",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Document",
- "editable_grid": 1,
- "engine": "InnoDB",
+ "allow_copy": 0,
+ "allow_guest_to_view": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "autoname": "",
+ "beta": 0,
+ "creation": "2016-08-24 14:07:21.955052",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Document",
+ "editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "",
- "fieldname": "client_id",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "App Client ID",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "",
+ "fieldname": "client_id",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "App Client ID",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "app_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "App Name",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "app_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "App Name",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "user",
- "fieldtype": "Link",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "User",
- "length": 0,
- "no_copy": 0,
- "options": "User",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "user",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "User",
+ "length": 0,
+ "no_copy": 0,
+ "options": "User",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "cb_1",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "cb_1",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "client_secret",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "App Client Secret",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "client_secret",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "App Client Secret",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "If checked, users will not see the Confirm Access dialog.",
- "fieldname": "skip_authorization",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Skip Authorization",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "If checked, users will not see the Confirm Access dialog.",
+ "fieldname": "skip_authorization",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Skip Authorization",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "",
- "fieldname": "sb_1",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "",
+ "fieldname": "sb_1",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "all openid",
- "description": "A list of resources which the Client App will have access to after the user allows it.
e.g. project",
- "fieldname": "scopes",
- "fieldtype": "Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Scopes",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "all openid",
+ "description": "A list of resources which the Client App will have access to after the user allows it.
e.g. project",
+ "fieldname": "scopes",
+ "fieldtype": "Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Scopes",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "cb_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "cb_3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "URIs for receiving authorization code once the user allows access, as well as failure responses. Typically a REST endpoint exposed by the Client App.\n
e.g. http://hostname//api/method/frappe.www.login.login_via_facebook",
- "fieldname": "redirect_uris",
- "fieldtype": "Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Redirect URIs",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "URIs for receiving authorization code once the user allows access, as well as failure responses. Typically a REST endpoint exposed by the Client App.\n
e.g. http://hostname//api/method/frappe.www.login.login_via_facebook",
+ "fieldname": "redirect_uris",
+ "fieldtype": "Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Redirect URIs",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "default_redirect_uri",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Default Redirect URI",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "default_redirect_uri",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Default Redirect URI",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "collapsible_depends_on": "1",
- "columns": 0,
- "fieldname": "sb_advanced",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": " Advanced Settings",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "collapsible_depends_on": "1",
+ "columns": 0,
+ "fieldname": "sb_advanced",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Advanced Settings",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "grant_type",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 1,
- "label": "Grant Type",
- "length": 0,
- "no_copy": 0,
- "options": "Authorization Code\nImplicit",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "grant_type",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 1,
+ "label": "Grant Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Authorization Code\nImplicit",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "cb_2",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "cb_2",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "Code",
- "fieldname": "response_type",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 1,
- "label": "Response Type",
- "length": 0,
- "no_copy": 0,
- "options": "Code\nToken",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "Code",
+ "fieldname": "response_type",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 1,
+ "label": "Response Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Code\nToken",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2017-10-05 21:07:39.476360",
- "modified_by": "Administrator",
- "module": "Integrations",
- "name": "OAuth Client",
- "name_case": "",
- "owner": "Administrator",
+ ],
+ "has_web_view": 0,
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2020-04-07 21:07:39.476360",
+ "modified_by": "Administrator",
+ "module": "Integrations",
+ "name": "OAuth Client",
+ "name_case": "",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 1,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "System Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
"write": 1
}
- ],
- "quick_entry": 0,
- "read_only": 0,
- "read_only_onload": 0,
- "show_name_in_global_search": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "title_field": "app_name",
- "track_changes": 1,
+ ],
+ "quick_entry": 0,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "title_field": "app_name",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/frappe/model/naming.py b/frappe/model/naming.py
index 78d2c462e1..ffaf84e2b3 100644
--- a/frappe/model/naming.py
+++ b/frappe/model/naming.py
@@ -110,7 +110,11 @@ def make_autoname(key="", doctype="", doc=""):
if "#" not in key:
key = key + ".#####"
elif "." not in key:
- frappe.throw(_("Invalid naming series (. missing)") + (_(" for {0}").format(doctype) if doctype else ""))
+ error_message = _("Invalid naming series (. missing)")
+ if doctype:
+ error_message = _("Invalid naming series (. missing) for {0}").format(doctype)
+
+ frappe.throw(error_message)
parts = key.split('.')
n = parse_naming_series(parts, doctype, doc)
diff --git a/frappe/public/js/frappe/form/workflow.js b/frappe/public/js/frappe/form/workflow.js
index 4eb33a5f28..4c59e8219b 100644
--- a/frappe/public/js/frappe/form/workflow.js
+++ b/frappe/public/js/frappe/form/workflow.js
@@ -29,20 +29,18 @@ frappe.ui.form.States = Class.extend({
});
frappe.workflow.get_transitions(me.frm.doc).then((transitions) => {
- var next_html = $.map(transitions,
- function(d) {
- return d.action.bold() + __(" by Role ") + d.allowed;
- }).join(", ") || __("None: End of Workflow").bold();
+ const next_actions = $.map(transitions, d => `${d.action.bold()} ${__("by Role")} ${d.allowed}`)
+ .join(", ") || __("None: End of Workflow").bold();
+
+ const document_editable_by = frappe.workflow.get_document_state(me.frm.doctype, state).allow_edit.bold();
+
+ $(d.body).html(`
+ ${__("Current status")}: ${state.bold()}
+ ${__("Document is only editable by users with role")}: ${document_editable_by}
+ ${__("Next actions")}: ${next_actions}
+ ${__("{0}: Other permission rules may also apply", [__('Note').bold()])}
+ `).css({padding: '15px'});
- $(d.body).html(""+__("Current status")+": " + state.bold() + "
"
- + ""+__("Document is only editable by users of role")+": "
- + frappe.workflow.get_document_state(me.frm.doctype,
- state).allow_edit.bold() + "
"
- + ""+__("Next actions")+": "+ next_html +"
"
- + (me.frm.doc.__islocal ? (""
- +__("Workflow will start after saving.")+"
") : "")
- + ""+__("Note: Other permission rules may also apply")+"
"
- ).css({padding: '15px'});
d.show();
});
}, true);
@@ -115,7 +113,7 @@ frappe.ui.form.States = Class.extend({
} else {
this.setup_btn(added);
}
-
+
});
},
diff --git a/frappe/templates/emails/delete_data_confirmation.html b/frappe/templates/emails/delete_data_confirmation.html
index e483bd59ed..126d8bcb4b 100644
--- a/frappe/templates/emails/delete_data_confirmation.html
+++ b/frappe/templates/emails/delete_data_confirmation.html
@@ -7,5 +7,6 @@
{{ _("Confirm Request") }}
- {{_("You can also copy-paste this ")}} {{_("Verification Link")}}{{_(" to your browser")}}
+ {% set verification_link = '{{ _("Verification Link") }}' %}
+ {{_("You can also copy-paste this {0} to your browser").format(verification_link) }}
\ No newline at end of file
From 58fe724428f3020949a90edefd667f3fae5354db Mon Sep 17 00:00:00 2001
From: prssanna
Date: Wed, 8 Apr 2020 14:24:44 +0530
Subject: [PATCH 15/29] refactor: allow system managers to view notification
settings list for all users
---
.../notification_settings/notification_settings.js | 9 +++++++++
.../notification_settings/notification_settings.py | 9 ++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/frappe/desk/doctype/notification_settings/notification_settings.js b/frappe/desk/doctype/notification_settings/notification_settings.js
index d4e3b08def..863840d155 100644
--- a/frappe/desk/doctype/notification_settings/notification_settings.js
+++ b/frappe/desk/doctype/notification_settings/notification_settings.js
@@ -8,5 +8,14 @@ frappe.ui.form.on('Notification Settings', {
route: '#modules/Settings',
type: 'Custom'
});
+ },
+
+ refresh: (frm) => {
+ if (frappe.user.has_role(['System Manager', 'Administrator'])) {
+ frm.add_custom_button('Go to Notification Settings List', () => {
+ frappe.set_route('List', 'Notification Settings');
+ });
+ }
}
+
});
diff --git a/frappe/desk/doctype/notification_settings/notification_settings.py b/frappe/desk/doctype/notification_settings/notification_settings.py
index 233d15e3ce..6b5a13ee27 100644
--- a/frappe/desk/doctype/notification_settings/notification_settings.py
+++ b/frappe/desk/doctype/notification_settings/notification_settings.py
@@ -62,7 +62,14 @@ def get_subscribed_documents():
def get_permission_query_conditions(user):
if not user: user = frappe.session.user
- return '''(`tabNotification Settings`.user = '{user}')'''.format(user=user)
+ if user == 'Administrator':
+ return
+
+ roles = frappe.get_roles(user)
+ if "System Manager" in roles:
+ return '''(`tabNotification Settings`.name != 'Administrator')'''
+
+ return '''(`tabNotification Settings`.name = '{user}')'''.format(user=user)
@frappe.whitelist()
def set_seen_value(value, user):
From 65abe3d73458090e7e5fe93feada7c5a02c7c18d Mon Sep 17 00:00:00 2001
From: PriyankaGangar
Date: Mon, 2 Mar 2020 11:10:34 +0530
Subject: [PATCH 16/29] fix: update gender and update salutations
---
.../desk/page/setup_wizard/install_fixtures.py | 16 +++++++++++-----
frappe/patches.txt | 1 +
.../patches/v8_0/update_gender_and_salutation.py | 5 +++--
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/frappe/desk/page/setup_wizard/install_fixtures.py b/frappe/desk/page/setup_wizard/install_fixtures.py
index e7e147fb7d..c857bd077f 100644
--- a/frappe/desk/page/setup_wizard/install_fixtures.py
+++ b/frappe/desk/page/setup_wizard/install_fixtures.py
@@ -8,16 +8,22 @@ from frappe import _
from frappe.desk.doctype.global_search_settings.global_search_settings import update_global_search_doctypes
def install():
- update_genders_and_salutations()
+ update_genders()
+ update_salutations()
update_global_search_doctypes()
setup_email_linking()
@frappe.whitelist()
-def update_genders_and_salutations():
- default_genders = [_("Male"), _("Female"), _("Other")]
- default_salutations = [_("Mr"), _("Ms"), _('Mx'), _("Dr"), _("Mrs"), _("Madam"), _("Miss"), _("Master"), _("Prof")]
+def update_genders():
+ default_genders = [_("Male"), _("Female"), _("Other"),_("Transgender"), _("Genderqueer"), _("Non-Conforming"),_("Prefer not to say")]
records = [{'doctype': 'Gender', 'gender': d} for d in default_genders]
- records += [{'doctype': 'Salutation', 'salutation': d} for d in default_salutations]
+ for record in records:
+ frappe.get_doc(record).insert(ignore_permissions=True, ignore_if_duplicate=True)
+
+@frappe.whitelist()
+def update_salutations():
+ default_salutations = [_("Mr"), _("Ms"), _('Mx'), _("Dr"), _("Mrs"), _("Madam"), _("Miss"), _("Master"), _("Prof")]
+ records = [{'doctype': 'Salutation', 'salutation': d} for d in default_salutations]
for record in records:
doc = frappe.new_doc(record.get("doctype"))
doc.update(record)
diff --git a/frappe/patches.txt b/frappe/patches.txt
index fc4f3ae998..0e02423639 100644
--- a/frappe/patches.txt
+++ b/frappe/patches.txt
@@ -271,3 +271,4 @@ execute:frappe.delete_doc_if_exists('DocType', 'GSuite Templates')
execute:frappe.delete_doc_if_exists('DocType', 'GCalendar Account')
execute:frappe.delete_doc_if_exists('DocType', 'GCalendar Settings')
frappe.patches.v12_0.remove_parent_and_parenttype_from_print_formats
+execute:from frappe.desk.page.setup_wizard.install_fixtures import update_genders;update_genders()
diff --git a/frappe/patches/v8_0/update_gender_and_salutation.py b/frappe/patches/v8_0/update_gender_and_salutation.py
index c990e9c4aa..bcd9d4cbd7 100644
--- a/frappe/patches/v8_0/update_gender_and_salutation.py
+++ b/frappe/patches/v8_0/update_gender_and_salutation.py
@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
-from frappe.desk.page.setup_wizard.install_fixtures import update_genders_and_salutations
+from frappe.desk.page.setup_wizard.install_fixtures import update_genders, update_salutations
def execute():
frappe.db.set_value("DocType", "Contact", "module", "Contacts")
@@ -11,4 +11,5 @@ def execute():
frappe.reload_doc('contacts', 'doctype', 'gender')
frappe.reload_doc('contacts', 'doctype', 'salutation')
- update_genders_and_salutations()
\ No newline at end of file
+ update_genders()
+ update_salutations()
\ No newline at end of file
From 3713a53a96e073fa0c28c6eace10e41d7b026f62 Mon Sep 17 00:00:00 2001
From: prssanna
Date: Wed, 8 Apr 2020 18:55:51 +0530
Subject: [PATCH 17/29] fix: allow dashboard chart type to be set only once
---
frappe/desk/doctype/dashboard_chart/dashboard_chart.json | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/frappe/desk/doctype/dashboard_chart/dashboard_chart.json b/frappe/desk/doctype/dashboard_chart/dashboard_chart.json
index 9652ae3945..676cdbe24a 100644
--- a/frappe/desk/doctype/dashboard_chart/dashboard_chart.json
+++ b/frappe/desk/doctype/dashboard_chart/dashboard_chart.json
@@ -49,7 +49,8 @@
"fieldname": "chart_type",
"fieldtype": "Select",
"label": "Chart Type",
- "options": "Count\nSum\nAverage\nGroup By\nCustom\nReport"
+ "options": "Count\nSum\nAverage\nGroup By\nCustom\nReport",
+ "set_only_once": 1
},
{
"depends_on": "eval:doc.chart_type === 'Custom'",
@@ -215,7 +216,7 @@
}
],
"links": [],
- "modified": "2020-03-31 16:00:01.987059",
+ "modified": "2020-04-08 18:54:36.739183",
"modified_by": "Administrator",
"module": "Desk",
"name": "Dashboard Chart",
From 1fc2f0d27caa5570f7a8751c7ab607a8c626673d Mon Sep 17 00:00:00 2001
From: Prssanna Desai
Date: Thu, 9 Apr 2020 09:31:36 +0530
Subject: [PATCH 18/29] fix: bread word if too long in link preview popover
(#9869)
---
frappe/public/less/link_preview.less | 1 +
1 file changed, 1 insertion(+)
diff --git a/frappe/public/less/link_preview.less b/frappe/public/less/link_preview.less
index 5bc9767815..22a61a79e7 100644
--- a/frappe/public/less/link_preview.less
+++ b/frappe/public/less/link_preview.less
@@ -37,6 +37,7 @@
padding-bottom: 5px;
max-width: 330px;
min-width: 200px;
+ overflow-wrap: break-word;
.preview-field {
padding-bottom: 10px;
From 029b8f0a35af32c220dd411a6efc90c94c1dc1cf Mon Sep 17 00:00:00 2001
From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Date: Thu, 9 Apr 2020 09:40:42 +0530
Subject: [PATCH 19/29] fix: Remove Admin role from check
---
.../desk/doctype/notification_settings/notification_settings.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frappe/desk/doctype/notification_settings/notification_settings.js b/frappe/desk/doctype/notification_settings/notification_settings.js
index 863840d155..fc8be15965 100644
--- a/frappe/desk/doctype/notification_settings/notification_settings.js
+++ b/frappe/desk/doctype/notification_settings/notification_settings.js
@@ -11,7 +11,7 @@ frappe.ui.form.on('Notification Settings', {
},
refresh: (frm) => {
- if (frappe.user.has_role(['System Manager', 'Administrator'])) {
+ if (frappe.user.has_role('System Manager')) {
frm.add_custom_button('Go to Notification Settings List', () => {
frappe.set_route('List', 'Notification Settings');
});
From ab383b5bee68784822bdb2613ef8ecee0034a393 Mon Sep 17 00:00:00 2001
From: prssanna
Date: Thu, 9 Apr 2020 10:59:27 +0530
Subject: [PATCH 20/29] style: fix indent
---
.../desk/doctype/notification_settings/notification_settings.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frappe/desk/doctype/notification_settings/notification_settings.js b/frappe/desk/doctype/notification_settings/notification_settings.js
index fc8be15965..b8b7f37a4f 100644
--- a/frappe/desk/doctype/notification_settings/notification_settings.js
+++ b/frappe/desk/doctype/notification_settings/notification_settings.js
@@ -13,7 +13,7 @@ frappe.ui.form.on('Notification Settings', {
refresh: (frm) => {
if (frappe.user.has_role('System Manager')) {
frm.add_custom_button('Go to Notification Settings List', () => {
- frappe.set_route('List', 'Notification Settings');
+ frappe.set_route('List', 'Notification Settings');
});
}
}
From bb87ce2b118f92316db90330bb115ba62f111b41 Mon Sep 17 00:00:00 2001
From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Date: Thu, 9 Apr 2020 11:10:33 +0530
Subject: [PATCH 21/29] chore(CODEOWNERS): Remove comma
---
CODEOWNERS | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CODEOWNERS b/CODEOWNERS
index 2ff8752871..2c8891ce86 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -3,7 +3,7 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
-* @surajshetty3416, @netchampfaris
+* @surajshetty3416 @netchampfaris
website/ @scmmishra
templates/ @scmmishra
www/ @scmmishra
@@ -14,4 +14,4 @@ email/ @Thunderbottom
event_streaming/ @ruchamahabal
data_import* @netchampfaris
core/ @surajshetty3416
-requirements.txt @gavindsouza
\ No newline at end of file
+requirements.txt @gavindsouza
From 953d0f273eb70578d61f7d1f6221d83de3d9f29a Mon Sep 17 00:00:00 2001
From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Date: Thu, 9 Apr 2020 11:45:03 +0530
Subject: [PATCH 22/29] chore(CODEOWNERS): Update owners
---
CODEOWNERS | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CODEOWNERS b/CODEOWNERS
index 2c8891ce86..e27856b8ae 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -3,8 +3,9 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
-* @surajshetty3416 @netchampfaris
+* @surajshetty3416
website/ @scmmishra
+web_form/ @scmmishra
templates/ @scmmishra
www/ @scmmishra
integrations/ @Mangesh-Khairnar
From e06114ea54a86230162448705fa10ee0293fccb6 Mon Sep 17 00:00:00 2001
From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Date: Thu, 9 Apr 2020 13:23:33 +0530
Subject: [PATCH 23/29] chore(CODEOWNERS): Add frappe-review-team as fallback
owner
---
CODEOWNERS | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CODEOWNERS b/CODEOWNERS
index e27856b8ae..8e6f8eb5e9 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -3,13 +3,13 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
-* @surajshetty3416
+* @frappe/frappe-review-team
website/ @scmmishra
web_form/ @scmmishra
templates/ @scmmishra
www/ @scmmishra
integrations/ @Mangesh-Khairnar
-patches/ @surajshetty3416 @sahil28297
+patches/ @sahil28297
dashboard/ @prssanna
email/ @Thunderbottom
event_streaming/ @ruchamahabal
From 3588a2edf39a8ca1c49ef4becc5acc1e9b462a68 Mon Sep 17 00:00:00 2001
From: Vishal Dhayagude
Date: Thu, 9 Apr 2020 17:24:21 +0530
Subject: [PATCH 24/29] feat: Add calendar for ToDo (#9808)
* feat: Todo Calender Added
* fix: indentation
* title description added for todo calender
* style: Add missing semicolon
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
---
frappe/desk/doctype/todo/todo_calendar.js | 31 +++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 frappe/desk/doctype/todo/todo_calendar.js
diff --git a/frappe/desk/doctype/todo/todo_calendar.js b/frappe/desk/doctype/todo/todo_calendar.js
new file mode 100644
index 0000000000..4545846cf9
--- /dev/null
+++ b/frappe/desk/doctype/todo/todo_calendar.js
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+// License: GNU General Public License v3. See license.txt
+
+frappe.views.calendar["ToDo"] = {
+ field_map: {
+ "start": "date",
+ "end": "date",
+ "id": "name",
+ "title": "description",
+ "allDay": "allDay",
+ "progress": "progress"
+ },
+ gantt: true,
+ filters: [
+ {
+ "fieldtype": "Link",
+ "fieldname": "reference_type",
+ "options": "Task",
+ "label": __("Task")
+ },
+ {
+ "fieldtype": "Dynamic Link",
+ "fieldname": "reference_name",
+ "options": "reference_type",
+ "label": __("Task")
+ }
+
+ ],
+ get_events_method: "frappe.desk.calendar.get_events"
+};
+
From d7dc9bf64e3ea963a64ad6f8ecff0464c910774f Mon Sep 17 00:00:00 2001
From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Date: Thu, 9 Apr 2020 20:11:02 +0530
Subject: [PATCH 25/29] refactor: Remove redundant code
---
frappe/public/js/frappe/list/list_sidebar_group_by.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frappe/public/js/frappe/list/list_sidebar_group_by.js b/frappe/public/js/frappe/list/list_sidebar_group_by.js
index f72ff33e4c..7aa62dcb5f 100644
--- a/frappe/public/js/frappe/list/list_sidebar_group_by.js
+++ b/frappe/public/js/frappe/list/list_sidebar_group_by.js
@@ -64,7 +64,7 @@ frappe.views.ListGroupBy = class ListGroupBy {
if (!docfield) {
return;
}
- fieldtype = frappe.meta.get_docfield(this.doctype, fieldname).fieldtype;
+ fieldtype = docfield.fieldtype;
}
return `
From ad71b6804f40e6272bef487d25dd05115c36341d Mon Sep 17 00:00:00 2001
From: Chinmay Pai
Date: Thu, 9 Apr 2020 20:18:55 +0530
Subject: [PATCH 26/29] chore: use orm instead of sql
Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
---
frappe/email/doctype/newsletter/newsletter.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/frappe/email/doctype/newsletter/newsletter.py b/frappe/email/doctype/newsletter/newsletter.py
index b022655699..2469569892 100755
--- a/frappe/email/doctype/newsletter/newsletter.py
+++ b/frappe/email/doctype/newsletter/newsletter.py
@@ -266,10 +266,9 @@ def get_newsletter_list(doctype, txt, filters, limit_start, limit_page_length=20
def send_scheduled_email():
"""Send scheduled newsletter to the recipients."""
- scheduled_newsletter = frappe.db.sql("""
-SELECT name from `tabNewsletter`
-WHERE schedule_send <= %s
-AND email_sent = 0
-""", now_datetime(), as_dict=1)
+ scheduled_newsletter = frappe.get_all('Newsletter', filters = {
+ 'schedule_send': ('<=', now_datetime()),
+ 'email_sent': 0
+ }, fields = ['name'], ignore_ifnull=True)
for newsletter in scheduled_newsletter:
send_newsletter(newsletter.name)
From ad95fbf5199cc31e73e267ae26db7dd3ba708a23 Mon Sep 17 00:00:00 2001
From: Suraj Shetty
Date: Fri, 10 Apr 2020 10:17:01 +0530
Subject: [PATCH 27/29] fix: Handle invalid date parsing
---
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 39c8c387eb..dc4d3c5e53 100644
--- a/frappe/utils/data.py
+++ b/frappe/utils/data.py
@@ -54,8 +54,8 @@ def get_datetime(datetime_str=None):
elif isinstance(datetime_str, datetime.date):
return datetime.datetime.combine(datetime_str, datetime.time())
- # dateutil parser does not agree with dates like 0001-01-01
- if not datetime_str or (datetime_str or "").startswith("0001-01-01"):
+ # dateutil parser does not agree with dates like "0001-01-01" or "0000-00-00"
+ if not datetime_str or (datetime_str or "").startswith(("0001-01-01", "0000-00-00")):
return None
try:
From 2c1ffaae9c9fde1133c4751b6116affa7997007b Mon Sep 17 00:00:00 2001
From: Gavin D'souza
Date: Fri, 10 Apr 2020 12:13:48 +0530
Subject: [PATCH 28/29] fix(test): update test for updated bleach behaviour
bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1623633
---
frappe/tests/test_document.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frappe/tests/test_document.py b/frappe/tests/test_document.py
index 1e92015602..470ab35fb6 100644
--- a/frappe/tests/test_document.py
+++ b/frappe/tests/test_document.py
@@ -181,7 +181,7 @@ class TestDocument(unittest.TestCase):
# css attributes
xss = 'Test
'
- escaped_xss = 'Test
'
+ escaped_xss = 'Test
'
d.subject += xss
d.save()
d.reload()
From 5d92e7cf9f2b3a878c9f479d778c86b2fea83770 Mon Sep 17 00:00:00 2001
From: Abhishek Kedar <44434910+AKedar21@users.noreply.github.com>
Date: Fri, 10 Apr 2020 15:30:09 +0530
Subject: [PATCH 29/29] fix: checking value of send_welcome_email (#9888)
* checking value of send_welcome_email
If send_welcome_email is set to 0 still it is triggering send_welcome_mail_to_user(). Need to check if send_welcome_email=1.
This is required.
* fix: cint(self.send_welcome_email) in user.py
Instead of checking self.send_welcome_email==1 used cint(self.send_welcome_email
Co-Authored-By: Chinmay Pai
* chore: remove list from kwargs
Co-authored-by: Chinmay Pai
---
frappe/core/doctype/user/user.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py
index ddad3a91fb..7837c90d2b 100644
--- a/frappe/core/doctype/user/user.py
+++ b/frappe/core/doctype/user/user.py
@@ -205,7 +205,7 @@ class User(Document):
_update_password(user=self.name, pwd=new_password,
logout_all_sessions=self.logout_all_sessions)
- if not self.flags.no_welcome_mail and self.send_welcome_email:
+ if not self.flags.no_welcome_mail and cint(self.send_welcome_email):
self.send_welcome_mail_to_user()
self.flags.email_sent = 1
if frappe.session.user != 'Guest':
@@ -577,7 +577,7 @@ def update_password(new_password, logout_all_sessions=0, key=None, old_password=
return redirect_url if redirect_url else "/"
@frappe.whitelist(allow_guest=True)
-def test_password_strength(new_password, key=None, old_password=None, user_data=[]):
+def test_password_strength(new_password, key=None, old_password=None, user_data=None):
from frappe.utils.password_strength import test_password_strength as _test_password_strength
password_policy = frappe.db.get_value("System Settings", None,