how to inherit pivot view from base module
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hi RajaKumari,
Pivot view is nothing but a view basically so you would inherit like you would inherit any view.
Try inheriting them as given below.
Base view:
<record id="view_project_task_pivot" model="ir.ui.view">
<field name="name">project.task.pivot</field>
<field name="model">project.task</field>
<field name="arch" type="xml">
<pivot string="Project Tasks">
<field name="project_id" type="row"/>
<field name="stage_id" type="col"/>
</pivot>
</field>
</record>
<record id="view_project_task_pivot_custom" model="ir.ui.view">
<field name="name">project.task.pivot.inherit</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="view_project_task_pivot"/>
<field name="arch" type="xml">
<pivot string="Custom Project Tasks">
<!-- Your Custom Code Goes Here -->
</pivot>
</field>
</record>
If that worked for you then don't forget to accept this as an answer, as it would help others who are stuck on the same question.
Hi I'm trying something similar.
I've added a field to product with studio : x_studio_categorie_libelle
I want to add it in the pivot view in Sales / Analyse.
I tried :
<record model="ir.ui.view" id="view_sale_order_pivot_ah">
<field name="name">sale.order.pivot.inherit</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_sale_order_pivot"/>
<field name="arch" type="xml">
<pivot string="Sales Orders">
<field name="x_studio_categorie_libelle" type="row"/>
</pivot>
</field>
</record>
Unsuccessfull....
An idea ?
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up