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.

98 lines
5.3 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp><data>
  3. <template id="assets_backend" name="custom bar assets" inherit_id="web.assets_backend">
  4. <xpath expr="." position="inside">
  5. <link rel="stylesheet" href="/mail_move_message/static/src/css/mail_move_message.css"/>
  6. <script type="text/javascript" src="/mail_move_message/static/src/js/mail_move_message.js"></script>
  7. </xpath>
  8. </template>
  9. <record id="view_wizard" model="ir.ui.view">
  10. <field name="name">mail_move_message.wizard.view</field>
  11. <field name="model">mail_move_message.wizard</field>
  12. <field name="arch" type="xml">
  13. <form string="Move Message">
  14. <field name="can_move" invisible="1"/>
  15. <field name="message_is_moved" invisible="1"/>
  16. <field name="message_name_from" invisible="1"/>
  17. <field name="message_email_from" invisible="1"/>
  18. <field name="message_to_read" invisible="1"/>
  19. <p attrs="{'invisible':[('can_move', '!=', False)]}">You cannot move this message. It was already moved with a message bellow. Open one and apply changes there.</p>
  20. <group attrs="{'invisible':[('can_move', '!=', False)]}">
  21. <field name="message_moved_by_message_id" context="{'extended_name':1}"/>
  22. <field name="message_moved_by_user_id"/>
  23. <button name="open_moved_by_message_id" string="Open message" type="object" class="oe_highlight"/>
  24. </group>
  25. <group attrs="{'invisible':[('can_move', '=', False)]}" colspan="2">
  26. <label for="model"/>
  27. <div>
  28. <field name="model" widget="polymorphic" polymorphic="res_id" class="oe_inline"/>
  29. </div>
  30. <label for="filter_by_partner"/>
  31. <div>
  32. <field name="filter_by_partner"/>
  33. <field name="partner_id" style="width:50%"/>
  34. <button string="Create Partner" attrs="{'invisible':[('partner_id','!=',False)]}" class="oe_highlight" special="quick_create" field="partner_id" context="{'force_email':True,'default_email':message_email_from,'default_name':message_name_from}"/>
  35. </div>
  36. <label for="res_id"/>
  37. <div>
  38. <field name="res_id" context="{'extended_name_with_contact':1}" widget="many2one" attrs="{'readonly': [('model','=',False)]}" style="width:50%"/>
  39. <button string="Create new record" name="create_record" type="object" class="oe_highlight" attrs="{'invisible':['|',('model','=',False),('res_id','!=',False)]}" special="quick_create" field="res_id" use_for_mail_move_message="True"/>
  40. </div>
  41. <label for="move_back" attrs="{'invisible':[('message_is_moved','=',False)]}"/>
  42. <div attrs="{'invisible':[('message_is_moved','=',False)]}">
  43. <field name="move_back"/>
  44. </div>
  45. </group>
  46. <button name="move" string="Move" type="object" class="oe_highlight" attrs="{'invisible':[('can_move', '=', False)]}"/>
  47. <button string="Close" class="" special="cancel" />
  48. <button name="read_close" string="Mark as read and Close" type="object" class="oe_highlight" attrs="{'invisible':[('message_to_read','=',False)]}"/>
  49. <separator string="Message"/>
  50. <div>
  51. <field name="message_id" invisible="1"/>
  52. <field name="message_body"/>
  53. </div>
  54. <footer>
  55. <button name="delete" string="Delete message" type="object" class="oe_highlight" confirm="Do you really want to delete this message?"/>
  56. </footer>
  57. </form>
  58. </field>
  59. </record>
  60. <!-- Relocation config wizard -->
  61. <record id="view_mail_move_message_config_settings" model="ir.ui.view">
  62. <field name="name">relocation settings</field>
  63. <field name="model">mail_move_message.config.settings</field>
  64. <field name="arch" type="xml">
  65. <form string="Configure Mail Relocation" class="oe_form_configuration">
  66. <header>
  67. <button string="Apply" type="object" name="execute" class="oe_highlight"/>
  68. or
  69. <button string="Cancel" type="object" name="cancel" class="oe_link"/>
  70. </header>
  71. <div name="general">
  72. <separator string="Models"/>
  73. <field name="model_ids" widget="many2many_tags"/>
  74. </div>
  75. </form>
  76. </field>
  77. </record>
  78. <record id="action_mail_move_message_config" model="ir.actions.act_window">
  79. <field name="name">Mail Relocation</field>
  80. <field name="type">ir.actions.act_window</field>
  81. <field name="res_model">mail_move_message.config.settings</field>
  82. <field name="view_id" ref="view_mail_move_message_config_settings"/>
  83. <field name="view_mode">form</field>
  84. <field name="target">inline</field>
  85. </record>
  86. <!-- Add menu entry in Settings/Email -->
  87. <menuitem name="Mail Relocation" id="menu_mail_move_message" parent="base.menu_email" sequence="99" action="action_mail_move_message_config"/>
  88. </data>
  89. </openerp>