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.

89 lines
4.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. <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)]}"/>
  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)]}" class="oe_inline"/>
  36. <field name="record_url" widget="url" class="oe_inline"/>
  37. </div>
  38. </group>
  39. <field name="move_back" attrs="{'invisible':[('message_is_moved','=',False)]}" colspan="4"/>
  40. <button name="move" string="Move" type="object" class="oe_highlight" attrs="{'invisible':[('can_move', '=', False)]}"/>
  41. <button string="Cancel" class="" special="cancel" />
  42. <separator string="Message"/>
  43. <div>
  44. <field name="message_id" invisible="1"/>
  45. <field name="message_body"/>
  46. </div>
  47. </form>
  48. </field>
  49. </record>
  50. <!-- Relocation config wizard -->
  51. <record id="view_mail_move_message_config_settings" model="ir.ui.view">
  52. <field name="name">relocation settings</field>
  53. <field name="model">mail_move_message.config.settings</field>
  54. <field name="arch" type="xml">
  55. <form string="Configure Mail Relocation" class="oe_form_configuration">
  56. <header>
  57. <button string="Apply" type="object" name="execute" class="oe_highlight"/>
  58. or
  59. <button string="Cancel" type="object" name="cancel" class="oe_link"/>
  60. </header>
  61. <div name="general">
  62. <separator string="Models"/>
  63. <field name="model_ids" widget="many2many_tags"/>
  64. </div>
  65. </form>
  66. </field>
  67. </record>
  68. <record id="action_mail_move_message_config" model="ir.actions.act_window">
  69. <field name="name">Mail Relocation</field>
  70. <field name="type">ir.actions.act_window</field>
  71. <field name="res_model">mail_move_message.config.settings</field>
  72. <field name="view_id" ref="view_mail_move_message_config_settings"/>
  73. <field name="view_mode">form</field>
  74. <field name="target">inline</field>
  75. </record>
  76. <!-- Add menu entry in Settings/Email -->
  77. <menuitem name="Mail Relocation" id="menu_mail_move_message" parent="base.menu_email" sequence="99" action="action_mail_move_message_config"/>
  78. </data>
  79. </openerp>