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.

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