eiru_crm_view.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="crm_case_form_view_oppor2">
  5. <field name="name">crm_case_form_view_oppor2</field>
  6. <field name="model">crm.lead</field>
  7. <field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
  8. <field name="arch" type="xml">
  9. <form string="Opportunities" position="replace">
  10. <form string="Opportunities">
  11. <header>
  12. <button name="case_mark_won" string="Mark Won" attrs="{'invisible': [('probability', '=', 100)]}" type="object" class="oe_highlight"/>
  13. <button name="case_mark_lost" string="Mark Lost" attrs="{'invisible': [('probability', '=', 100)]}" type="object" class="oe_highlight"/>
  14. <button string="Convert to Quotation" name="534" type="action" class="oe_highlight"/>
  15. <field name="stage_id" widget="statusbar" clickable="True"
  16. options="{'fold_field': 'fold'}"
  17. domain="['&amp;', ('section_ids', '=', section_id), ('type2', '=', 'opportunity')]"/>
  18. </header>
  19. <sheet>
  20. <div class="oe_right oe_button_box">
  21. <button name="open_wizard" type="object" string="Añadir Tarea"
  22. class="oe_inline oe_stat_button" icon="fa-calendar"/>
  23. </div>
  24. <div class="oe_title">
  25. <label for="name" class="oe_edit_only"/>
  26. <h1><field name="name"/></h1>
  27. <label for="planned_revenue" class="oe_edit_only"/>
  28. <h2>
  29. <field name="company_currency" invisible="1"/>
  30. <field name="planned_revenue" class="oe_inline" widget='monetary' options="{'currency_field': 'company_currency'}"/>
  31. <span class="oe_grey"> at </span>
  32. <field name="probability" class="oe_inline" widget="integer"/>%%
  33. </h2>
  34. </div>
  35. <group>
  36. <group>
  37. <field name="partner_id"
  38. required='True'
  39. on_change="on_change_partner_id(partner_id)"
  40. string="Customer"
  41. context="{'default_name': partner_name,
  42. 'default_email': email_from,
  43. 'default_mobile': mobile,
  44. 'default_facebook': facebook,
  45. 'default_instagram': instagram
  46. }"/>
  47. <field name="partner_name" string="Company Name" invisible="1"/>
  48. <field name="email_from" string="Email" widget="email"/>
  49. <field name="mobile"/>
  50. <field name="phone"/>
  51. <field name="facebook" widget="url" />
  52. <field name="instagram" widget="url"/>
  53. </group>
  54. <group name="new_group">
  55. <field name="date_deadline"/>
  56. <field name="priority" widget="priority"/>
  57. </group>
  58. <group>
  59. <field name="user_id" string="Responsable" on_change="on_change_user(user_id, context)" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
  60. <label for="section_id" groups="base.group_multi_salesteams"/>
  61. <div groups="base.group_multi_salesteams">
  62. <field name="section_id" widget="selection"/>
  63. <button name="case_escalate" string="Escalate" type="object" class="oe_link"
  64. attrs="{'invisible': ['|', ('section_id','=',False), ('probability', '=', 100)]}"/>
  65. </div>
  66. </group>
  67. <group>
  68. <field name="categ_ids"
  69. widget="many2many_tags"
  70. context="{'object_name': 'crm.lead'}"
  71. domain="[('object_id.model', '=', 'crm.lead')]"/>
  72. </group>
  73. </group>
  74. <notebook colspan="4">
  75. <page string="Internal Notes">
  76. <field name="description"/>
  77. </page>
  78. <page string="Historial de Tareas">
  79. <field name="task_ids" widget="many2one_clickable">
  80. <tree create="false" colors="red:expired_date == True and state == 'pending';gray:state == 'cancel';green:state == 'pending'">
  81. <field name="task_type_id"/>
  82. <field name="name"/>
  83. <field name="user_id" required="True"/>
  84. <field name="date_action_next"/>
  85. <field name="state"/>
  86. <field name="expired_date" invisible="1"/>
  87. <field name="description"/>
  88. <button name="action_done" string="Realizado" type="object" icon="gtk-apply" attrs="{'invisible':[('state','=','done')]}"/>
  89. <button name="action_done" string="Pendiente" type="object" icon="gtk-undo" attrs="{'invisible':[('state','=','pending')]}"/>
  90. <button name="action_cancel" string="Cancelado" type="object" icon="gtk-cancel" attrs="{'invisible':[('state','=','cancel')]}"/>
  91. </tree>
  92. </field>
  93. </page>
  94. <page string="Extra Info">
  95. <group string="Mailings" name="mailings">
  96. <field name="opt_out"/>
  97. <field name="message_bounce"/>
  98. </group>
  99. </page>
  100. </notebook>
  101. </sheet>
  102. <div class="oe_chatter">
  103. <field name="message_follower_ids" widget="mail_followers"/>
  104. <field name="message_ids" widget="mail_thread"/>
  105. </div>
  106. </form>
  107. </form>
  108. </field>
  109. </record>
  110. <record id="crm_task_kanban" model="ir.ui.view">
  111. <field name="name">crm_task_kanban</field>
  112. <field name="model">crm.lead</field>
  113. <field name="inherit_id" ref="crm.crm_case_kanban_view_leads"/>
  114. <field name="arch" type="xml">
  115. <templates position="replace">
  116. <templates>
  117. <field name="exist_task"/>
  118. <field name="expired_date"/>
  119. <t t-name="kanban-box">
  120. <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
  121. <div class="oe_dropdown_toggle oe_dropdown_kanban">
  122. <span class="oe_e">í</span>
  123. <ul class="oe_dropdown_menu">
  124. <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
  125. <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
  126. <li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send Email</a></li>
  127. <li><a type="object" name="open_wizard">Añadir Tarea</a></li>
  128. <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
  129. </ul>
  130. </div>
  131. <div class="oe_kanban_content">
  132. <div>
  133. <b><field name="name"/></b>
  134. <t t-if="record.planned_revenue.raw_value">
  135. - <b><t t-esc="record.planned_revenue.value"/>
  136. <field name="company_currency"/></b>
  137. </t>
  138. </div>
  139. <div>
  140. <field name="partner_id"/>
  141. </div>
  142. <div class="oe_kanban_bottom_right">
  143. <t t-if="record.exist_task.raw_value">
  144. <a type="action" name="%(eiru_crm.action_tree_wizard)d">
  145. <img src="/eiru_crm/static/images/green_button.png" style="width:18px; height:18px;"/>
  146. </a>
  147. </t>
  148. <t t-if="record.expired_date.raw_value">
  149. <a type="action" name="%(eiru_crm.action_tree_wizard)d">
  150. <img src="/eiru_crm/static/images/red_button.png" style="width:18px; height:18px;"/>
  151. </a>
  152. </t>
  153. </div>
  154. <div class="oe_kanban_bottom_left">
  155. <img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-left"/>
  156. <div class="pull-left" groups="base.group_user">
  157. <field name="priority" widget="priority"/>
  158. </div>
  159. </div>
  160. <div class="oe_kanban_footer_left">
  161. <t t-raw="record.message_summary.raw_value"/>
  162. </div>
  163. </div>
  164. <div class="oe_clear"></div>
  165. </div>
  166. </t>
  167. </templates>
  168. </templates>
  169. </field>
  170. </record>
  171. <record model="ir.ui.view" id="inherit_opportunity_tree_view">
  172. <field name="name">Opportunities Tree</field>
  173. <field name="model">crm.lead</field>
  174. <field name="inherit_id" ref="crm.crm_case_tree_view_oppor"/>
  175. <field name="arch" type="xml">
  176. <field name="country_id" position="replace">
  177. <field name="country_id" invisible="1"/>
  178. </field>
  179. <field name="date_action" position="replace">
  180. <field name="date_action" invisible="1"/>
  181. </field>
  182. <field name="title_action" position="replace">
  183. <field name="title_action" invisible="1"/>
  184. </field>
  185. </field>
  186. </record>
  187. </data>
  188. </openerp>