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.

67 lines
2.7 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="survey_survey_form" model="ir.ui.view">
  4. <field name="name">survey_deadline_autoclose survey.survey form</field>
  5. <field name="model">survey.survey</field>
  6. <field name="inherit_id" ref="survey.survey_form"/>
  7. <field name="priority">28</field>
  8. <field name="arch" type="xml">
  9. <field name="stage_id" position="before">
  10. <button name="action_close_survey" string="Close survey" type="object" attrs="{'invisible': [('is_closed', '=', True)]}"/>
  11. </field>
  12. <xpath expr="//group[hasclass('o_label_nowrap')]/.." position="inside">
  13. <group name="options">
  14. </group>
  15. </xpath>
  16. <group name="options" position="inside">
  17. <xpath expr="//group[hasclass('o_label_nowrap')]" position="move"/>
  18. </group>
  19. <group name="options" position="inside">
  20. <group name="deadline" class="o_label_nowrap">
  21. <field name="date_deadline" class="oe_inline"/>
  22. <field name="auto_close" attrs="{'invisible': [('date_deadline','=',False)]}"/>
  23. </group>
  24. </group>
  25. </field>
  26. </record>
  27. <record id="survey_survey_tree" model="ir.ui.view">
  28. <field name="name">survey_deadline_autoclose survey.survey tree</field>
  29. <field name="model">survey.survey</field>
  30. <field name="inherit_id" ref="survey.survey_tree"/>
  31. <field name="priority">28</field>
  32. <field name="arch" type="xml">
  33. <tree position="attributes">
  34. <attribute name="decoration-muted">is_closed</attribute>
  35. </tree>
  36. <tree position="inside">
  37. <field name="is_closed" invisible="1"/>
  38. </tree>
  39. <field name="stage_id" position="after">
  40. <field name="date_deadline"/>
  41. <field name="auto_close"/>
  42. </field>
  43. </field>
  44. </record>
  45. <record id="survey_survey_kanban" model="ir.ui.view">
  46. <field name="name">survey_deadline_autoclose survey.survey kanban</field>
  47. <field name="model">survey.survey</field>
  48. <field name="inherit_id" ref="survey.survey_kanban"/>
  49. <field name="priority">28</field>
  50. <field name="arch" type="xml">
  51. <field name="title" position="after">
  52. <field name="date_deadline"/>
  53. <field name="auto_close"/>
  54. </field>
  55. <li id="survey_test" position="before">
  56. <li t-if="record.date_deadline.raw_value" id="deadline" class="text-muted" t-att-title="record.auto_close.raw_value and 'Auto close on expiration' or 'Manual close'">
  57. <t t-if="record.auto_close.raw_value">Expiration : <strong class="text-danger"><field name="date_deadline"/></strong></t>
  58. <t t-else="">Expiration : <strong><field name="date_deadline"/></strong></t>
  59. </li>
  60. </li>
  61. </field>
  62. </record>
  63. </odoo>