Im having an issue with a field that is set to be readonly based on a checkbox in the doc.
This works fine when editing the form but when I open the report view, im able to edit the fields although they should be Readonly.
Is there a way to add custom validation whenever a field is changed? Im not talking about client scripts, I need something that will work in the Report view and when importing items.
Use case:
I have set the item_name field in the item doctype to be Readonly when it’s a variant. This is necessary because I’m generating the variants item_name from the template’s item_name and the variant’s attributes.
People will use the import and report functionality though, and I don’t want anyone to accidentally mess up the naming scheme.
Any advice?