@@ -13,7 +13,7 @@ import os, sys, importlib, inspect, json | |||||
from .exceptions import * | from .exceptions import * | ||||
from .utils.jinja import get_jenv, get_template, render_template | from .utils.jinja import get_jenv, get_template, render_template | ||||
__version__ = '8.0.66' | |||||
__version__ = '8.0.67' | |||||
__title__ = "Frappe Framework" | __title__ = "Frappe Framework" | ||||
local = Local() | local = Local() | ||||
@@ -13,7 +13,7 @@ frappe.ui.form.on('Deleted Document', { | |||||
method: 'frappe.core.doctype.deleted_document.deleted_document.restore', | method: 'frappe.core.doctype.deleted_document.deleted_document.restore', | ||||
args: {name: frm.doc.name}, | args: {name: frm.doc.name}, | ||||
callback: function(r) { | callback: function(r) { | ||||
// | |||||
frm.reload_doc(); | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
@@ -23,6 +23,6 @@ def restore(name): | |||||
deleted.new_name = doc.name | deleted.new_name = doc.name | ||||
deleted.restored = 1 | deleted.restored = 1 | ||||
deleted.save() | |||||
deleted.db_update() | |||||
frappe.msgprint(_('Document Restored')) | frappe.msgprint(_('Document Restored')) |
@@ -84,7 +84,6 @@ class DocTags: | |||||
def remove(self, dn, tag): | def remove(self, dn, tag): | ||||
"""remove a user tag""" | """remove a user tag""" | ||||
tl = self.get_tags(dn).split(',') | tl = self.get_tags(dn).split(',') | ||||
print(tag, filter(lambda x:x!=tag, tl)) | |||||
self.update(dn, filter(lambda x:x.lower()!=tag.lower(), tl)) | self.update(dn, filter(lambda x:x.lower()!=tag.lower(), tl)) | ||||
def remove_all(self, dn): | def remove_all(self, dn): | ||||
@@ -34,6 +34,7 @@ frappe.email_alert = { | |||||
// set first option as blank to allow email alert not to be defaulted to the owner | // set first option as blank to allow email alert not to be defaulted to the owner | ||||
frm.doc.name).options = [""].concat(["owner"].concat(email_fields)); | frm.doc.name).options = [""].concat(["owner"].concat(email_fields)); | ||||
frm.fields_dict.recipients.grid.refresh(); | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
@@ -429,11 +429,13 @@ where name=%s""", (unicode(e), email.name), auto_commit=auto_commit) | |||||
def prepare_message(email, recipient, recipients_list): | def prepare_message(email, recipient, recipients_list): | ||||
message = email.message | message = email.message | ||||
if not message: | |||||
return "" | |||||
if email.add_unsubscribe_link and email.reference_doctype: # is missing the check for unsubscribe message but will not add as there will be no unsubscribe url | if email.add_unsubscribe_link and email.reference_doctype: # is missing the check for unsubscribe message but will not add as there will be no unsubscribe url | ||||
unsubscribe_url = get_unsubcribed_url(email.reference_doctype, email.reference_name, recipient, | unsubscribe_url = get_unsubcribed_url(email.reference_doctype, email.reference_name, recipient, | ||||
email.unsubscribe_method, email.unsubscribe_params) | email.unsubscribe_method, email.unsubscribe_params) | ||||
if message: | |||||
message = message.replace("<!--unsubscribe url-->", quopri.encodestring(unsubscribe_url)) | |||||
message = message.replace("<!--unsubscribe url-->", quopri.encodestring(unsubscribe_url)) | |||||
if email.expose_recipients == "header": | if email.expose_recipients == "header": | ||||
pass | pass | ||||