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.

72 lines
2.9 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="survey_survey_view_form" model="ir.ui.view">
  4. <field name="name">survey_deadline_autoclose form</field>
  5. <field name="model">survey.survey</field>
  6. <field name="inherit_id" ref="survey.survey_survey_view_form" />
  7. <field name="priority">28</field>
  8. <field name="arch" type="xml">
  9. <field name="scoring_type" position="before">
  10. <label for="deadline" />
  11. <div class="o_row">
  12. <field name="deadline" class="oe_inline" />
  13. <label for="auto_close" string="Automatic closing ?" attrs="{'invisible': [('deadline', '=', False)]}" />
  14. <field name="auto_close" attrs="{'invisible': [('deadline', '=', False)]}" />
  15. </div>
  16. </field>
  17. </field>
  18. </record>
  19. <record id="survey_survey_view_tree" model="ir.ui.view">
  20. <field name="name">survey_deadline_autoclose tree</field>
  21. <field name="model">survey.survey</field>
  22. <field name="inherit_id" ref="survey.survey_survey_view_tree" />
  23. <field name="priority">28</field>
  24. <field name="arch" type="xml">
  25. <field name="user_id" position="after">
  26. <field name="deadline" />
  27. <field name="auto_close" />
  28. </field>
  29. </field>
  30. </record>
  31. <record id="survey_survey_view_kanban" model="ir.ui.view">
  32. <field name="name">survey_deadline_autoclose kanban</field>
  33. <field name="model">survey.survey</field>
  34. <field name="inherit_id" ref="survey.survey_survey_view_kanban" />
  35. <field name="priority">28</field>
  36. <field name="arch" type="xml">
  37. <field name="color" position="after">
  38. <field name="auto_close" />
  39. </field>
  40. <xpath expr="//div[hasclass('o_survey_kanban_card_ungrouped', 'row', 'mx-0')]/div[1]" position="after">
  41. <div t-if="!selection_mode and record.deadline.raw_value" class="col-lg-1 col-sm-4 col-6 py-0 my-2">
  42. <span t-attf-class="fw-bold">
  43. <field name="deadline" widget="date" />
  44. </span>
  45. <br />
  46. <span class="text-muted"
  47. t-attf-title="#{record.auto_close.raw_value ? 'Survey will be automatically closed once deadline passed' : ''}">
  48. Deadline <i t-if="record.auto_close.raw_value" class="fa fa-cogs" /> <i
  49. t-if="record.auto_close.raw_value" class="fa fa-long-arrow-right" /> <i
  50. t-if="record.auto_close.raw_value" class="fa fa-archive" /></span>
  51. </div>
  52. </xpath>
  53. </field>
  54. </record>
  55. <record id="survey_survey_view_search" model="ir.ui.view">
  56. <field name="name">survey_deadline_autoclose search</field>
  57. <field name="model">survey.survey</field>
  58. <field name="inherit_id" ref="survey.survey_survey_view_search" />
  59. <field name="priority">28</field>
  60. <field name="arch" type="xml">
  61. <xpath expr="//filter[@name='group_by_responsible']" posititon="after">
  62. <filter string="Deadline" name="group_by_deadline"
  63. context="{'group_by':'deadline'}" />
  64. </xpath>
  65. </field>
  66. </record>
  67. </odoo>