I am trying to make in this tree view the fields read only, but this view is inherited from hr.employee
, and we are using <xpath>
, and I am able to make the normal fields read only except for the TITLE and ASSIGNED TO columns
Or is it possible to disable that out of the box checkbox from Odoo 14? Thanks!!
View definition:
<record id="view_task_tree_rw" model="ir.ui.view">
<field name="name">project.task.tree.inherited</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_tree2"/>
<field name="arch" type="xml">
<xpath expr="//tree[1]/field[@name='name']" position="after">
<field name="status"/>
<field name="date_start" widget="date"/>
<field name="date_end" widget="date" />
<field name="billable"/>
<field name="utilization"/>
<field name="planned_hours"/>
</xpath>
<xpath expr="//field[@name='company_id']" position="replace"/>
<xpath expr="//field[@name='activity_ids']" position="replace"/>
<xpath expr="//field[@name='tag_ids']" position="replace"/>
<xpath expr="//field[@name='stage_id']" position="replace"/>
<xpath expr="//field[@name='project_id']" position="replace"/>
<xpath expr="//tree[1]/field[@name='name']" position="after">
<xpath expr="//field[@name='user_id']" position="move"/>
</xpath>
</field>
</record>
Screenshot: