Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
1669 Vistas

So i have a calendar view in the Transfers menuitem using stock.picking model. I also included some custom fields for that Transfer module. I created a new menu  item called Delivery Dates that groups the Scheduled dates fiel  and i have to create a custom calendar view that is different from the Transfers menuitem.

However, when i created the custom calendar view for the new menuitem, it also applies to the Transfers menuitem. How do make a multiple view for one model?


Here's my code:

name = "name" > stock.picking.calendar.copy field > 

name = "model" > stock.picking field > 

name = "priority" eval = "2" /> 

name = "arch" type = "xml" >

string = "Calendar View" date_start = " delivery_start" color = "partner_id" event_limit = "5" quick_add = "False" > 

name = "partner_id" filters = "1" /> 

name = "origin" /> 

name = "state" /> 

calendar > 

field >

  record >

 

id = "action_delivery_dates_view" model = "ir.actions.act_window" > 

name = "name" > Delivery dates  field > 

name = "res_model" > stock.picking  

name = "view_mode" > tree,form,calendar,gantt,kanban,map,pivot field > 

record >


I want to create one for gantt, kanban and tree view as well. But my example is for calendar.



Avatar
Descartar
Mejor respuesta

Hi 

We can create multiple views for one model. create records of each view in ir.actions.act_window.view 

Try this example

   

 <record id="view_id"

        model="ir.actions.act_window.view" style="color:#d5b778;">>

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

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

    <field name="view_id" ref="module_name.id_of_view"/>

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

</record>


Handling Of Multiples Views For Same Model In Odoo


Regards

Avatar
Descartar
Autor

I have tried this but it still doesn't work

Publicaciones relacionadas Respuestas Vistas Actividad
3
jun 25
5597
4
mar 24
14702
0
may 21
2396
2
sept 20
3346
1
ene 20
4252