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.

60 lines
2.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="survey_user_input_form" model="ir.ui.view">
  4. <field name="name">survey_select_input survey.user_input form</field>
  5. <field name="model">survey.user_input</field>
  6. <field name="inherit_id" ref="survey.survey_user_input_form"/>
  7. <field name="priority">26</field>
  8. <field name="arch" type="xml">
  9. <div name="button_box" position="inside">
  10. <button type="object" name="toggle_selected" class="oe_stat_button" icon="fa-check"
  11. attrs="{'invisible':['|','|',('test_entry','=',True),('state','!=','done')]}">
  12. <field name="selected" widget="boolean_button"
  13. options="{'terminology': {'string_true': 'Selected', 'string_false': 'Not selected', 'hover_false': 'Select', 'hover_true': 'Unselect'}}"/>
  14. </button>
  15. </div>
  16. </field>
  17. </record>
  18. <record id="survey_user_input_tree" model="ir.ui.view">
  19. <field name="name">survey_select_input survey.user_input tree</field>
  20. <field name="model">survey.user_input</field>
  21. <field name="inherit_id" ref="survey.survey_user_input_tree"/>
  22. <field name="priority">26</field>
  23. <field name="arch" type="xml">
  24. <field name="state" position="after">
  25. <field name="selected" widget="boolean_toggle" attrs="{'invisible':['|',('test_entry','=',True),('state','!=','done')]}"/>
  26. </field>
  27. </field>
  28. </record>
  29. <record id="view_survey_user_input_kanban" model="ir.ui.view">
  30. <field name="name">survey_select_input survey.user_input kanban</field>
  31. <field name="model">survey.user_input</field>
  32. <field name="inherit_id" ref="survey.view_survey_user_input_kanban"/>
  33. <field name="priority">26</field>
  34. <field name="arch" type="xml">
  35. <field name="state" position="after">
  36. <field name="selected"/>
  37. </field>
  38. <xpath expr="//div[hasclass('o_kanban_record_top')]" position="inside">
  39. <span t-if="record.selected.raw_value" class="badge-pill badge-success">Selected</span>
  40. </xpath>
  41. </field>
  42. </record>
  43. <record id="survey_user_input_search" model="ir.ui.view">
  44. <field name="name">survey_select_input survey.user_input search</field>
  45. <field name="model">survey.user_input</field>
  46. <field name="inherit_id" ref="survey.survey_user_input_search"/>
  47. <field name="priority">26</field>
  48. <field name="arch" type="xml">
  49. <filter name="new" position="after">
  50. <separator/>
  51. <filter string="Selected" name="selected" domain="[('selected','=', True)]"/>
  52. </filter>
  53. </field>
  54. </record>
  55. </odoo>