OpenERP specify multiple view references on “view_id”

后端 未结 1 632
再見小時候
再見小時候 2021-02-01 11:30

I extended \"hr.employee\" class. (Inherited and gave the same name to the new one). I defined two views (tree and form) and a menu:



        
相关标签:
1条回答
  • 2021-02-01 11:58

    You have to map your action with particular tree,form view.

    Try this:

    <record model="ir.actions.act_window" id="action_my_hr_employee_seq">
        <field name="name">Angajati</field>
        <field name="res_model">hr.employee</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
    </record>
    
    <record model="ir.actions.act_window.view" id="act_hr_employee_tree_view">
        <field eval="1" name="sequence"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="your_tree_view_id"/>
        <field name="act_window_id" ref="action_my_hr_employee_seq"/>
    </record>
    
    <record model="ir.actions.act_window.view" id="act_hr_employee_form_view">
        <field eval="2" name="sequence"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="your_form_view_id"/>
        <field name="act_window_id" ref="action_my_hr_employee_seq"/>
    </record>
    
    0 讨论(0)
提交回复
热议问题