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.

48 lines
2.1 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>
  3. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
  4. <openerp>
  5. <data>
  6. <record model="ir.ui.view" id="view_mail_mass_mailing_form">
  7. <field name="name">Add pending emails to be sent</field>
  8. <field name="model">mail.mass_mailing</field>
  9. <field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_form"/>
  10. <field name="arch" type="xml">
  11. <xpath expr="//button[@name='send_mail'][1]" position="attributes">
  12. <attribute name="attrs">{'invisible': ['|', ('state', 'in', ('done', 'sending')), ('body_html', '=', False)]}</attribute>
  13. <attribute name="context">{'sending_queue_enabled': True}</attribute>
  14. </xpath>
  15. <xpath expr="//button[@name='send_mail'][2]" position="attributes">
  16. <attribute name="attrs">{'invisible': ['|', ('state', 'not in', ('done', )), ('body_html', '=', False)]}</attribute>
  17. <attribute name="context">{'sending_queue_enabled': True}</attribute>
  18. </xpath>
  19. <xpath expr="div[@class='oe_form_box_info oe_text_center']" position="attributes">
  20. <attribute name="attrs">{'invisible': [('pending_count', '=', 0)]}</attribute>
  21. </xpath>
  22. <field name="scheduled" position="attributes">
  23. <attribute name="invisible">1</attribute>
  24. </field>
  25. <field name="scheduled" position="after">
  26. <field name="pending_count" class="oe_inline"/>
  27. </field>
  28. <notebook position="inside">
  29. <page string="Sending tasks">
  30. <field name="mass_mailing_sending_ids" nolabel="1">
  31. <tree string="Sending tasks">
  32. <field name="date_start"/>
  33. <field name="state"/>
  34. <field name="pending_count"/>
  35. <field name="sending_count"/>
  36. <field name="sent_count"/>
  37. <field name="failed_count"/>
  38. </tree>
  39. </field>
  40. </page>
  41. </notebook>
  42. </field>
  43. </record>
  44. </data>
  45. </openerp>