[minor] [fix] when making control, use form's perm
This commit is contained in:
parent
1dc6d08cef
commit
12431c96e6
1 changed files with 2 additions and 2 deletions
|
|
@ -43,7 +43,7 @@ wn.ui.form.Control = Class.extend({
|
|||
if(!this.doctype)
|
||||
return "Write";
|
||||
return wn.perm.get_field_display_status(this.df,
|
||||
locals[this.doctype][this.docname], this.perm, explain);
|
||||
locals[this.doctype][this.docname], this.perm || this.frm.perm, explain);
|
||||
},
|
||||
refresh: function() {
|
||||
this.disp_status = this.get_status();
|
||||
|
|
@ -794,7 +794,7 @@ wn.ui.form.ControlTable = wn.ui.form.Control.extend({
|
|||
this.grid = new wn.ui.form.Grid({
|
||||
frm: this.frm,
|
||||
df: this.df,
|
||||
perm: this.perm,
|
||||
perm: this.perm || this.frm.perm,
|
||||
parent: this.wrapper
|
||||
})
|
||||
if(this.frm)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue