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.

89 lines
3.9 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright 2018 Tecnativa - Jairo Llopis
  3. License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
  4. <data>
  5. <record id="activity_form" model="ir.ui.view">
  6. <field name="name">Add consent fields</field>
  7. <field name="model">privacy.activity</field>
  8. <field name="inherit_id" ref="privacy.activity_form"/>
  9. <field name="arch" type="xml">
  10. <div name="button_box" position="inside">
  11. <!-- TODO Change icon to fa-handshake-o in Odoo 11 -->
  12. <button
  13. attrs='{"invisible": [("consent_required", "=", False)]}'
  14. class="oe_stat_button"
  15. context='{"search_default_activity_id": active_id}'
  16. icon="fa-gavel"
  17. name="%(consent_action)d"
  18. type="action"
  19. >
  20. <field
  21. name="consent_count"
  22. widget="statinfo"
  23. />
  24. </button>
  25. </div>
  26. <notebook name="advanced" position="inside">
  27. <page string="Consent" name="consent">
  28. <group>
  29. <label for="consent_required"/>
  30. <div>
  31. <field name="consent_required" class="oe_inline"/>
  32. <button
  33. attrs='{"invisible": [("consent_required", "!=", "manual")]}'
  34. class="btn-link"
  35. icon="fa-user-plus"
  36. name="action_new_consents"
  37. type="object"
  38. string="Generate missing draft consent requests"
  39. />
  40. <button
  41. attrs='{"invisible": [("consent_required", "!=", "auto")]}'
  42. class="btn-link"
  43. icon="fa-user-plus"
  44. name="action_new_consents"
  45. type="object"
  46. string="Generate and send missing consent requests"
  47. confirm="This could send many consent emails, are you sure to proceed?"
  48. />
  49. </div>
  50. </group>
  51. <group
  52. attrs='{"invisible": [("consent_required", "=", False)]}'
  53. >
  54. <group>
  55. <field name="default_consent"/>
  56. <field
  57. name="server_action_id"
  58. groups="base.group_no_one"
  59. />
  60. </group>
  61. <group>
  62. <field
  63. name="consent_template_default_body_html"
  64. invisible="1"
  65. />
  66. <field
  67. name="consent_template_default_subject"
  68. invisible="1"
  69. />
  70. <field
  71. name="consent_template_id"
  72. attrs='{"required": [("consent_required", "=", "auto")]}'
  73. context='{
  74. "default_model": "privacy.consent",
  75. "default_body_html": consent_template_default_body_html,
  76. "default_subject": consent_template_default_subject,
  77. }'
  78. />
  79. </group>
  80. </group>
  81. </page>
  82. </notebook>
  83. </field>
  84. </record>
  85. </data>