<group string="Filter Options">
<field name="vendor_id" options="{'no_create':True, 'no_edit':True}"
attrs="{'readonly': [('state', '=', 'done')]}"/>
<field name="date_from" options="{'no_create':True, 'no_edit':True}"
readonly="state = 'done'"/>
<field name="date_to" options="{'no_create':True, 'no_edit':True}"
attrs="{'readonly': [('state', '=', 'done')]}"/>
</group>
</group>
<footer>
<button name="action_export_excel" string="Generate Excel report" type="object"
class="btn-primary" attrs="{'invisible': [('state', '=', 'done')]}"/>
<button name="action_reset"
string="Generate New Report"
type="object"
class="btn-secondary"
attrs="{'invisible': [('state', '=', 'draft')]}"/>
<button string="Close"
class="btn-secondary"
special="cancel"/>
</footer>
These are the same files separate parts of odoo18, when i run this , there has a error like"Invalid modifier 'readonly': “state = 'done'”"
invalid syntax (<unknown>, line 1)
And also I think this attibute placing way has a issue, Can Someone help me to solve this, I am a beginner, I think this way is not supported to odoo18