Explorar el Código

[fixes] minor: email_alert, listview, doctype validation

version-14
Rushabh Mehta hace 10 años
padre
commit
f699c2d135
Se han modificado 3 ficheros con 5 adiciones y 1 borrados
  1. +1
    -1
      frappe/core/doctype/doctype/doctype.py
  2. +3
    -0
      frappe/public/js/frappe/views/listview.js
  3. +1
    -0
      frappe/utils/jinja.py

+ 1
- 1
frappe/core/doctype/doctype/doctype.py Ver fichero

@@ -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):


+ 3
- 0
frappe/public/js/frappe/views/listview.js Ver fichero

@@ -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);
});


+ 1
- 0
frappe/utils/jinja.py Ver fichero

@@ -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)



Cargando…
Cancelar
Guardar