I am trying to override view of task' timesheets tab in project. Here are new module view.xml:
<record id="view_project_task_form_materials" model="ir.ui.view">
<field name="name">project.task.form.materials</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="view_sale_service_inherit_form2"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='timesheet_ids']/ancestor::page" position="after">
<page name="materials_used" string="Materials" groups="project.group_tasks_work_on_tasks">
<field name="material_ids" groups="project.group_tasks_work_on_tasks">
<tree string="Materials used" editable="top">
<field name="product_id"/>
<field name="quantity"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
When I install the module, an error appears:
External ID not found in the system: project_task_materials.view_sale_service_inherit_form2" while parsing view.xml.
I know the inherited view ID is sale_timesheet.view_sale_service_inherit_form2
. How to specify it in my XML file?
in ref you need to specify the full xml id using the name of the addon that you inherit the view form
Like this:
also make sure on your
__manifest__.py
file you are depending onsale_timesheet
Best regards