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.

137 lines
6.7 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--# Copyright 2016 Ildar Nasyrov <https://it-projects.info/team/iledarn>
  3. # Copyright 2016 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
  4. # Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
  5. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).-->
  6. <odoo>
  7. <template id="assets_backend" name="custom bar assets" inherit_id="web.assets_backend">
  8. <xpath expr="." position="inside">
  9. <link rel="stylesheet" href="/mail_move_message/static/src/css/mail_move_message.css"/>
  10. <script type="text/javascript" src="/mail_move_message/static/src/js/mail_move_message.js"></script>
  11. </xpath>
  12. </template>
  13. <record id="view_wizard" model="ir.ui.view">
  14. <field name="name">mail_move_message.wizard.view</field>
  15. <field name="model">mail_move_message.wizard</field>
  16. <field name="arch" type="xml">
  17. <form string="Move Message">
  18. <field name="can_move" invisible="1"/>
  19. <field name="message_is_moved" invisible="1"/>
  20. <field name="message_name_from" invisible="1"/>
  21. <field name="message_email_from" invisible="1"/>
  22. <field name="message_to_read" invisible="1"/>
  23. <field name="uid" invisible="1"/>
  24. <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>
  25. <group attrs="{'invisible':[('can_move', '!=', False)]}">
  26. <field name="message_moved_by_message_id" context="{'extended_name':1}"/>
  27. <field name="message_moved_by_user_id"/>
  28. <button name="open_moved_by_message_id" string="Open message" type="object" class="oe_highlight"/>
  29. </group>
  30. <group attrs="{'invisible':[('can_move', '=', False)]}" colspan="2">
  31. <label for="model_record"/>
  32. <div>
  33. <field name="model_record" class="oe_inline"/>
  34. <field name="model" invisible="1"/>
  35. <field name="res_id" invisible="1"/>
  36. </div>
  37. <label for="filter_by_partner"/>
  38. <div>
  39. <field name="filter_by_partner" class="oe_inline"/>
  40. <field name="partner_id" class="oe_inline"/>
  41. <button string="Create Partner" attrs="{'invisible':[('partner_id','!=',False)]}"
  42. class="oe_highlight oe_inline ml32"
  43. special="quick_create" model="res.partner" field="partner_id" context="{'force_email':True,'default_email':message_email_from,'default_name':message_name_from, 'update_message_author':True}" />
  44. </div>
  45. <label for="move_back" attrs="{'invisible':[('message_is_moved','=',False)]}"/>
  46. <div attrs="{'invisible':[('message_is_moved','=',False)]}">
  47. <field name="move_back"/>
  48. </div>
  49. <label for="move_followers"/>
  50. <div>
  51. <field name="move_followers"/>
  52. </div>
  53. </group>
  54. <button name="move" string="Move" type="object" class="oe_highlight" attrs="{'invisible':[('can_move', '=', False)]}"/>
  55. <button string="Close" class="" special="cancel" />
  56. <separator string="Message"/>
  57. <group>
  58. <field name="message_subject"/>
  59. <field name="message_from"/>
  60. <field name="message_id" invisible="1"/>
  61. </group>
  62. <div class="openerp mail_move_message">
  63. <div class="oe_mail">
  64. <div class="oe_msg">
  65. <div class="oe_msg_content">
  66. <div class="oe_msg_body">
  67. <!-- use built-in css for messages -->
  68. <field name="message_body"/>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <footer>
  75. <button name="read_close" string="Mark as read and Close" type="object" class="oe_highlight"/> or
  76. <button special="cancel" string="Close" class="oe_link"/>
  77. <button name="delete" string="Delete message" type="object" class="oe_highlight pull-right" confirm="Do you really want to delete this message?" attrs="{'invisible':[('uid','!=',1)]}"/>
  78. </footer>
  79. </form>
  80. </field>
  81. </record>
  82. <!-- Relocation config wizard -->
  83. <record id="view_mail_move_message_config_settings" model="ir.ui.view">
  84. <field name="name">res.config.settings.view.form.inherit</field>
  85. <field name="model">res.config.settings</field>
  86. <field name="priority" eval="55"/>
  87. <field name="inherit_id" ref="base.res_config_settings_view_form"/>
  88. <field name="arch" type="xml">
  89. <xpath expr="//div[hasclass('settings')]" position="inside">
  90. <div class="app_settings_block" data-string="Mail Relocation" string="Mail Relocation" data-key="mail_move_message">
  91. <h2>Mail Relocation</h2>
  92. <div class="row mt16 o_settings_container">
  93. <div class="col-xs-12 col-md-6 o_setting_box" id="crm_lead">
  94. <div class="o_setting_left_pane">
  95. </div>
  96. <div class="o_setting_right_pane">
  97. <label for="model_ids"/>
  98. <div class="text-muted">
  99. Add models to be used for message relocation
  100. </div>
  101. <field name="model_ids" widget="many2many_tags"/>
  102. </div>
  103. </div>
  104. <div class="col-xs-12 col-md-6 o_setting_box" id="crm_lead">
  105. <div class="o_setting_left_pane">
  106. <field name="move_followers"/>
  107. </div>
  108. <div class="o_setting_right_pane">
  109. <label for="move_followers"/>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. </xpath>
  115. </field>
  116. </record>
  117. <record id="action_mail_move_message_config" model="ir.actions.act_window">
  118. <field name="name">Mail Relocation</field>
  119. <field name="type">ir.actions.act_window</field>
  120. <field name="res_model">res.config.settings</field>
  121. <field name="view_id" ref="view_mail_move_message_config_settings"/>
  122. <field name="view_mode">form</field>
  123. <field name="target">inline</field>
  124. <field name="context">{'module' : 'mail_move_message'}</field>
  125. </record>
  126. </odoo>