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.

87 lines
3.7 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright 2017 Tecnativa - Jairo Llopis
  3. License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
  4. <odoo>
  5. <record id="view_mail_mass_mailing_list_form" model="ir.ui.view">
  6. <field name="name">Add sync stuff</field>
  7. <field name="model">mail.mass_mailing.list</field>
  8. <field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_list_form"/>
  9. <field name="arch" type="xml">
  10. <xpath expr="//div[@class='oe_title']" position="after">
  11. <group name="dynamic" string="Dynamic list">
  12. <group colspan="4">
  13. <field
  14. name="dynamic"
  15. />
  16. <field name="is_synced" invisible="1"/>
  17. </group>
  18. <group attrs="{'invisible': [('dynamic', '=', False)]}">
  19. <label for="sync_method"/>
  20. <div>
  21. <field
  22. name="sync_method"
  23. />
  24. <button
  25. name="action_sync"
  26. type="object"
  27. string="Sync now"
  28. icon="fa-exclamation-triangle"
  29. class="btn-danger"
  30. attrs="{'invisible': [('is_synced', '=', True)]}"
  31. />
  32. <button
  33. name="action_sync"
  34. type="object"
  35. string="Sync now"
  36. icon="fa-refresh"
  37. attrs="{'invisible': [('is_synced', '=', False)]}"
  38. />
  39. </div>
  40. </group>
  41. <group attrs="{'invisible': [('dynamic', '=', False)]}">
  42. <div
  43. class="alert alert-info"
  44. role="alert"
  45. >
  46. <i class="fa fa-info-circle"/> If you want to remove contacts from a dynamic list, just <b>set them as <i>Opt Out</i></b>.
  47. </div>
  48. <div
  49. class="alert alert-warning"
  50. role="alert"
  51. >
  52. <i class="fa fa-info-circle"/> You cannot make manual editions of contacts in fully synchronized lists.
  53. </div>
  54. </group>
  55. <group colspan="4"
  56. attrs="{'invisible': [('dynamic', '=', False)]}">
  57. <field
  58. name="sync_domain"
  59. widget="char_domain"
  60. options='{"model": "res.partner"}'
  61. />
  62. </group>
  63. <button
  64. name="%(action_mail_mass_mailing_load_filter)d"
  65. type="action"
  66. string="Load filter"
  67. icon="fa-filter"
  68. colspan="1"
  69. />
  70. </group>
  71. </xpath>
  72. <field name="contact_nbr" position="attributes">
  73. <attribute name="attrs">
  74. {'invisible': [('is_synced', '=', False)]}
  75. </attribute>
  76. </field>
  77. <field name="contact_nbr" position="after">
  78. <span attrs="{'invisible': [('is_synced', '=', True)]}">
  79. <strong>???</strong>
  80. </span>
  81. </field>
  82. </field>
  83. </record>
  84. </odoo>