[fixes] minor: email_alert, listview, doctype validation
This commit is contained in:
parent
abb6efc3a0
commit
f699c2d135
3 changed files with 5 additions and 1 deletions
|
|
@ -243,7 +243,7 @@ def validate_fields(meta):
|
|||
if fold_exists:
|
||||
frappe.throw(_("There can be only one Fold in a form"))
|
||||
fold_exists = True
|
||||
if i < len(fields)-1:
|
||||
if i < len(fields)-2:
|
||||
nxt = fields[i+1]
|
||||
if nxt.fieldtype != "Section Break" \
|
||||
or (nxt.fieldtype=="Section Break" and not nxt.label):
|
||||
|
|
|
|||
|
|
@ -85,6 +85,9 @@ frappe.views.ListView = Class.extend({
|
|||
// additional fields
|
||||
if(this.settings.add_fields) {
|
||||
$.each(this.settings.add_fields, function(i, d) {
|
||||
if(d.indexOf("`tab")===-1) {
|
||||
d = "`tab" + me.doctype + "`." + d;
|
||||
}
|
||||
if(me.fields.indexOf(d)==-1)
|
||||
me.fields.push(d);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ def get_template(path):
|
|||
return get_jenv().get_template(path)
|
||||
|
||||
def render_template(template, context):
|
||||
context.update(get_allowed_functions_for_jenv())
|
||||
template = Template(template)
|
||||
return template.render(**context)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue