Odoo modules related to surveys
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
2.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record model="ir.ui.view" id="survey_question_custom_form">
  4. <field name="name">Form view for survey custom question</field>
  5. <field name="model">survey.question</field>
  6. <field name="inherit_id" ref="survey.survey_question_form"/>
  7. <field name="arch" type="xml">
  8. <xpath expr="//notebook//page//field[@name='labels_ids']//tree" position="inside">
  9. <field name="type"/>
  10. <field name="dpvalues" widget="many2many_tags" attrs="{'invisible': [('type', '!=', 'dropdown')]}"/>
  11. </xpath>
  12. </field>
  13. </record>
  14. <record model="ir.ui.view" id="survey_user_input_line_custom_form">
  15. <field name="name">survey_user_input_line_custom_form</field>
  16. <field name="model">survey.user_input_line</field>
  17. <field name="inherit_id" ref="survey.survey_user_input_line_form"/>
  18. <field name="arch" type="xml">
  19. <field name="value_text" position="after">
  20. <field name="value_dropdown" attrs="{'invisible': [('answer_type','!=','dropdown')]}"/>
  21. <field name="matrix_subtype_id"/>
  22. </field>
  23. <field name="value_suggested" position="replace">
  24. <field name="value_suggested" colspan='2' attrs="{'invisible': [ ('answer_type','!=','suggestion'), ('matrix_subtype_id', '!=', 'custom_row')]}"/>
  25. </field>
  26. </field>
  27. </record>
  28. <report
  29. id="action_view_pdf_answers"
  30. string="Answers"
  31. model="survey.user_input"
  32. report_type="qweb-pdf"
  33. file="custom_matrix_survey.report_survey_answers"
  34. name="custom_matrix_survey.report_survey_answers"
  35. print_report_name="'answer - %s' % (object.survey_id.title)"
  36. />
  37. <record model="ir.ui.view" id="survey_user_input_custom_form">
  38. <field name="name">survey_user_input_custom_form</field>
  39. <field name="model">survey.user_input</field>
  40. <field name="inherit_id" ref="survey.survey_user_input_form"/>
  41. <field name="arch" type="xml">
  42. <xpath expr="//form//header//button[@name='action_view_answers']" position="after">
  43. <button name="%(action_view_pdf_answers)d" states="done" string="Print PDF Answers" type="action" class="oe_highlight" />
  44. </xpath>
  45. </field>
  46. </record>
  47. </odoo>