Help needed on Read Only Depends On

Hello community, having a small problem where my field’s ability to be Read Only depending on another field is not working.

So, there’s “Status” field with multiple options, and one of the is “Closed”. I want my fields to be “Read Only” after the status is changed to Closed. I have inserted the following to my field’s “read only depends on” but it’s just not working:

eval:doc.status = ‘Closed’

I’m on v13 of both Frappe and ERPNext. The problem I’m having is no matter what the status is, the field became read only always.

Thanks guys!

Hi @iMoshi,

Which Doctype?

Thanks.

Well, any doctype. This case, Issue doctype :slight_smile:

Hi @iMoshi,

Please check it.
It’s working from my side.

eval:doc.status=='Closed'

I try for description.

It’s writeable

It’s Read Only.

Again check, reload and try it.

Thank You!

2 Likes

Thank you! This fixes it :sweat_smile:

So, the spaces were messing things up? Got it now.

Hi, what will be code if i want a particular select field to appear on a “OR” condition like

eval:doc.status==‘Closed’ OR eval:doc.status==“Hold”

what will be proper way to address “OR” if a particular select field needs to be appear on 2 depend on conditions ?

Ok i figured it out…

it is eval:((doc.gate==“1”) || (doc.globe==“1”)) and so on howmany items i need… !!

Thanks to me :smiley:

2 Likes

how to mention a depend on a checkbox in a different section break ?