콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
9578 화면

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 ....

아바타
취소
베스트 답변

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


아바타
취소
관련 게시물 답글 화면 활동
0
8월 19
3249
0
7월 19
2966
1
6월 19
5999
4
3월 19
4056
1
5월 24
1574