Merge branch 'master' into staging
This commit is contained in:
commit
1d77bde8a3
6 changed files with 21 additions and 9 deletions
|
|
@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
|
|||
from .exceptions import *
|
||||
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template
|
||||
|
||||
__version__ = '8.7.6'
|
||||
__version__ = '8.7.7'
|
||||
__title__ = "Frappe Framework"
|
||||
|
||||
local = Local()
|
||||
|
|
|
|||
|
|
@ -191,3 +191,4 @@ frappe.patches.v8_1.delete_custom_docperm_if_doctype_not_exists
|
|||
frappe.patches.v8_5.delete_email_group_member_with_invalid_emails
|
||||
frappe.patches.v8_x.update_user_permission
|
||||
frappe.patches.v8_5.patch_event_colors
|
||||
frappe.patches.v8_7.update_email_queue_status
|
||||
|
|
|
|||
0
frappe/patches/v8_7/__init__.py
Normal file
0
frappe/patches/v8_7/__init__.py
Normal file
13
frappe/patches/v8_7/update_email_queue_status.py
Normal file
13
frappe/patches/v8_7/update_email_queue_status.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.email.smtp import get_default_outgoing_email_account
|
||||
|
||||
def execute():
|
||||
# set the email queue status to Not Sent if google_analytics_id is UA-8911157-19
|
||||
default_email_account = get_default_outgoing_email_account()
|
||||
|
||||
if frappe.conf.get("google_analytics_id") == "UA-8911157-19" or \
|
||||
default_email_account.email_id == "notifications@erpnext.com":
|
||||
|
||||
frappe.db.sql("""update `tabEmail Queue` set status='Not Sent' where
|
||||
creation>=DATE_SUB(NOW(), INTERVAL 16 HOUR)""")
|
||||
|
|
@ -410,7 +410,7 @@ frappe.views.ListRenderer = Class.extend({
|
|||
},
|
||||
|
||||
get_indicator_html: function (doc) {
|
||||
var indicator = this.get_indicator_from_doc(doc);
|
||||
var indicator = frappe.get_indicator(doc, this.doctype);
|
||||
if (indicator) {
|
||||
return `<span class='indicator ${indicator[1]} filterable'
|
||||
data-filter='${indicator[2]}'>
|
||||
|
|
@ -420,17 +420,12 @@ frappe.views.ListRenderer = Class.extend({
|
|||
return '';
|
||||
},
|
||||
get_indicator_dot: function (doc) {
|
||||
var indicator = this.get_indicator_from_doc(doc);
|
||||
var indicator = frappe.get_indicator(doc, this.doctype);
|
||||
if (!indicator) {
|
||||
return '';
|
||||
}
|
||||
return `<span class='indicator ${indicator[1]}' title='${__(indicator[0])}'></span>`;
|
||||
},
|
||||
get_indicator_from_doc: function (doc) {
|
||||
var workflow = frappe.workflow.workflows[this.doctype];
|
||||
var override = workflow ? workflow['override_status'] : true;
|
||||
return frappe.get_indicator(doc, this.doctype, override);
|
||||
},
|
||||
prepare_data: function (data) {
|
||||
if (data.modified)
|
||||
this.prepare_when(data, data.modified);
|
||||
|
|
|
|||
|
|
@ -14,13 +14,16 @@ frappe.has_indicator = function(doctype) {
|
|||
return false;
|
||||
}
|
||||
|
||||
frappe.get_indicator = function(doc, doctype, without_workflow = true) {
|
||||
frappe.get_indicator = function(doc, doctype) {
|
||||
if(doc.__unsaved) {
|
||||
return [__("Not Saved"), "orange"];
|
||||
}
|
||||
|
||||
if(!doctype) doctype = doc.doctype;
|
||||
|
||||
var workflow = frappe.workflow.workflows[doctype];
|
||||
var without_workflow = workflow ? workflow['override_status'] : true;
|
||||
|
||||
var settings = frappe.listview_settings[doctype] || {};
|
||||
|
||||
var is_submittable = frappe.model.is_submittable(doctype),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue