İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1672 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici

I have tried this but it still doesn't work

İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Haz 25
5598
4
Mar 24
14702
0
May 21
2397
2
Eyl 20
3349
1
Oca 20
4253