-
Notifications
You must be signed in to change notification settings - Fork 795
Description
Describe the bug
The read_only_depends_on property defined in a DocType JSON is not being evaluated in the CRM Vue.js portal, while mandatory_depends_on works correctly under the same condition. This causes fields to remain editable when they should become read-only. The issue occurs only in the CRM Vue portal and not in Frappe Desk.
To Reproduce
Define a field in a DocType JSON with the following properties:
{
"fieldname": "email",
"fieldtype": "Data",
"label": "Email",
"read_only_depends_on": "eval:doc.first_name",
"mandatory_depends_on": "eval:doc.first_name"
}
Open the document in the CRM portal (Vue.js based UI).
Enter a value in the first_name field.
Observe the behaviour of the email field.
Expected behaviour
When first_name has a value, both mandatory_depends_on and read_only_depends_on should be evaluated. The email field should become mandatory and read-only.
Actual behaviour
mandatory_depends_on is evaluated correctly and the email field becomes mandatory. However, read_only_depends_on is not evaluated and the email field remains editable.
This is example to make observation easy