@@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json | |||||
from .exceptions import * | from .exceptions import * | ||||
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template | from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template | ||||
__version__ = '9.2.19' | |||||
__version__ = '9.2.20' | |||||
__title__ = "Frappe Framework" | __title__ = "Frappe Framework" | ||||
local = Local() | local = Local() | ||||
@@ -791,6 +791,9 @@ def _filter(data, filters, limit=None): | |||||
out, _filters = [], {} | out, _filters = [], {} | ||||
if not data: | |||||
return out | |||||
# setup filters as tuples | # setup filters as tuples | ||||
if filters: | if filters: | ||||
for f in filters: | for f in filters: | ||||
@@ -457,8 +457,10 @@ _f.Frm.prototype.can_create = function(doctype) { | |||||
} | } | ||||
if(this.custom_make_buttons && this.custom_make_buttons[doctype]) { | if(this.custom_make_buttons && this.custom_make_buttons[doctype]) { | ||||
// custom buttons are translated and so are the keys | |||||
const key = __(this.custom_make_buttons[doctype]); | |||||
// if the button is present, then show make | // if the button is present, then show make | ||||
return !!this.custom_buttons[this.custom_make_buttons[doctype]]; | |||||
return !!this.custom_buttons[key]; | |||||
} | } | ||||
if(this.can_make_methods && this.can_make_methods[doctype]) { | if(this.can_make_methods && this.can_make_methods[doctype]) { | ||||