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.

55 lines
2.2 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. <odoo>
  5. <record id="compose_form" model="ir.ui.view">
  6. <field name="name">Forward Email Form</field>
  7. <field name="model">mail_forward.compose_message</field>
  8. <field name="inherit_id" ref="mail.email_compose_message_wizard_form"/>
  9. <field name="arch" type="xml">
  10. <data>
  11. <!-- It's required to fill either `partner_ids` or
  12. `destination_object_id` -->
  13. <xpath expr="//field[@name='partner_ids']" position="attributes">
  14. <attribute name="attrs">{
  15. 'required': [('destination_object_id', '=', False)]
  16. }
  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. </data>
  36. </field>
  37. </record>
  38. <record id="compose_action" model="ir.actions.act_window">
  39. <field name="name">Forward Email</field>
  40. <field name="res_model">mail_forward.compose_message</field>
  41. <field name="src_model">mail.message</field>
  42. <field name="type">ir.actions.act_window</field>
  43. <field name="view_id" ref="compose_form"/>
  44. <field name="view_type">form</field>
  45. <field name="view_mode">form</field>
  46. <field name="target">new</field>
  47. </record>
  48. </odoo>