コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1671 ビュー

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.



アバター
破棄
最善の回答

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

アバター
破棄
著作者

I have tried this but it still doesn't work

関連投稿 返信 ビュー 活動
3
6月 25
5598
4
3月 24
14702
0
5月 21
2397
2
9月 20
3346
1
1月 20
4252