Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
1675 Vues

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
Ignorer
Meilleure réponse

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

I have tried this but it still doesn't work

Publications associées Réponses Vues Activité
3
juin 25
5599
4
mars 24
14707
0
mai 21
2399
2
sept. 20
3350
1
janv. 20
4255