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.

34 lines
1.8 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- Form view -->
  4. <record id="view_email_template_sendgrid_form" model="ir.ui.view">
  5. <field name="name">mass.mailing.sendgrid.form</field>
  6. <field name="model">mail.mass_mailing</field>
  7. <field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_form"/>
  8. <field name="arch" type="xml">
  9. <field name="body_html" position="attributes">
  10. <attribute name="attrs">{'invisible': [('email_template_id', '!=', False)]}</attribute>
  11. </field>
  12. <field name="body_html" position="after">
  13. <field name="html_unframe" widget="html" attrs="{'invisible': [('email_template_id', '=', False)]}"/>
  14. </field>
  15. <xpath expr="//field[@name='mailing_model']/.." position="after">
  16. <field name="email_template_id" domain="[('model', '=', mailing_model), ('sendgrid_template_ids', '!=', False)]"/>
  17. <field name="lang" attrs="{'invisible': [('email_template_id', '=', False)]}"/>
  18. </xpath>
  19. <xpath expr="//notebook/page[1]" position="after">
  20. <page string="Sendgrid Preview" attrs="{'invisible': [('email_template_id', '=', False)]}">
  21. <field name="html_copy" invisible="1"/>
  22. <field name="body_sendgrid" widget="html"/>
  23. </page>
  24. </xpath>
  25. <xpath expr="//notebook/page/group[1]">
  26. <group string="Sendgrid Unsubscribe">
  27. <field name="enable_unsubscribe"/>
  28. <field name="unsubscribe_text" attrs="{'invisible': [('enable_unsubscribe', '=', False)]}"/>
  29. <field name="unsubscribe_tag" attrs="{'invisible': [('enable_unsubscribe', '=', False)]}"/>
  30. </group>
  31. </xpath>
  32. </field>
  33. </record>
  34. </odoo>