Browse Source

[hot] fix grid display bug

version-14
Rushabh Mehta 8 years ago
parent
commit
63ed486bfc
2 changed files with 9 additions and 6 deletions
  1. +2
    -1
      frappe/config/desktop.py
  2. +7
    -5
      frappe/public/js/frappe/form/grid.js

+ 2
- 1
frappe/config/desktop.py View File

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

+ 7
- 5
frappe/public/js/frappe/form/grid.js 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) {


Loading…
Cancel
Save