survey_invite_views.xml 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <record model="ir.ui.view" id="survey_invite_view_form">
  5. <field name="name">survey.invite.view.form</field>
  6. <field name="model">survey.invite</field>
  7. <field name="arch" type="xml">
  8. <form string="Compose Email" class="o_mail_composer_form">
  9. <group col="1">
  10. <group col="2">
  11. <field name="survey_access_mode" invisible="1"/>
  12. <field name="survey_users_login_required" invisible="1"/>
  13. <field name="survey_users_can_signup" invisible="1"/>
  14. <field name="survey_id" readonly="context.get('default_survey_id')"/>
  15. <field name="existing_mode" widget="radio" invisible="1" />
  16. <field name="render_model" invisible="1"/>
  17. <field name="survey_start_url" label="Public share URL" readonly="1" widget="CopyClipboardChar"
  18. attrs="{'invisible':[('survey_access_mode', '!=', 'public')]}"
  19. class="mb16"/>
  20. <field name="partner_ids"
  21. widget="many2many_tags_email"
  22. placeholder="Add existing contacts..."
  23. context="{'force_email':True, 'show_email':True, 'no_create_edit': True}"/>
  24. <field name="emails"
  25. attrs="{
  26. 'invisible': [('survey_users_login_required', '=', True)],
  27. }"
  28. placeholder="Add a list of email recipients (separated by commas, semicolons or line breaks). They will not be converted into contacts."/>
  29. </group>
  30. <div col="2" class="alert alert-warning" role="alert"
  31. attrs="{'invisible': ['|', ('survey_access_mode', '=', 'public'), ('existing_text', '=', False)]}">
  32. <field name="existing_text"/>
  33. <group col="2">
  34. <label for="existing_mode" string="Handle existing"/>
  35. <div>
  36. <field name="existing_mode" nolabel="1"/>
  37. <p attrs="{'invisible': [('existing_mode', '!=', 'resend')]}">Customers will receive the same token.</p>
  38. <p attrs="{'invisible': [('existing_mode', '!=', 'new')]}">Customers will receive a new token and be able to completely retake the survey.</p>
  39. </div>
  40. </group>
  41. <field name="existing_partner_ids" invisible="1"/>
  42. <field name="existing_emails" invisible="1"/>
  43. </div>
  44. <group col="2">
  45. <field name="subject" placeholder="Subject..."/>
  46. </group>
  47. <field name="can_edit_body" invisible="1"/>
  48. <field name="body" class="oe-bordered-editor" options="{'style-inline': true, 'height': 380}" attrs="{'readonly': [('can_edit_body', '=', False)]}" force_save="1"/>
  49. <group>
  50. <group>
  51. <field name="attachment_ids" widget="many2many_binary"/>
  52. </group>
  53. <group>
  54. <field name="deadline"/>
  55. <field name="template_id" label="Use template"/>
  56. </group>
  57. </group>
  58. </group>
  59. <footer>
  60. <button string="Send" name="action_invite" type="object" class="btn-primary" data-hotkey="q"/>
  61. <button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z"/>
  62. </footer>
  63. </form>
  64. </field>
  65. </record>
  66. </data>
  67. </odoo>