Warning: include_once(/home/favoledo/robertozanardo.com/wp-content/sunrise.php): Failed to open stream: No such file or directory in /home/favoledo/robertozanardo.com/wp-includes/ms-settings.php on line 52

Warning: include_once(): Failed opening '/home/favoledo/robertozanardo.com/wp-content/sunrise.php' for inclusion (include_path='.:/opt/alt/php83/usr/share/pear:/opt/alt/php83/usr/share/php:/usr/share/pear:/usr/share/php') in /home/favoledo/robertozanardo.com/wp-includes/ms-settings.php on line 52
Different views of the same type for a model in Odoo - Odoo e Soluzioni Open Source

Different views of the same type for a model in Odoo

I found this useful post on odoo forum: https://www.odoo.com/fr_FR/forum/aide-1/question/regarding-kanban-view-104695

 

Often we need different views of the same type (e.g: Kanban) for a model, in this answer, thanks to Jignesh Mehta, we have a full example:

 

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

<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

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

 

 

Lascia un commento

kolaybet
kolaybet giriş
kolaybet
betgaranti
Kolaybet
kolaybet
grandpashabet
grandpashabet
grandpashabet
bettilt
grandpashabet
Kolaybet
grandpashabet
kolaybet
sahabet
sahabet
betpark
betgaranti
betpark
betgaranti
kolaybet
kolaybet
betpark
betpark
betgaranti
betgaranti giriş
betgaranti güncel giriş
betgaranti
betgaranti 2026
hellocasino
betgaranti 2026
betgaranti
betgaranti 2026
Kolaybet 2026
Kolaybet
Kolaybet Mobil Giriş
Kolaybet Güncel Giriş
bettilt
vdcasino
vdcasino