我没有任何错误,但它在仪表板视图中没有显示任何内容。
我在清单文件中添加了此文件,并在depends中添加了board模块。
我正在尝试在仪表板中添加项目树视图。
这是我的代码::
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record model="ir.ui.view" id="project_project_tree">
<field name="model">project.project</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="user_id"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="project_tree_view_action">
<field name="name">Project</field>
<field name="res_model">project.project</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="domain">[('name','!=',False)]</field>
<field name="view_id" ref="project_project_tree"/>
</record>
<record model="ir.ui.view" id="project_all_view_dashboard">
<field name="name">Session Dashboard Form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Project Dashboard">
<board style="2-1">
<hpaned>
<child1>
<action string="Project" name="%(project_tree_view_action)d"/>
</child1>
</hpaned>
</board>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="act_project_2_project_dashboard">
<field name="name">Project Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="project_all_view_dashboard"/>
</record>
<menuitem
name="Session Dashboard" parent="project.menu_main_pm"
action="act_project_2_project_dashboard"
sequence="50"
id="menu_board_session"/>
</data>
</odoo>
我的视图看起来像::
答案 0 :(得分:0)
以以下形式尝试:
<form string="Project Dashboard">
<board style="2-1">
<column>
<action
string="Project"
name="%(project_tree_view_action)d"
view_mode="list"/>
</column>
</board>
</form>