[minor] make fetch behaviour consistent on client and server side

This commit is contained in:
Rushabh Mehta 2016-11-21 16:48:00 +05:30
parent 349e803bd1
commit 82ef68bd25

View file

@ -102,7 +102,8 @@ frappe.ui.form.ScriptManager = Class.extend({
}
function setup_add_fetch(df) {
if((df.fieldtype==="Read Only" || df.read_only==1)
if((in_list(['Data', 'Read Only', 'Text', 'Small Text',
'Text Editor', 'Code'], df.fieldtype) || df.read_only==1)
&& df.options && df.options.indexOf(".")!=-1) {
var parts = df.options.split(".");
me.frm.add_fetch(parts[0], parts[1], df.fieldname);