[fix] [minor] get_perm function added in form.js
This commit is contained in:
parent
4804d7e81a
commit
d96816b89e
2 changed files with 5 additions and 1 deletions
|
|
@ -789,4 +789,8 @@ _f.Frm.prototype.dirty = function() {
|
|||
|
||||
_f.Frm.prototype.get_docinfo = function() {
|
||||
return wn.model.docinfo[this.doctype][this.docname];
|
||||
}
|
||||
|
||||
_f.Frm.prototype.get_perm = function(permlevel, access_type) {
|
||||
return this.perm[permlevel] ? this.perm[permlevel][access_type] : null;
|
||||
}
|
||||
|
|
@ -228,7 +228,7 @@ wn.ui.form.GridRow = Class.extend({
|
|||
.appendTo(me.row);
|
||||
|
||||
$.each(me.docfields, function(ci, df) {
|
||||
if(!df.hidden && df.in_list_view && me.grid.frm.perm[df.permlevel][READ]
|
||||
if(!df.hidden && df.in_list_view && me.grid.frm.get_perm(df.permlevel, READ)
|
||||
&& !in_list(["Section Break", "Column Break"], df.fieldtype)) {
|
||||
var colsize = 2,
|
||||
txt = me.doc ?
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue