Question
making sale_line_id field invisible
I'm working on customizing Odoo and have encountered an issue with the sale_line_id field.
I'm inheriting the project.task model in my custom module (wsl_available_drivers). In view, I need to make the sale_line_id field invisible.
<record id="view_task_form2" model="ir.ui.view">
<field name="name">Project.task.view.form.inherit.available.drivers</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='user_ids']" position="before">
<field name="first_user" invisible="1"/>
<field name="Journey_start_date"/>
<field name="recurring_task" invisible="1"/>
</xpath>
<xpath expr="//field[@name='sale_line_id']" position="attribute">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
When attempting to hide sale_line_id using XPath, I receive an error stating that the field does not exist in the project.task model.
Upon further investigation: I found that sale_line_id is related to the Task model, with relatedmodel pointing to sale.order.line.
However, I cannot locate the sale_line_id field within the sale.order.line model or its related modules.