hello guys,
I need help, I'm trying to disable edit button in form view based on a field value state
here's the status I want to disable edit button based on it :
Status = fields.Selection([
('pending', 'Pending'),
('resolved', 'Resolved'),
('in progress', 'In Progress')
])
and here's my form view - >
<record id="complaint_form" model="ir.ui.view">
<field name="name">complaint.form</field>
<field name="model">complaint</field>
<field name="arch" type="xml">
<form >
<sheet>
<group>
<group>
<field name="x_css" invisible="1"/>
<field name = "employee" widget="many2one_tags"/>
<div style="height:20px">
</div>
<field name = "department" widget="many2one_tags"/>
</group>
<group>
<field name = "complaint_type" widget="many2one_tags"/>
<div style="height:20px">
</div>
<field name = "issue"/>
</group>
<group>
<field name = "date"/>
<div style="height:20px">
</div>
<field name = "resolved_date"/>
</group>
<group>
<field name = "has_financial_effect"/>
<div style="height:20px">
</div>
<field name = "has_effect_on_work_efficiency"/>
</group>
<group>
<field name = "Status"/>
<div style="height:20px">
</div>
<field name = "action_company"/>
</group>
</group>
</sheet>
</form>
</field>
</record>