跳至內容
選單
此問題已被標幟
1 回覆
2977 瀏覽次數

I have create a inherited action of project.open_view_project_all

    fieldname="view_id"ref="project.view_project"/>

I want the default view is the tree-View of projects when i open the project app.


Now the problem is: if the user switch the view back to kanban, then not the "normal" view is shown (id= view_project_kanban ). The result is the mobile-version of the kanban (id= project_view_kanban )


When i didn´t change the value in "view_id", then it works fine - but the opening view is the kanban-view


Please help me, how can i change the default view of projects


頭像
捨棄
作者

Thanks - that works fine - thank you for you fast help today

最佳答案

Hi,

Are you trying to set the default view on clicking the menu as tree ? In order achieve this, you can change view_mode in the action and set tree as the first.


Sample:

<field name="view_mode">tree,kanban,form,calendar,graph</field>

Then if you need to show a particular tree view, when we have multiple tree for the model, we can achieve it like this.



For more, see:https://www.youtube.com/watch?v=-2EAt9nN4o0

Thanks

頭像
捨棄

<field name="view_ids"
eval="[(5, 0, 0),
(0, 0, {'view_mode': 'graph', 'view_id': ref('crm_opportunity_report_view_graph')}),
(0, 0, {'view_mode': 'pivot', 'view_id': ref('crm_opportunity_report_view_pivot')}),
(0, 0, {'view_mode': 'tree', 'view_id': ref('crm_case_tree_view_oppor')})]"/>

相關帖文 回覆 瀏覽次數 活動
0
5月 23
1372
2
6月 23
2591
3
5月 23
6703
0
11月 22
2010
0
10月 22
2582