Skip to Content
Menu
This question has been flagged
1 Reply
8317 Views

i have odoo 12 CE

i have created a new custom module and i need to inherit a kanban view to the custom module as a sub-menu

for example inherit the kanban view in the Project module to my custom module 

ie, when i create a project in Project module, reflect to the custom module automatically

Please help me to solve this ....

Avatar
Discard
Best Answer

Hi,

Are you looking to show the existing kanban as the view of your new menu? If so, what you can do is create a new menu in the custom module and as the action of the menu, you can call the existing menu action by giving the external id. 


The id of the action that works on clicking the project menu is  open_view_project_all. as you need to get the same in your custom module you can call it using external id, which is module_name.id, so here the external ID is project.open_view_project_all . Once you have done this on clicking a new menu you can see the kanban of the project.

If you don't want to use existing action, you can create a new action and link the view to the action.


If you just want to make changes inside the existing kanban view, you can inherit the kanban like this make changes needed.

<record id="view_project_kanban_inherit" model="ir.ui.view">
<field name="name">project.project.inherit</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.view_project_kanban"/>
<field name="arch" type="xml">
<field name="name_of_field" position="after">
<!--make changes-->
</field>
</field>
</record>


If you want to create a new kanban view from the existing kanban without making changes in the existing one, do it like this.

<record id="view_project_kanban_inherit" model="ir.ui.view">
<field name="name">project.project.inherit</field>
<field name="model">project.project</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="project.view_project_kanban"/>
<field name="arch" type="xml">
<field name="name_of_field" position="after">
<!--make changes-->
</field>
</field>
</record>

This will create a new view inheriting the existing view without making a change in the original view.


Thanks


Avatar
Discard
Related Posts Replies Views Activity
0
Aug 19
2408
0
Jul 19
2225
1
Jun 19
4876
4
Mar 19
3099
1
May 24
476