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.

184 lines
7.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
  10. rel="stylesheet"
  11. href="/mail_move_message/static/src/css/mail_move_message.css"
  12. />
  13. <script
  14. type="text/javascript"
  15. src="/mail_move_message/static/src/js/mail_move_message.js"
  16. />
  17. </xpath>
  18. </template>
  19. <record id="view_wizard" model="ir.ui.view">
  20. <field name="name">mail_move_message.wizard.view</field>
  21. <field name="model">mail_move_message.wizard</field>
  22. <field name="arch" type="xml">
  23. <form string="Move Message">
  24. <field name="can_move" invisible="1" />
  25. <field name="message_is_moved" invisible="1" />
  26. <field name="message_name_from" invisible="1" />
  27. <field name="message_email_from" invisible="1" />
  28. <field name="message_to_read" invisible="1" />
  29. <field name="uid" invisible="1" />
  30. <p
  31. attrs="{'invisible':[('can_move', '!=', False)]}"
  32. >You cannot move this message. It was already moved with a message bellow. Open one and apply changes there.</p>
  33. <group attrs="{'invisible':[('can_move', '!=', False)]}">
  34. <field
  35. name="message_moved_by_message_id"
  36. context="{'extended_name':1}"
  37. />
  38. <field name="message_moved_by_user_id" />
  39. <button
  40. name="open_moved_by_message_id"
  41. string="Open message"
  42. type="object"
  43. class="oe_highlight"
  44. />
  45. </group>
  46. <group attrs="{'invisible':[('can_move', '=', False)]}" colspan="2">
  47. <label for="model_record" />
  48. <div>
  49. <field name="model_record" class="oe_inline" />
  50. <field name="model" invisible="1" />
  51. <field name="res_id" invisible="1" />
  52. </div>
  53. <label for="filter_by_partner" />
  54. <div>
  55. <field name="filter_by_partner" class="oe_inline" />
  56. <field name="partner_id" class="oe_inline" />
  57. <button
  58. string="Create Partner"
  59. attrs="{'invisible':[('partner_id','!=',False)]}"
  60. class="oe_highlight oe_inline ml32"
  61. special="quick_create"
  62. model="res.partner"
  63. field="partner_id"
  64. context="{'force_email':True,'default_email':message_email_from,'default_name':message_name_from, 'update_message_author':True}"
  65. />
  66. </div>
  67. <label
  68. for="move_back"
  69. attrs="{'invisible':[('message_is_moved','=',False)]}"
  70. />
  71. <div attrs="{'invisible':[('message_is_moved','=',False)]}">
  72. <field name="move_back" />
  73. </div>
  74. <label for="move_followers" />
  75. <div>
  76. <field name="move_followers" />
  77. </div>
  78. </group>
  79. <button
  80. name="move"
  81. string="Move"
  82. type="object"
  83. class="oe_highlight"
  84. attrs="{'invisible':[('can_move', '=', False)]}"
  85. />
  86. <button string="Close" class="" special="cancel" />
  87. <separator string="Message" />
  88. <group>
  89. <field name="message_subject" />
  90. <field name="message_from" />
  91. <field name="message_id" invisible="1" />
  92. </group>
  93. <div class="openerp mail_move_message">
  94. <div class="oe_mail">
  95. <div class="oe_msg">
  96. <div class="oe_msg_content">
  97. <div class="oe_msg_body">
  98. <!-- use built-in css for messages -->
  99. <field name="message_body" />
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. <footer>
  106. <button
  107. name="read_close"
  108. string="Mark as read and Close"
  109. type="object"
  110. class="oe_highlight"
  111. /> or
  112. <button special="cancel" string="Close" class="oe_link" />
  113. <button
  114. name="delete"
  115. string="Delete message"
  116. type="object"
  117. class="oe_highlight pull-right"
  118. confirm="Do you really want to delete this message?"
  119. attrs="{'invisible':[('uid','!=',1)]}"
  120. />
  121. </footer>
  122. </form>
  123. </field>
  124. </record>
  125. <!-- Relocation config wizard -->
  126. <record id="view_mail_move_message_config_settings" model="ir.ui.view">
  127. <field name="name">res.config.settings.view.form.inherit</field>
  128. <field name="model">res.config.settings</field>
  129. <field name="priority" eval="55" />
  130. <field name="inherit_id" ref="base.res_config_settings_view_form" />
  131. <field name="arch" type="xml">
  132. <xpath expr="//div[hasclass('settings')]" position="inside">
  133. <div
  134. class="app_settings_block"
  135. data-string="Mail Relocation"
  136. string="Mail Relocation"
  137. data-key="mail_move_message"
  138. >
  139. <h2>Mail Relocation</h2>
  140. <div class="row mt16 o_settings_container">
  141. <div class="col-xs-12 col-md-6 o_setting_box" id="crm_lead">
  142. <div class="o_setting_left_pane">
  143. </div>
  144. <div class="o_setting_right_pane">
  145. <label for="model_ids" />
  146. <div class="text-muted">
  147. Add models to be used for message relocation
  148. </div>
  149. <field name="model_ids" widget="many2many_tags" />
  150. </div>
  151. </div>
  152. <div class="col-xs-12 col-md-6 o_setting_box" id="crm_lead">
  153. <div class="o_setting_left_pane">
  154. <field name="move_followers" />
  155. </div>
  156. <div class="o_setting_right_pane">
  157. <label for="move_followers" />
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </xpath>
  163. </field>
  164. </record>
  165. <record id="action_mail_move_message_config" model="ir.actions.act_window">
  166. <field name="name">Mail Relocation</field>
  167. <field name="type">ir.actions.act_window</field>
  168. <field name="res_model">res.config.settings</field>
  169. <field name="view_id" ref="view_mail_move_message_config_settings" />
  170. <field name="view_mode">form</field>
  171. <field name="target">inline</field>
  172. <field name="context">{'module' : 'mail_move_message'}</field>
  173. </record>
  174. </odoo>