[Fix] Formatter issue (#4993)

This commit is contained in:
rohitwaghchaure 2018-02-09 17:34:55 +05:30 committed by Faris Ansari
parent 99b4278f84
commit 8f2935a0e3

View file

@ -508,9 +508,9 @@ frappe.ui.form.Grid = Class.extend({
}
df.colsize = colsize;
}
// attach formatter on refresh
if (df.fieldtype == 'Link' && !df.formatter) {
if (df.fieldtype == 'Link' && !df.formatter && frappe.meta.docfield_map[df.parent]) {
const docfield = frappe.meta.docfield_map[df.parent][df.fieldname];
if (docfield && docfield.formatter) {
df.formatter = docfield.formatter;