[hot] fix grid display bug

This commit is contained in:
Rushabh Mehta 2017-06-17 13:57:24 +05:30
parent 5a1c6ddec8
commit 63ed486bfc
2 changed files with 9 additions and 6 deletions

View file

@ -68,6 +68,7 @@ def get_data():
"module_name": 'Contacts',
"type": 'module',
"icon": "octicon octicon-book",
"color": '#FFAEDB'
"color": '#FFAEDB',
"hidden": 1,
},
]

View file

@ -1143,11 +1143,13 @@ frappe.ui.form.GridRow = Class.extend({
// format values if no frm
if(!df) {
df = this.grid.visible_columns.find((set) => {
return set[0].fieldname === fieldname;
})[0];
if(this.doc) var txt = frappe.format(this.doc[fieldname], df, null, this.doc);
df = this.grid.visible_columns.find((col) => {
return col[0].fieldname === fieldname;
});
if(df && this.doc) {
var txt = frappe.format(this.doc[fieldname], df[0],
null, this.doc);
}
}
if(txt===undefined && this.frm) {