crm_team_views.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo><data>
  3. <record id="crm_team_view_search" model="ir.ui.view">
  4. <field name="name">crm.team.view.search</field>
  5. <field name="model">crm.team</field>
  6. <field name="arch" type="xml">
  7. <search string="Salesteams Search">
  8. <filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
  9. <field name="name"/>
  10. <field name="user_id"/>
  11. <field name="member_ids"/>
  12. <group expand="0" string="Group By...">
  13. <filter string="Team Leader" name="team_leader" domain="[]" context="{'group_by': 'user_id'}"/>
  14. </group>
  15. </search>
  16. </field>
  17. </record>
  18. <record id="crm_team_view_form" model="ir.ui.view">
  19. <field name="name">crm.team.form</field>
  20. <field name="model">crm.team</field>
  21. <field name="arch" type="xml">
  22. <form string="Sales Team">
  23. <div class="alert alert-info text-center" role="alert"
  24. attrs="{'invisible': ['|', ('is_membership_multi', '=', True), ('member_warning', '=', False)]}">
  25. <field name="member_warning"/>
  26. </div>
  27. <sheet>
  28. <div class="oe_button_box" name="button_box"/>
  29. <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
  30. <div class="oe_title">
  31. <label for="name" string="Sales Team"/>
  32. <h1>
  33. <field class="text-break" name="name" placeholder="e.g. North America"/>
  34. </h1>
  35. <div name="options_active"/>
  36. </div>
  37. <group>
  38. <group name="left" string="Team Details">
  39. <field name="active" invisible="1"/>
  40. <field name="sequence" invisible="1"/>
  41. <field name="is_membership_multi" invisible="1"/>
  42. <field name="user_id" widget="many2one_avatar_user" domain="[('share', '=', False)]"/>
  43. <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
  44. <field name="currency_id" invisible="1"/>
  45. <field name="member_company_ids" invisible="1"/>
  46. </group>
  47. <group name="right">
  48. </group>
  49. </group>
  50. <notebook>
  51. <page string="Members" name="members_users">
  52. <field name="member_ids" mode="kanban"
  53. class="w-100">
  54. <kanban>
  55. <field name="id"/>
  56. <field name="name"/>
  57. <field name="email"/>
  58. <field name="avatar_128"/>
  59. <templates>
  60. <t t-name="kanban-box">
  61. <div class="oe_kanban_card oe_kanban_global_click">
  62. <div class="o_kanban_card_content d-flex">
  63. <div>
  64. <img t-att-src="kanban_image('res.users', 'avatar_128', record.id.raw_value)"
  65. class="o_kanban_image o_image_64_cover" alt="Avatar"/>
  66. </div>
  67. <div class="oe_kanban_details d-flex flex-column ms-3">
  68. <strong class="o_kanban_record_title oe_partner_heading"><field name="name"/></strong>
  69. <div class="d-flex align-items-baseline text-break">
  70. <i class="fa fa-envelope me-1" role="img" aria-label="Email" title="Email"/><field name="email"/>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </t>
  76. </templates>
  77. </kanban>
  78. </field>
  79. <field name="crm_team_member_ids" mode="kanban"
  80. class="w-100"
  81. attrs="{'invisible': ['|', ('is_membership_multi', '=', True), ('is_membership_multi', '=', False)]}"
  82. context="{
  83. 'kanban_view_ref': 'sales_team.crm_team_member_view_kanban_from_team',
  84. 'form_view_ref': 'sales_team.crm_team_member_view_form_from_team',
  85. 'tree_view_ref': 'sales_team.crm_team_member_view_tree_from_team',
  86. 'default_crm_team_id': active_id,
  87. }"/>
  88. </page>
  89. </notebook>
  90. </sheet>
  91. <div class="oe_chatter">
  92. <field name="message_follower_ids" help="Follow this salesteam to automatically track the events associated to users of this team."/>
  93. <field name="message_ids"/>
  94. </div>
  95. </form>
  96. </field>
  97. </record>
  98. <!-- SALES TEAMS TREE VIEW + MUTI_EDIT -->
  99. <record id="crm_team_view_tree" model="ir.ui.view">
  100. <field name="name">crm.team.tree</field>
  101. <field name="model">crm.team</field>
  102. <field name="field_parent">child_ids</field>
  103. <field name="arch" type="xml">
  104. <tree string="Sales Team" sample="1" multi_edit="1">
  105. <field name="sequence" widget="handle"/>
  106. <field name="name" readonly="1"/>
  107. <field name="active" invisible="1"/>
  108. <field name="user_id" domain="[('share', '=', False)]" widget="many2one_avatar_user"/>
  109. <field name="company_id" groups="base.group_multi_company"/>
  110. </tree>
  111. </field>
  112. </record>
  113. <record id="crm_team_view_kanban" model="ir.ui.view">
  114. <field name="name">crm.team.view.kanban</field>
  115. <field name="model">crm.team</field>
  116. <field name="arch" type="xml">
  117. <kanban class="o_kanban_mobile" sample="1">
  118. <templates>
  119. <t t-name="kanban-box">
  120. <div t-attf-class="oe_kanban_content oe_kanban_global_click">
  121. <div class="row">
  122. <div class="col-6">
  123. <strong><field name="name"/></strong>
  124. </div>
  125. <div class="col-6">
  126. <span class="float-end"><field name="user_id"/></span>
  127. </div>
  128. </div>
  129. </div>
  130. </t>
  131. </templates>
  132. </kanban>
  133. </field>
  134. </record>
  135. <!-- Case Teams Salesteams dashboard view -->
  136. <record id="crm_team_view_kanban_dashboard" model="ir.ui.view" >
  137. <field name="name">crm.team.view.kanban.dashboard</field>
  138. <field name="model">crm.team</field>
  139. <field name="priority">10</field>
  140. <field name="arch" type="xml">
  141. <kanban class="oe_background_grey o_kanban_dashboard o_crm_team_kanban" create="0" sample="1">
  142. <field name="name"/>
  143. <field name="user_id"/>
  144. <field name="member_ids"/>
  145. <field name="color"/>
  146. <field name="currency_id"/>
  147. <field name="is_favorite"/>
  148. <templates>
  149. <t t-name="kanban-box">
  150. <div t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}">
  151. <div t-attf-class="o_kanban_card_header">
  152. <div class="o_kanban_card_header_title">
  153. <div class="o_primary o_text_overflow"><field name="name"/></div>
  154. </div>
  155. <div class="o_kanban_manage_button_section">
  156. <a class="o_kanban_manage_toggle_button" href="#"><i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/></a>
  157. </div>
  158. </div>
  159. <div class="container o_kanban_card_content">
  160. <div class="row o_kanban_card_upper_content">
  161. <div class="col-4 o_kanban_primary_left" name="to_replace_in_sale_crm">
  162. <button type="object" class="btn btn-primary" name="action_primary_channel_button"><field name="dashboard_button_name"/></button>
  163. </div>
  164. <div class="col-8 o_kanban_primary_right" style="padding-bottom:0;">
  165. <t name="first_options"/>
  166. <t name="second_options"/>
  167. <t name="third_options"/>
  168. </div>
  169. </div>
  170. <div class="row">
  171. <div class="col-12 o_kanban_primary_bottom">
  172. <t t-call="SalesTeamDashboardGraph"/>
  173. </div>
  174. </div>
  175. </div><div class="container o_kanban_card_manage_pane dropdown-menu" role="menu">
  176. <div class="row">
  177. <div class="col-4 o_kanban_card_manage_section o_kanban_manage_view">
  178. <div role="menuitem" class="o_kanban_card_manage_title">
  179. <span>View</span>
  180. </div>
  181. </div>
  182. <div class="col-4 o_kanban_card_manage_section o_kanban_manage_new">
  183. <div role="menuitem" class="o_kanban_card_manage_title">
  184. <span>New</span>
  185. </div>
  186. </div>
  187. <div class="col-4 o_kanban_card_manage_section o_kanban_manage_reports">
  188. <div role="menuitem" class="o_kanban_card_manage_title">
  189. <span>Reporting</span>
  190. </div>
  191. <div name="o_team_kanban_report_separator"></div>
  192. </div>
  193. </div>
  194. <div t-if="widget.editable" class="o_kanban_card_manage_settings row" groups="sales_team.group_sale_manager">
  195. <div role="menuitem" aria-haspopup="true" class="col-8">
  196. <ul class="oe_kanban_colorpicker" data-field="color" role="menu"/>
  197. </div>
  198. <div role="menuitem" class="col-4">
  199. <a class="dropdown-item" type="edit">Configuration</a>
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204. </t>
  205. <t t-name="SalesTeamDashboardGraph">
  206. <div t-if="record.dashboard_graph_data.raw_value" class="o_sales_team_kanban_graph_section">
  207. <field name="dashboard_graph_data" widget="dashboard_graph" t-att-graph_type="'bar'"/>
  208. </div>
  209. </t>
  210. </templates>
  211. </kanban>
  212. </field>
  213. </record>
  214. <!-- Sales Teams Actions -->
  215. <record id="crm_team_action_sales" model="ir.actions.act_window">
  216. <field name="name">Sales Teams</field>
  217. <field name="res_model">crm.team</field>
  218. <field name="view_mode">kanban,form</field>
  219. <field name="context">{'in_sales_app': True}</field>
  220. <field name="help" type="html">
  221. <p class="o_view_nocontent_smiling_face">
  222. Define a new sales team
  223. </p><p>
  224. Use Sales Teams to organize your sales departments.
  225. Each team will work with a separate pipeline.
  226. </p>
  227. </field>
  228. </record>
  229. <record id="crm_team_action_pipeline" model="ir.actions.act_window">
  230. <field name="name">Teams</field>
  231. <field name="res_model">crm.team</field>
  232. <field name="view_mode">kanban,form</field>
  233. <field name="context">{}</field>
  234. <field name="help" type="html">
  235. <p class="o_view_nocontent_smiling_face">
  236. Define a new sales team
  237. </p><p>
  238. Use Sales Teams to organize your sales departments.
  239. Each team will work with a separate pipeline.
  240. </p>
  241. </field>
  242. </record>
  243. <record id="crm_team_action_config" model="ir.actions.act_window">
  244. <field name="name">Sales Teams</field>
  245. <field name="res_model">crm.team</field>
  246. <field name="view_mode">tree,form</field>
  247. <field name="context">{}</field>
  248. <field name="help" type="html">
  249. <p class="o_view_nocontent_smiling_face">
  250. Create a Sales Team
  251. </p><p>
  252. Use Sales Teams to organize your sales departments and draw up reports.
  253. </p>
  254. </field>
  255. </record>
  256. </data>
  257. </odoo>