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.

64 lines
2.4 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- © 2014-2015 Grupo ESOC <www.grupoesoc.es>
  3. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
  4. <openerp>
  5. <data>
  6. <record id="compose_form" model="ir.ui.view">
  7. <field name="name">Forward Email Form</field>
  8. <field name="model">mail_forward.compose_message</field>
  9. <field name="inherit_id" ref="mail.email_compose_message_wizard_form"/>
  10. <field name="arch" type="xml">
  11. <data>
  12. <!-- It's required to fill either `partner_ids` or
  13. `destination_object_id` -->
  14. <xpath expr="//field[@name='partner_ids']" position="attributes">
  15. <attribute name="attrs">{
  16. 'required': [('destination_object_id', '=', False)]
  17. }</attribute>
  18. </xpath>
  19. <xpath expr="//label[@for='partner_ids']" position="before">
  20. <!-- Object where the message will be attached -->
  21. <field
  22. attrs="{
  23. 'required': [('partner_ids', '=', [[6, False, []]])]}"
  24. name="destination_object_id"/>
  25. <!-- If the message has attachments, should we move them to the
  26. new object? -->
  27. <field
  28. name="move_attachments"
  29. attrs="{
  30. 'invisible': [
  31. '|',
  32. ('destination_object_id', '=', False),
  33. ('attachment_ids', '=', [[6, False, []]])]}"/>
  34. </xpath>
  35. <!-- If there's no document to follow, hide the message -->
  36. <xpath expr="//span[text()='Followers of the document and']"
  37. position="attributes">
  38. <attribute name="attrs">{
  39. 'invisible': [('destination_object_id', '=', False)]
  40. }</attribute>
  41. </xpath>
  42. </data>
  43. </field>
  44. </record>
  45. <record id="compose_action" model="ir.actions.act_window">
  46. <field name="name">Forward Email</field>
  47. <field name="res_model">mail_forward.compose_message</field>
  48. <field name="src_model">mail.message</field>
  49. <field name="type">ir.actions.act_window</field>
  50. <field name="view_id" ref="compose_form"/>
  51. <field name="view_type">form</field>
  52. <field name="view_mode">form</field>
  53. <field name="target">new</field>
  54. </record>
  55. </data>
  56. </openerp>