我的树视图出了问题,我无法识别它。请帮我解决这个问题,因为这看起来不像原始的Openerp Tree视图。我无法在其中看到搜索区域和其他格式。
XML
<record id="view_hr_mnthly_evaluation_search" model="ir.ui.view">
<field name="name">hr.mnthly.evaluation.search</field>
<field name="model">hr.mnthly.evaluation</field>
<field name="arch" type="xml">
<search string="Monthly Evaluation">
<field name="employee_id" />
<separator/>
<filter icon="terp-check" domain="[('state','=','draft')]" string="To Submit" name="to_submit"/>
<filter icon="terp-camera_test" domain="[('state','=','confirm')]" string="To Acknowledge" name="to_ackn"/>
<filter icon="terp-camera_test" domain="[('state','=','validate')]" string="Submitted to HR" name="in_hr"/>
<filter icon="terp-camera_test" domain="[('state','in',('confirm','validate1','validate'))]" string="Submitted by Employee" name="out_emp"/>
</search>
</field>
</record>
<record model="ir.ui.view" id="view_hr_mnthly_evaluation_submitted_tree">
<field name="name">hr.mnthly.evaluation.tree</field>
<field name="model">hr.mnthly.evaluation</field>
<field name="arch" type="xml">
<tree string="Monthly Evaluation" >
<field name="employee_id" width="300" on_change="onchange_employee(employee_id)" required="1"/>
<field name="department_id" width="300"/>
<field name="name" width="300"/>
<field name="state" string="Status" width="300"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="appraisals_to_acknowledge">
<field name="name">Appraisals to acknowledge</field>
<field name="res_model">hr.mnthly.evaluation</field>
<field name="view_type">tree</field>
<field name="view_mode">tree,form</field>
<!-- <field name="context">{'search_default_out_emp':1}</field> -->
<!-- <field name="domain">[('state','in',('confirm','validate1','validate'))]</field> -->
<field name="view_id" ref="view_hr_mnthly_evaluation_submitted_tree"/>
<field name="search_view_id" ref="view_hr_mnthly_evaluation_search"/>
</record>
答案 0 :(得分:3)
@odoo(OpenERP)树视图:
在树视图显示正确后,您应该在view_type和view_mode中更改操作。
<record id="appraisals_to_acknowledge" model="ir.actions.act_window">
<field name="name">Appraisals to acknowledge</field>
<field name="res_model">hr.mnthly.evaluation</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,search</field>
<field name="context">{}</field>
</record>