event_quiz_question_views.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="event_quiz_question_view_search" model="ir.ui.view">
  4. <field name="name">event.quiz.question.view.search</field>
  5. <field name="model">event.quiz.question</field>
  6. <field name="arch" type="xml">
  7. <search string="Quiz Questions">
  8. <field name="name"/>
  9. <field name="quiz_id"/>
  10. <group string="Group By" expand="0">
  11. <filter string="Quiz" name="groupby_quiz_id" context="{'group_by': 'quiz_id'}"/>
  12. </group>
  13. </search>
  14. </field>
  15. </record>
  16. <record id="event_quiz_question_view_tree" model="ir.ui.view">
  17. <field name="name">event.quiz.question.view.tree</field>
  18. <field name="model">event.quiz.question</field>
  19. <field name="arch" type="xml">
  20. <tree string="Quiz Questions">
  21. <field name="sequence" widget="handle"/>
  22. <field name="name"/>
  23. <field name="quiz_id"/>
  24. <field name="awarded_points"/>
  25. </tree>
  26. </field>
  27. </record>
  28. <record id="event_quiz_question_view_tree_from_quiz" model="ir.ui.view">
  29. <field name="name">event.quiz.question.view.tree.from.quiz</field>
  30. <field name="model">event.quiz.question</field>
  31. <field name="inherit_id" ref="website_event_track_quiz.event_quiz_question_view_tree"/>
  32. <field name="mode">primary</field>
  33. <field name="arch" type="xml">
  34. <xpath expr="//field[@name='quiz_id']" position="replace">
  35. </xpath>
  36. </field>
  37. </record>
  38. <record id="event_quiz_question_view_form" model="ir.ui.view">
  39. <field name="name">event.quiz.question.view.form</field>
  40. <field name="model">event.quiz.question</field>
  41. <field name="arch" type="xml">
  42. <form string="Quiz Question">
  43. <sheet>
  44. <h1>
  45. <field name="name" default_focus="1"
  46. placeholder="e.g. What is Joe's favorite motto?"/>
  47. </h1>
  48. <group>
  49. <field name="quiz_id"/>
  50. <field name="awarded_points" invisible="1"/>
  51. </group>
  52. <group name="questions">
  53. <field name="answer_ids" nolabel="1" colspan="2">
  54. <tree editable="bottom" create="true" delete="true">
  55. <field name="sequence" widget="handle"/>
  56. <field name="text_value"/>
  57. <field name="is_correct"/>
  58. <field name="awarded_points"/>
  59. <field name="comment"/>
  60. </tree>
  61. </field>
  62. </group>
  63. </sheet>
  64. </form>
  65. </field>
  66. </record>
  67. <record id="event_quiz_question_view_form_from_quiz" model="ir.ui.view">
  68. <field name="name">event.quiz.question.view.form.from.quiz</field>
  69. <field name="model">event.quiz.question</field>
  70. <field name="inherit_id" ref="website_event_track_quiz.event_quiz_question_view_form"/>
  71. <field name="mode">primary</field>
  72. <field name="arch" type="xml">
  73. <xpath expr="//field[@name='quiz_id']" position="replace">
  74. </xpath>
  75. </field>
  76. </record>
  77. <record id="event_quiz_question_action" model="ir.actions.act_window">
  78. <field name="name">Event Quiz Questions</field>
  79. <field name="res_model">event.quiz.question</field>
  80. <field name="view_mode">tree,form</field>
  81. <field name="context">{'create': False}</field>
  82. <field name="help" type="html">
  83. <p class="o_view_nocontent_smiling_face">
  84. No Quiz Question yet!
  85. </p><p>
  86. From here you will be able to examine all quiz questions you have linked to Tracks.
  87. </p>
  88. </field>
  89. </record>
  90. </odoo>