Help

3

Regarding Kanban view

Avatar
Annadurai

Shall we use multiple kanban views of the same model in the same Module with different default_group_by ??

Avatar
Discard
1 Answer
0
Avatar
Jignesh Mehta
Best Answer

Hello Annadurai,


Yes, You can use multiple kanban views of the same model in the same module.

For this, you can define different view, different search view and different action for the same model in same module.


For Ex :-

Kanban-1

<record id="kanban_1_view" model="ir.ui.view">

    ------

</record>

Search view - 1 :- In this search view you can write about the group by which is apply to this kanban - 1.

<record id="search_1_view" model="ir.ui.view">

    ------

</record>

Action view - 1

<record id="action_1" model="ir.actions.act_window">

     -----

    <field name="search_view_id" ref="search_1_view"/> // define search view for kanban 1

</record>

This record for show different different view for multiple.

<record model="ir.actions.act_window.view" id="1_kanban">

    <field name="act_window_id" ref="action_1" />

    <field name="view_mode">kanban</field>

    <field name="sequence">1</field>

    <field name="view_id" ref="kanban_1_view" /> // In view id, you can define which kanban you want to show.

</record>


Kanban-2

<record id="kanban_2_view" model="ir.ui.view">

    ------

</record>

Search view - 2 :- In this search view you can write about the group by which is apply to this kanban - 2.

<record id="search_2_view" model="ir.ui.view">

    ------

</record>

Action view - 2

<record id="action_2" model="ir.actions.act_window">

    -----

    <field name="search_view_id" ref="search_2_view"/> // define search view for kanban 2

</record>

This record for show different different view for multiple.

<record model="ir.actions.act_window.view" id="2_kanban">

    <field name="act_window_id" ref="action_2" />

    <field name="view_mode">kanban</field>

     <field name="sequence">1</field>

    <field name="view_id" ref="kanban_2_view" /> // In view id, you can define which kanban you want to show.

</record>


From that way, you can use multiple kanban views of the same model in the same module.

Hope this short example helps you.

Thanks,

Avatar
Discard