I am trying to make a field readonly for every user that does not belong to a specified group but it is not working I hope some one can help me, here is my code:
<page string="Item">
<field name="item_line_ids">
<tree editable="bottom">
<field name="document_name" column_invisible="True"/>
<field name="name" readonly="True"/>
<field name="number_of_pages" readonly="True"/>
<field name="document" widget="binary" filename="document_name"/>
<field name="state"/>
<field name="comment"
readonly="'groups_id' not in '[model_name.group_name]'"/>
</tree>
</field>
</page>
The fields in question are name, number of pages, state and comment.
In the code is an example of what I have tried but It does not worked for me