|
@@ -0,0 +1,183 @@
|
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
+<openerp>
|
|
|
+ <data>
|
|
|
+ <record model="ir.ui.view" id="crm_case_form_view_oppor2">
|
|
|
+ <field name="name">crm_case_form_view_oppor2</field>
|
|
|
+ <field name="model">crm.lead</field>
|
|
|
+ <field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <form string="Opportunities" position="replace">
|
|
|
+ <form string="Opportunities">
|
|
|
+ <header>
|
|
|
+ <button name="case_mark_won" string="Mark Won" type="object" class="oe_highlight"/>
|
|
|
+ <button name="case_mark_lost" string="Mark Lost" type="object" class="oe_highlight"/>
|
|
|
+ <field name="stage_id" widget="statusbar" clickable="True"
|
|
|
+ options="{'fold_field': 'fold'}"
|
|
|
+ domain="['&', ('section_ids', '=', section_id), '|', ('type', '=', type), ('type', '=', 'opportunity')]" />
|
|
|
+ </header>
|
|
|
+ <sheet>
|
|
|
+ <div class="oe_right oe_button_box">
|
|
|
+ <button name="open_wizard" type="object" string="Añadir Actividad"
|
|
|
+ class="oe_inline oe_stat_button" icon="fa-calendar"/>
|
|
|
+ </div>
|
|
|
+ <div class="oe_title">
|
|
|
+ <label for="name" class="oe_edit_only"/>
|
|
|
+ <h1><field name="name"/></h1>
|
|
|
+ <label for="planned_revenue" class="oe_edit_only"/>
|
|
|
+ <h2>
|
|
|
+ <field name="company_currency" invisible="1"/>
|
|
|
+ <field name="planned_revenue" class="oe_inline" widget='monetary' options="{'currency_field': 'company_currency'}"/>
|
|
|
+ <span class="oe_grey"> at </span>
|
|
|
+ <field name="probability" class="oe_inline" widget="integer"/>%%
|
|
|
+ </h2>
|
|
|
+ </div>
|
|
|
+ <group>
|
|
|
+ <group>
|
|
|
+ <field name="partner_id"
|
|
|
+ on_change="on_change_partner_id(partner_id)"
|
|
|
+ string="Customer"
|
|
|
+ context="{'default_name': partner_name,
|
|
|
+ 'default_email': email_from,
|
|
|
+ 'default_phone': phone,
|
|
|
+ 'default_facebook': facebook,
|
|
|
+ 'default_instagram': instagram
|
|
|
+ }"/>
|
|
|
+ <field name="contact_name" string="Nombre de Contacto"/>
|
|
|
+ <field name="partner_name" string="Company Name"/>
|
|
|
+ <field name="email_from" string="Email" widget="email"/>
|
|
|
+ <field name="phone"/>
|
|
|
+ <field name="facebook" widget="url"/>
|
|
|
+ <field name="instagram" widget="url"/>
|
|
|
+ </group>
|
|
|
+ <group name="new_group">
|
|
|
+ <field name="date_deadline"/>
|
|
|
+ <field name="priority" widget="priority"/>
|
|
|
+ </group>
|
|
|
+ <group>
|
|
|
+ <field name="user_id" string="Vendedor" 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']}"/>
|
|
|
+ <label for="section_id" groups="base.group_multi_salesteams"/>
|
|
|
+ <div groups="base.group_multi_salesteams">
|
|
|
+ <field name="section_id" widget="selection"/>
|
|
|
+ <button name="case_escalate" string="Escalate" type="object" class="oe_link"
|
|
|
+ attrs="{'invisible': ['|', ('section_id','=',False), ('probability', '=', 100)]}"/>
|
|
|
+ </div>
|
|
|
+ </group>
|
|
|
+ <group>
|
|
|
+ <field name="categ_ids"
|
|
|
+ widget="many2many_tags"
|
|
|
+ context="{'object_name': 'crm.lead'}"
|
|
|
+ domain="[('object_id.model', '=', 'crm.lead')]"/>
|
|
|
+ <field name="source_id" options='{"no_open": True,"no_create": 1, "no_create_edit": 1}'/>
|
|
|
+ </group>
|
|
|
+ </group>
|
|
|
+ <notebook colspan="4">
|
|
|
+ <page string="Internal Notes">
|
|
|
+ <field name="description"/>
|
|
|
+ </page>
|
|
|
+ <page string="Historial de Tareas">
|
|
|
+ <field name="task_ids" widget="one2many_list">
|
|
|
+ <tree create="false" colors="red:expired_date == True and state == 'pending';gray:state == 'cancel';green:state == 'pending'">
|
|
|
+ <field name="task_type_id"/>
|
|
|
+ <field name="name"/>
|
|
|
+ <field name="user_id" required="True"/>
|
|
|
+ <field name="date_action_next"/>
|
|
|
+ <field name="state"/>
|
|
|
+ <field name="expired_date" invisible='1'/>
|
|
|
+
|
|
|
+ <button name="action_done" string="Done" type="object" icon="gtk-apply" help="Done" attrs="{'invisible':[('state','!=','pending'),('state','!=','cancel')]}"/>
|
|
|
+ <button name="action_done" string="Pending" type="object" icon="gtk-undo" help="Pending" attrs="{'invisible':[('state','!=','done')]}"/>
|
|
|
+ <button name="action_cancel" string="Cancel" type="object" icon="gtk-cancel" help="Cancel" attrs="{'invisible':[('state','=','cancel')]}"/>
|
|
|
+ <field name="description"/>
|
|
|
+ </tree>
|
|
|
+ </field>
|
|
|
+ </page>
|
|
|
+ <page string="Extra Info">
|
|
|
+ <group string="Mailings" name="mailings">
|
|
|
+ <field name="opt_out"/>
|
|
|
+ <field name="message_bounce"/>
|
|
|
+ </group>
|
|
|
+ </page>
|
|
|
+ </notebook>
|
|
|
+ </sheet>
|
|
|
+ <div class="oe_chatter">
|
|
|
+ <field name="message_follower_ids" widget="mail_followers"/>
|
|
|
+ <field name="message_ids" widget="mail_thread"/>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </form>
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+ <record id="crm_task_kanban" model="ir.ui.view">
|
|
|
+ <field name="name">crm_task_kanban</field>
|
|
|
+ <field name="model">crm.lead</field>
|
|
|
+ <field name="inherit_id" ref="crm.crm_case_kanban_view_leads"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <templates position="replace">
|
|
|
+ <templates>
|
|
|
+ <field name="exist_task"/>
|
|
|
+ <field name="expired_date"/>
|
|
|
+ <t t-name="kanban-box">
|
|
|
+ <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
|
|
|
+ <div class="oe_dropdown_toggle oe_dropdown_kanban">
|
|
|
+ <span class="oe_e">í</span>
|
|
|
+ <ul class="oe_dropdown_menu">
|
|
|
+ <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
|
|
|
+ <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
|
|
|
+ <li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send Email</a></li>
|
|
|
+ <li><a type="object" name="open_wizard">Añadir Tarea</a></li>
|
|
|
+ <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="oe_kanban_content">
|
|
|
+ <div>
|
|
|
+ <b><field name="name"/></b>
|
|
|
+ <t t-if="record.planned_revenue.raw_value">
|
|
|
+ - <b><t t-esc="record.planned_revenue.value"/>
|
|
|
+ <field name="company_currency"/></b>
|
|
|
+ </t>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <field name="partner_id"/>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="oe_kanban_bottom_right">
|
|
|
+ <t t-if="record.exist_task.raw_value">
|
|
|
+ <a type="action" name="%(eiru_crm.action_tree_wizard)d">
|
|
|
+ <img src="/eiru_crm/static/images/green_button.png" style="width:18px; height:18px;"/>
|
|
|
+ </a>
|
|
|
+ </t>
|
|
|
+ <t t-if="record.expired_date.raw_value">
|
|
|
+ <a type="action" name="%(eiru_crm.action_tree_wizard)d">
|
|
|
+ <img src="/eiru_crm/static/images/red_button.png" style="width:18px; height:18px;"/>
|
|
|
+ </a>
|
|
|
+ </t>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="oe_kanban_bottom_left">
|
|
|
+ <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"/>
|
|
|
+ <div class="pull-left" groups="base.group_user">
|
|
|
+ <field name="priority" widget="priority"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="oe_kanban_footer_left">
|
|
|
+ <t t-raw="record.message_summary.raw_value"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="oe_clear"></div>
|
|
|
+ </div>
|
|
|
+ </t>
|
|
|
+ </templates>
|
|
|
+ </templates>
|
|
|
+
|
|
|
+ <!-- <xpath expr="//div[@class='pull-left']" position="before">
|
|
|
+ <button name="_exist_task" type="object" icon="gtk-apply" help="Done" />
|
|
|
+ <button name="_exist_task" type="object" icon="gtk-undo" help="Pending"/>
|
|
|
+ </xpath> -->
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </data>
|
|
|
+</openerp>
|