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

    1. <record model="ir.ui.view" id="session_tree">
    2. <field name="name">session tree</field>
    3. <field name="model">session</field>
    4. <field name="arch" type="xml">
    5. <tree string="Session">
    6. <field name="name"/>
    7. <field name="start_date"/>
    8. <field name="duration"/>
    9. <field name="seat"/>
    10. <field name="attendee1"/>
    11. <field name="instructor"/>
    12. <field name="course"/>
    13. </tree>
    14. </field>
    15. </record>
    16.  
    17. <record id="action_courses" model="ir.actions.act_window">
    18. <field name="name">Courses</field>
    19. <field name="type">ir.actions.act_window</field>
    20. <field name="res_model">course</field>
    21. <field name="view_type">form</field>
    22. <field name="view_id" ref="course_tree"/>
    23. <field name="view_mode">tree,form</field>
    24. </record>
    25.  
    26. <record id="action_attendee" model="ir.actions.act_window">
    27. <field name="name">Attendee</field>
    28. <field name="type">ir.actions.act_window</field>
    29. <field name="res_model">attendee</field>
    30. <field name="view_type">form</field>
    31. <field name="view_id" ref="attendee_tree"/>
    32. <field name="view_mode">tree,form</field>
    33. </record>
    34.  
    35. <record id="action_session" model="ir.actions.act_window">
    36. <field name="name">Session</field>
    37. <field name="type">ir.actions.act_window</field>
    38. <field name="res_model">session</field>
    39. <field name="view_type">form</field>
    40. <field name="view_id" ref="session_tree"/>
    41. <field name="view_mode">tree,form</field>
    42. </record>
    43.  
    44. <menuitem id="menu_course_main" name="Academy"/>
    45. <menuitem id="menu_course_main2" parent="menu_course_main" name="Academy"/>
    46. <menuitem id="menu_course_child1" parent="menu_course_main2" name="Courses" action="action_courses"/>
    47. <menuitem id="menu_attendee_child1" parent="menu_course_main2" name="Attendee" action="action_attendee"/>
    48. <menuitem id="menu_session_child1" parent="menu_course_main2" name="Session" action="action_session"/>
    49.  
    50. </data>
    51. </openerp>

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Reset Password
Fill out the form below and reset your password: