event_question_views.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="event_question_view_form" model="ir.ui.view">
  4. <field name="name">event.question.view.form</field>
  5. <field name="model">event.question</field>
  6. <field name="arch" type="xml">
  7. <form string="Question">
  8. <sheet>
  9. <h1 class="d-flex"><field name="title" placeholder='e.g. "Do you have any diet restrictions?"' class="flex-grow-1"/></h1>
  10. <group>
  11. <group>
  12. <field name="is_mandatory_answer"/>
  13. <field name="question_type" widget="radio" options="{'horizontal': true}"/>
  14. </group>
  15. <group>
  16. <field name="once_per_order"/>
  17. </group>
  18. </group>
  19. <notebook attrs="{'invisible': [('question_type', '!=', 'simple_choice')]}">
  20. <page string="Answers" name="answers">
  21. <field name="answer_ids">
  22. <tree editable="bottom">
  23. <!-- 'display_name' is necessary for the many2many_tags to work on the event view -->
  24. <field name="display_name" invisible="1" />
  25. <field name="sequence" widget="handle" />
  26. <field name="name"/>
  27. </tree>
  28. </field>
  29. </page>
  30. </notebook>
  31. </sheet>
  32. </form>
  33. </field>
  34. </record>
  35. </odoo>