Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Create a dynamic view in OpenERP/Odoo

    • 0
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 2.05k
    Comment on it

    In dynamic view we can manage view from xml file.
    Therefore you can create a dynamic view as done in example stated below

    <record model="ir.ui.view" id="session_tree">
                <field name="name">session tree</field>
                <field name="model">session</field>
                <field name="arch" type="xml">
                    <tree string="Session">
                        <field name="name"/>
                        <field name="start_date"/>
                        <field name="duration"/>
                        <field name="seat"/>
                        <field name="attendee1"/>
                        <field name="instructor"/>
                        <field name="course"/>
                    </tree>
                </field>
        </record>
    
            <record id="action_courses" model="ir.actions.act_window">
                        <field name="name">Courses</field>
                        <field name="type">ir.actions.act_window</field>
                        <field name="res_model">course</field>
                        <field name="view_type">form</field>
                        <field name="view_id" ref="course_tree"/>
                        <field name="view_mode">tree,form</field>
            </record>           
    
                 <record id="action_attendee" model="ir.actions.act_window">
                        <field name="name">Attendee</field>
                        <field name="type">ir.actions.act_window</field>
                        <field name="res_model">attendee</field>
                        <field name="view_type">form</field>
                        <field name="view_id" ref="attendee_tree"/>
                        <field name="view_mode">tree,form</field>
             </record>
    
                <record id="action_session" model="ir.actions.act_window">
                        <field name="name">Session</field>
                        <field name="type">ir.actions.act_window</field>
                        <field name="res_model">session</field>
                        <field name="view_type">form</field>
                        <field name="view_id" ref="session_tree"/>
                        <field name="view_mode">tree,form</field>
             </record>
    
                <menuitem id="menu_course_main" name="Academy"/>
                <menuitem id="menu_course_main2" parent="menu_course_main" name="Academy"/>
                <menuitem id="menu_course_child1" parent="menu_course_main2" name="Courses" action="action_courses"/>                       
                <menuitem id="menu_attendee_child1" parent="menu_course_main2" name="Attendee" action="action_attendee"/>
                <menuitem id="menu_session_child1" parent="menu_course_main2" name="Session" action="action_session"/>
    
           </data>
    </openerp>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: