Unable to enable field when condition for read only doesn't meet

I have timesheet module where added a condition to make a field read only. In one scenario This is not working.
Scenario:

  1. Open any older timesheet where the condition is met and field is read only.
  2. Then open new timesheet where condition doesn’t meet and field should be editable but its still read only.
    I don’t see any reset happening in form.js. Where the changes should be made for this?

Hi @Rashmi_Jm:

Can you share how your condition is written?

image

Its in a child table referring to parent table field

@Rashmi_Jm add this condition eval:parent.parent_object && doc.docstatus==1

This doesn’t satisfy my requirement.
Timesheet can be saved and submitted, I want to make field read only only if timesheet is submitted, Not on save.