diff --git a/core/doctype/doctype/doctype.py b/core/doctype/doctype/doctype.py
index fce3f1124b..c6dbb1e0c4 100644
--- a/core/doctype/doctype/doctype.py
+++ b/core/doctype/doctype/doctype.py
@@ -177,7 +177,7 @@ class DocType:
def validate_fields_for_doctype(doctype):
from webnotes.model.doctype import get
validate_fields(filter(lambda d: d.doctype=="DocField" and d.parent==doctype,
- get(doctype)))
+ get(doctype, cached=False)))
def validate_fields(fields):
def check_illegal_characters(fieldname):
diff --git a/public/js/legacy/utils/datatype.js b/public/js/legacy/utils/datatype.js
index ac99e19e03..eaaed74fca 100644
--- a/public/js/legacy/utils/datatype.js
+++ b/public/js/legacy/utils/datatype.js
@@ -165,7 +165,7 @@ function flt(v,decimals) {
if(isNaN(v))
v=0;
if(decimals!=null)
- return parseFloat(v.toFixed(decimals));
+ return roundNumber(v, decimals);
return v;
}
diff --git a/public/js/legacy/widgets/form/fields.js b/public/js/legacy/widgets/form/fields.js
index bf512a25b1..f0c8dfbeb8 100644
--- a/public/js/legacy/widgets/form/fields.js
+++ b/public/js/legacy/widgets/form/fields.js
@@ -569,13 +569,13 @@ LinkField.prototype.make_input = function() {
}
me.onrefresh = function() {
- $(me.btn2).toggle(in_list(wn.boot.profile.can_create, me.df.options))
- $(me.btn1).toggle(me.df.options=='[Select]');
+ $(me.btn2).toggle(in_list(wn.boot.profile.can_create, me.df.options));
+ $(me.btn1).toggle(in_list(wn.boot.profile.can_read, me.df.options));
}
me.onrefresh();
- me.txt.field_object = this;
+ me.txt.field_object = this;
// set onchange triggers
me.input.set_input = function(val) {
diff --git a/public/js/legacy/widgets/form/form_header.js b/public/js/legacy/widgets/form/form_header.js
index bd788749de..fb6ac66ef9 100644
--- a/public/js/legacy/widgets/form/form_header.js
+++ b/public/js/legacy/widgets/form/form_header.js
@@ -56,7 +56,7 @@ _f.FrmHeader = Class.extend({
$(repl('\
\
\
-
', {
+
', {
created_by: wn.user_info(doc.owner).fullname,
avatar_created: wn.user_info(doc.owner).image,
modified_by: wn.user_info(doc.modified_by).fullname,
diff --git a/public/js/legacy/widgets/form/print_format.js b/public/js/legacy/widgets/form/print_format.js
index 017a934db3..abfd9f7a98 100644
--- a/public/js/legacy/widgets/form/print_format.js
+++ b/public/js/legacy/widgets/form/print_format.js
@@ -347,7 +347,7 @@ $.extend(_p, {
}
var finished = header
+ stat
- + container.innerHTML.replace(/