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.

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