fix(js): Handle hidden virtual fields (#24405)
This commit is contained in:
parent
c177431557
commit
766a7efcd9
2 changed files with 1 additions and 4 deletions
|
|
@ -49,9 +49,6 @@ frappe.ui.form.Control = class BaseControl {
|
|||
if (this.df.get_status) {
|
||||
return this.df.get_status(this);
|
||||
}
|
||||
if (this.df.is_virtual) {
|
||||
return "Read";
|
||||
}
|
||||
|
||||
if (
|
||||
(!this.doctype && !this.docname) ||
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ $.extend(frappe.perm, {
|
|||
|
||||
if (!perm) {
|
||||
let is_hidden = df && (cint(df.hidden) || cint(df.hidden_due_to_dependency));
|
||||
let is_read_only = df && cint(df.read_only);
|
||||
let is_read_only = df && (cint(df.read_only) || cint(df.is_virtual));
|
||||
return is_hidden ? "None" : is_read_only ? "Read" : "Write";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue