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.

75 lines
3.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)]}" col="4">
  23. <field name="move_back" attrs="{'invisible':[('message_is_moved','=',False)]}" colspan="4"/>
  24. <field name="parent_id" domain="[('parent_id','=', False)]" context="{'extended_name':1}" colspan="4"/>
  25. <field name="model_id" colspan="2" />
  26. <field name="res_id" colspan="2"/>
  27. <field name="record_url" colspan="4" widget="url"/>
  28. </group>
  29. <button name="move" string="Move" type="object" class="oe_highlight" attrs="{'invisible':[('can_move', '=', False)]}"/>
  30. <button string="Cancel" class="" special="cancel" />
  31. <separator string="Message"/>
  32. <div>
  33. <field name="message_id" invisible="1"/>
  34. <field name="message_body"/>
  35. </div>
  36. </form>
  37. </field>
  38. </record>
  39. <!-- Relocation config wizard -->
  40. <record id="view_mail_move_message_config_settings" model="ir.ui.view">
  41. <field name="name">relocation settings</field>
  42. <field name="model">mail_move_message.config.settings</field>
  43. <field name="arch" type="xml">
  44. <form string="Configure Mail Relocation" class="oe_form_configuration">
  45. <header>
  46. <button string="Apply" type="object" name="execute" class="oe_highlight"/>
  47. or
  48. <button string="Cancel" type="object" name="cancel" class="oe_link"/>
  49. </header>
  50. <div name="general">
  51. <separator string="Models"/>
  52. <field name="model_ids" widget="many2many_tags"/>
  53. </div>
  54. </form>
  55. </field>
  56. </record>
  57. <record id="action_mail_move_message_config" model="ir.actions.act_window">
  58. <field name="name">Mail Relocation</field>
  59. <field name="type">ir.actions.act_window</field>
  60. <field name="res_model">mail_move_message.config.settings</field>
  61. <field name="view_id" ref="view_mail_move_message_config_settings"/>
  62. <field name="view_mode">form</field>
  63. <field name="target">inline</field>
  64. </record>
  65. <!-- Add menu entry in Settings/Email -->
  66. <menuitem name="Mail Relocation" id="menu_mail_move_message" parent="base.menu_email" sequence="20" action="action_mail_move_message_config"/>
  67. </data>
  68. </openerp>