我想在odoo 12仪表板中打开表单视图。 说明:我已经在odoo 12中创建了自定义信息中心,因为我想显示调查表视图。为此,我创建了以下代码:
<record id="action_survey_create" model="ir.actions.act_window">
<field name="name">Create Survey</field>
<field name="res_model">survey.survey</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="survey.survey_form"/>
</record>
<!-- Form view of board -->
<record id="survey_board_form" model="ir.ui.view">
<field name="name">survey.board.form</field>
<field name="model">board.board</field>
<field name="view_type">form</field>
<field name="arch" type="xml">
<form string="Survey board">
<h2>Survey</h2>
<dashboard>
<view type="form" ref="survey.survey_form" />
</dashboard>
<hpaned>
<child1>
<action string="Survey Create" name="%(action_survey_create)d"/>
</child1>
</hpaned>
</form>
</field>
</record>
<!-- Action of board -->
<record id="survey_board" model="ir.actions.act_window">
<field name="name">Survey</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="survey_board_form" />
</record>
使用和不使用将显示。但是在odoo v10上也可以使用相同的功能。不明白为什么会这样。我很困。请帮我。如何在仪表板上打开视图。