Merge branch 'hotfix'
This commit is contained in:
commit
408c2f8c61
6 changed files with 17 additions and 3 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__ = '10.0.20'
|
||||
__version__ = '10.0.21'
|
||||
__title__ = "Frappe Framework"
|
||||
|
||||
local = Local()
|
||||
|
|
|
|||
|
|
@ -396,6 +396,10 @@ class Database:
|
|||
|
||||
conditions.append(condition)
|
||||
|
||||
if isinstance(filters, int):
|
||||
# docname is a number, convert to string
|
||||
filters = str(filters)
|
||||
|
||||
if isinstance(filters, string_types):
|
||||
filters = { "name": filters }
|
||||
|
||||
|
|
@ -611,7 +615,7 @@ class Database:
|
|||
order_by = ("order by " + order_by) if order_by else ""
|
||||
|
||||
r = self.sql("select {0} from `tab{1}` {2} {3} {4}"
|
||||
.format(fl, doctype, "where" if conditions else "", conditions, order_by), values,
|
||||
.format(fl, doctype, "where" if conditions else "", conditions, order_by), values,
|
||||
as_dict=as_dict, debug=debug, update=update)
|
||||
|
||||
return r
|
||||
|
|
|
|||
|
|
@ -723,6 +723,7 @@ body[data-route^="Form/Communication"] textarea[data-fieldname="subject"] {
|
|||
margin-top: 5px;
|
||||
}
|
||||
.frappe-control[data-fieldtype="Attach"] .attached-file .close {
|
||||
margin-right: -7px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
|
|
|||
|
|
@ -237,6 +237,7 @@ frappe.ui.get_upload_dialog = function(opts){
|
|||
dialog.$wrapper.find('[name="file_url"]').val(r.message.file_url);
|
||||
dialog.$wrapper.find('.private-file input').prop('checked', r.message.is_private);
|
||||
opts.args.filename = r.message.file_name;
|
||||
opts.args.is_private = r.message.is_private;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -508,6 +508,14 @@ frappe.ui.form.Grid = Class.extend({
|
|||
}
|
||||
df.colsize = colsize;
|
||||
}
|
||||
|
||||
// attach formatter on refresh
|
||||
if (df.fieldtype == 'Link' && !df.formatter) {
|
||||
const docfield = frappe.meta.docfield_map[df.parent][df.fieldname];
|
||||
if (docfield && docfield.formatter) {
|
||||
df.formatter = docfield.formatter;
|
||||
}
|
||||
}
|
||||
|
||||
total_colsize += df.colsize;
|
||||
if(total_colsize > 11)
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ _f.Frm.prototype.set_indicator_formatter = function(fieldname, get_color, get_te
|
|||
})
|
||||
}
|
||||
|
||||
frappe.meta.get_docfield(doctype, fieldname, this.doc.name).formatter =
|
||||
frappe.meta.docfield_map[doctype][fieldname].formatter =
|
||||
function(value, df, options, doc) {
|
||||
if(value) {
|
||||
return repl('<a class="indicator %(color)s" href="#Form/%(doctype)s/%(name)s">%(label)s</a>', {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue