Hi, I need to add a button to a row in tree view to change the state, how can I achieve it?
I'm adding the button directly like this:
<record id="view_xxx_tree" model="ir.ui.view">
<field name="name">xxx.tree</field>
<field name="model">xxx</field>
<field name="arch" type="xml">
<tree decoration-info="state=='draft'" name="appointment_tree">
<field name="sequence" widget="handle"/>
<field name="name" string="Name"/>
<field name="patient_id"/>
<field name="date"/>
<field name="responsible_id" invisible="1"/>
<field name="create_uid"/>
<field name="state"/>
<button name="draft" type="object" string="Draft" class="oe_highlight"/>
</tree>
</field>
</record>
but it's not showing on the tree view