Merge pull request #38582 from ruthra-kumar/prevent_virutal_on_standard_fields
fix(customize form): prevent setting standard fields as virtual
This commit is contained in:
commit
8e4d827d57
1 changed files with 4 additions and 0 deletions
|
|
@ -401,6 +401,10 @@ class CustomizeForm(Document):
|
|||
elif prop == "in_global_search" and df.in_global_search != meta_df[0].get("in_global_search"):
|
||||
self.flags.rebuild_doctype_for_global_search = True
|
||||
|
||||
elif prop == "is_virtual" and meta_df[0].get("is_virtual") == 0 and df.get("is_virtual") == 1:
|
||||
frappe.msgprint(_("You can't set standard field {0} as virtual").format(frappe.bold(df.label)))
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def set_property_setters_for_actions_and_links(self, meta):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue