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.

99 lines
5.4 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. <field name="uid" invisible="1"/>
  20. <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>
  21. <group attrs="{'invisible':[('can_move', '!=', False)]}">
  22. <field name="message_moved_by_message_id" context="{'extended_name':1}"/>
  23. <field name="message_moved_by_user_id"/>
  24. <button name="open_moved_by_message_id" string="Open message" type="object" class="oe_highlight"/>
  25. </group>
  26. <group attrs="{'invisible':[('can_move', '=', False)]}" colspan="2">
  27. <label for="model"/>
  28. <div>
  29. <field name="model" widget="polymorphic" polymorphic="res_id" class="oe_inline"/>
  30. </div>
  31. <label for="filter_by_partner"/>
  32. <div>
  33. <field name="filter_by_partner"/>
  34. <field name="partner_id" style="width:50%"/>
  35. <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, 'update_message_author':True}"/>
  36. </div>
  37. <label for="res_id"/>
  38. <div>
  39. <field name="res_id" context="{'extended_name_with_contact':1}" widget="many2one" attrs="{'readonly': [('model','=',False)]}" style="width:50%"/>
  40. <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"/>
  41. </div>
  42. <label for="move_back" attrs="{'invisible':[('message_is_moved','=',False)]}"/>
  43. <div attrs="{'invisible':[('message_is_moved','=',False)]}">
  44. <field name="move_back"/>
  45. </div>
  46. </group>
  47. <button name="move" string="Move" type="object" class="oe_highlight" attrs="{'invisible':[('can_move', '=', False)]}"/>
  48. <button string="Close" class="" special="cancel" />
  49. <button name="read_close" string="Mark as read and Close" type="object" class="oe_highlight" attrs="{'invisible':[('message_to_read','=',False)]}"/>
  50. <separator string="Message"/>
  51. <div>
  52. <field name="message_id" invisible="1"/>
  53. <field name="message_body"/>
  54. </div>
  55. <footer>
  56. <button name="delete" string="Delete message" type="object" class="oe_highlight" confirm="Do you really want to delete this message?" attrs="{'invisible':[('uid','!=',1)]}"/>
  57. </footer>
  58. </form>
  59. </field>
  60. </record>
  61. <!-- Relocation config wizard -->
  62. <record id="view_mail_move_message_config_settings" model="ir.ui.view">
  63. <field name="name">relocation settings</field>
  64. <field name="model">mail_move_message.config.settings</field>
  65. <field name="arch" type="xml">
  66. <form string="Configure Mail Relocation" class="oe_form_configuration">
  67. <header>
  68. <button string="Apply" type="object" name="execute" class="oe_highlight"/>
  69. or
  70. <button string="Cancel" type="object" name="cancel" class="oe_link"/>
  71. </header>
  72. <div name="general">
  73. <separator string="Models"/>
  74. <field name="model_ids" widget="many2many_tags"/>
  75. </div>
  76. </form>
  77. </field>
  78. </record>
  79. <record id="action_mail_move_message_config" model="ir.actions.act_window">
  80. <field name="name">Mail Relocation</field>
  81. <field name="type">ir.actions.act_window</field>
  82. <field name="res_model">mail_move_message.config.settings</field>
  83. <field name="view_id" ref="view_mail_move_message_config_settings"/>
  84. <field name="view_mode">form</field>
  85. <field name="target">inline</field>
  86. </record>
  87. <!-- Add menu entry in Settings/Email -->
  88. <menuitem name="Mail Relocation" id="menu_mail_move_message" parent="base.menu_email" sequence="99" action="action_mail_move_message_config"/>
  89. </data>
  90. </openerp>