Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
1681 Visualizzazioni

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
Abbandona
Risposta migliore

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

I have tried this but it still doesn't work

Post correlati Risposte Visualizzazioni Attività
3
giu 25
5604
4
mar 24
14710
0
mag 21
2401
2
set 20
3352
1
gen 20
4257