mail_group_message_reject_views.xml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="mail_group_message_reject_form" model="ir.ui.view">
  4. <field name="name">mail.group.message.reject.form</field>
  5. <field name="model">mail.group.message.reject</field>
  6. <field name="arch" type="xml">
  7. <form string="Reject">
  8. <div class="alert alert-warning" role="alert" attrs="{'invisible': [('action', '!=', 'reject')]}">
  9. Reject the message<span attrs="{'invisible': [('send_email', '=', False)]}"> and send an email to the author (<field name="email_from_normalized"/>)</span>.
  10. </div>
  11. <div class="alert alert-warning" role="alert" attrs="{'invisible': [('action', '!=', 'ban')]}">
  12. Ban the author of the message (<field name="email_from_normalized"/>) <span attrs="{'invisible': [('send_email', '=', False)]}">and send them an email</span>.
  13. </div>
  14. <group>
  15. <field name="send_email" invisible="1"/>
  16. <field name="mail_group_message_id" invisible="1"/>
  17. <field name="subject"/>
  18. <field name="body"/>
  19. <field name="action" invisible="1"/>
  20. </group>
  21. <footer>
  22. <button string="Reject Silently" name="action_send_mail" type="object" class="btn-primary"
  23. attrs="{'invisible': ['|', ('action', '!=', 'reject'), ('send_email', '=', True)]}"/>
  24. <button string="Send &amp; Reject" name="action_send_mail" type="object" class="btn-primary"
  25. attrs="{'invisible': ['|', ('action', '!=', 'reject'), ('send_email', '=', False)]}"/>
  26. <button string="Ban" name="action_send_mail" type="object" class="btn-primary"
  27. attrs="{'invisible': ['|', ('action', '!=', 'ban'), ('send_email', '=', True)]}"/>
  28. <button string="Send &amp; Ban" name="action_send_mail" type="object" class="btn-primary"
  29. attrs="{'invisible': ['|', ('action', '!=', 'ban'), ('send_email', '=', False)]}"/>
  30. <button string="Discard" class="btn-secondary" special="cancel"/>
  31. </footer>
  32. </form>
  33. </field>
  34. </record>
  35. <record id="mail_group_message_reject_action" model="ir.actions.act_window">
  36. <field name="name">Message Rejection Explanation</field>
  37. <field name="res_model">mail.group.message.reject</field>
  38. <field name="type">ir.actions.act_window</field>
  39. <field name="view_mode">form</field>
  40. <field name="target">new</field>
  41. </record>
  42. </odoo>