Skip to content

Commit 4bc62bd

Browse files
committed
Merge branch 'staging' into production
2 parents 072dbba + 3163a40 commit 4bc62bd

File tree

6 files changed

+19
-31
lines changed

6 files changed

+19
-31
lines changed

frappe/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
sys.setdefaultencoding("utf-8")
2525

2626
__frappe_version__ = '12.8.1'
27-
__version__ = '2.0.8'
27+
__version__ = '2.0.9'
2828
__title__ = "Frappe Framework"
2929

3030
local = Local()

frappe/custom/doctype/custom_field/custom_field.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@
360360
],
361361
"icon": "fa fa-glass",
362362
"idx": 1,
363-
"modified": "2020-03-17 21:30:18.102333",
363+
"modified": "2021-01-15 21:30:18.102333",
364364
"modified_by": "Administrator",
365365
"module": "Custom",
366366
"name": "Custom Field",

frappe/public/js/frappe/form/controls/signature.js

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,38 +62,21 @@ frappe.ui.form.ControlSignature = frappe.ui.form.ControlData.extend({
6262
var me = this;
6363
var options = {
6464
allow_multiple: false,
65+
as_dataurl: true,
6566
on_success: file => {
6667
me.on_upload_complete(file);
6768
}
6869
};
6970

70-
if (this.frm && !this.frm.is_new()) {
71-
options.doctype = this.frm.doctype;
72-
options.docname = this.frm.docname;
73-
options.fieldname = this.df.fieldname;
74-
}
75-
7671
if (this.df.options) {
7772
Object.assign(options, this.df.options);
7873
}
7974
return options;
8075
},
81-
on_upload_complete: function(attachment) {
76+
on_upload_complete: function(file) {
8277
var me=this;
83-
if (this.frm) {
84-
this.frm.attachments.update_attachment(attachment);
85-
this.frm.doc.docstatus == 1 ? this.frm.save('Update') : this.frm.save();
86-
}
87-
frappe.call({
88-
method: "frappe.utils.image.image_to_base64",
89-
args: {
90-
path: attachment.file_url
91-
},
92-
callback: function (r) {
93-
me.set_my_value(r.message);
94-
me.set_image(me.get_value());
95-
}
96-
});
78+
me.set_my_value(file.dataurl);
79+
me.set_image(me.get_value());
9780
},
9881
refresh_input: function(e) {
9982
// prevent to load the second time

frappe/public/js/frappe/views/communication.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ frappe.views.CommunicationComposer = Class.extend({
130130
this.dialog.set_value("recipients", this.recipients || '');
131131
this.dialog.set_value("cc", this.cc || '');
132132
this.dialog.set_value("bcc", this.bcc || '');
133+
this.dialog.set_value("attach_document_print", this.attach_document_print || false);
134+
this.dialog.set_value("send_me_a_copy", this.send_me_a_copy || false);
135+
this.dialog.set_value("send_read_receipt", this.send_read_receipt || false);
133136

134137
if(this.dialog.fields_dict.sender) {
135138
this.dialog.fields_dict.sender.set_value(this.sender || '');

frappe/tests/test_listview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def setUp(self):
1414
frappe.delete_doc("List View Settings", "DocType")
1515

1616
def test_get_list_settings_without_settings(self):
17-
self.assertIsNone(get_list_settings("DocType"), None)
17+
self.assertEqual(get_list_settings("DocType"), {})
1818

1919
def test_get_list_settings_with_default_settings(self):
2020
frappe.get_doc({"doctype": "List View Settings", "name": "DocType"}).insert()

frappe/utils/oauth.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ def get_oauth_keys(provider):
4646

4747
if not keys:
4848
# try database
49-
client_id, client_secret = frappe.get_value("Social Login Key", provider, ["client_id", "client_secret"])
50-
client_secret = get_decrypted_password("Social Login Key", provider, "client_secret")
51-
keys = {
52-
"client_id": client_id,
53-
"client_secret": client_secret
54-
}
55-
return keys
49+
if frappe.db.exists("Social Login Key", provider, ["client_id", "client_secret"]):
50+
client_id, client_secret = frappe.get_value("Social Login Key", provider, ["client_id", "client_secret"])
51+
client_secret = get_decrypted_password("Social Login Key", provider, "client_secret")
52+
keys = {
53+
"client_id": client_id,
54+
"client_secret": client_secret
55+
}
56+
return keys
57+
frappe.throw(_("No Social Login for Provider - {0}.").format(provider))
5658
else:
5759
return {
5860
"client_id": keys["client_id"],

0 commit comments

Comments
 (0)