123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <record model="ir.ui.view" id="crm_task_form">
- <field name="name">crm_task_form</field>
- <field name="model">crm.task</field>
- <field name="type">form</field>
- <field name="new">new</field>
- <field name="arch" type="xml">
- <form>
- <header class="oe_edit_only">
- <button name="createOpportunity" string="Convertir a Oportunidad" type="object" attrs="{'invisible':['|',('is_opportunity','!=', False),('opportunity_id','!=', False)]}"/>
- <field name="state" clickable="True" widget="statusbar"/>
- </header>
- <sheet>
- <group>
- <field name="task_type_id" widget="radio" required='True'/>
- </group>
- <group>
- <field name="name" required='True'/>
- <field name="date_action_next"/>
- <field name="date_last_state_update" invisible="1"/>
- <field name="opportunity_id"
- options='{"no_create": 1, "no_create_edit": 1}'/>
- <field name="partner_id" required='True'/>
- <field name="user_id" options='{"no_create": 1, "no_create_edit": 1}' required='True'/>
- <field name="description"/>
- <field name="is_opportunity" invisible='1'/>
- </group>
- </sheet>
- </form>
- </field>
- </record>
- <record id="task_filter" model="ir.ui.view">
- <field name="name">CRM - Opportunities Search</field>
- <field name="model">crm.task</field>
- <field name="arch" type="xml">
- <search string="Search Opportunities">
- <field name="partner_id" string="Cliente" filter_domain="[('partner_id','ilike',self)]"/>
- <field name="opportunity_id" string="Oportunidad"/>
- <field name="state" string="Estado"/>
- <field name="user_id" string="Responsable"/>
- <field string="Tipo de Tarea" name="task_type_id"/>
- </search>
- </field>
- </record>
- <record id="crm_task_calendar" model="ir.ui.view">
- <field name="name">Calendario de Tareas</field>
- <field name="model">crm.task</field>
- <field name="type">calendar</field>
- <field name="arch" type="xml">
- <calendar color="task_type_id" quick_add="false" date_start="date_action_next" date_stop="" string="Tareas" event_open_popup="%(crm_task_form)d">
- <field name="name"/>
- </calendar>
- </field>
- </record>
- <record model="ir.ui.view" id="crm_task_tree">
- <field name="name">crm_task_tree</field>
- <field name="model">crm.task</field>
- <field name="type">tree</field>
- <field name="arch" type="xml">
- <tree string="Oportunidades" clickable="True" colors="red:expired_date == True and state == 'pending';gray:state == 'cancel';green:state == 'pending'">
- <field name="task_type_id" options='{"no_open": True, "no_create": 1, "no_create_edit": 1}'/>
- <field name="create_date" string="Fecha de Creación"/>
- <field name="date_last_state_update" invisible="1"/>
- <field name="date_action_next"/>
- <field name="name"/>
- <field name="description"/>
- <field name="user_id"/>
- <field name="partner_id"/>
- <field name="state"/>
- <field name="expired_date" invisible="1"/>
- <button name="action_done" string="Realizado" type="object" icon="gtk-apply" attrs="{'invisible':[('state','=','done')]}"/>
- <button name="action_done" string="Pendiente" type="object" icon="gtk-undo" attrs="{'invisible':[('state','=','pending')]}"/>
- <button name="action_cancel" string="Cancelado" type="object" icon="gtk-cancel" attrs="{'invisible':[('state','=','cancel')]}"/>
- </tree>
- </field>
- </record>
- <record id="crm_task_from_partner" model="ir.actions.act_window">
- <field name="name">Tareas</field>
- <field name="res_model">crm.task</field>
- <field name="view_type">form</field>
- <field name="view_mode">calendar,tree,form</field>
- <field name="context">{"search_default_state":'pending', 'search_default_user_id': uid}</field>
- <field name="search_view_id" ref="task_filter"/>
- <field name="help" type="html">
- <p class="oe_view_nocontent_create">
- Click to create a new task.
- </p>
- </field>
- </record>
- <record model="ir.actions.act_window.view" id="action_crm_task_calendar">
- <field name="sequence" eval="1"/>
- <field name="view_mode">calendar</field>
- <field name="view_id" ref="crm_task_calendar"/>
- <field name="act_window_id" ref="crm_task_from_partner"/>
- </record>
- <record model="ir.actions.act_window.view" id="action_crm_tree_task">
- <field name="sequence" eval="2"/>
- <field name="view_mode">tree</field>
- <field name="view_id" ref="crm_task_tree"/>
- <field name="act_window_id" ref="crm_task_from_partner"/>
- </record>
- <!-- Tree Wizard view from kanban -->
- <record id="tree_wizard_filter" model="ir.ui.view">
- <field name="name">tree_wizard_filter</field>
- <field name="model">crm.task</field>
- <field name="arch" type="xml">
- <search string="Search Task">
- </search>
- </field>
- </record>
- <record id="action_tree_wizard" model="ir.actions.act_window">
- <field name="name">Tareas</field>
- <field name="res_model">crm.task</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree</field>
- <field name="target">new</field>
- <field name="search_view_id" ref="tree_wizard_filter"/>
- <field name="domain">[('opportunity_id', '=', active_id),('state','=','pending')]</field>
- </record>
- <!-- Form Wizard view with custom buttons -->
- <record model="ir.ui.view" id="crm_task_wizard">
- <field name="name">crm_task_wizard</field>
- <field name="model">crm.task</field>
- <field name="type">form</field>
- <field name="target">new</field>
- <field name="arch" type="xml">
- <form>
- <header class="oe_edit_only" >
- <button name="createOpportunity" string="Convertir a Oportunidad" type="object" attrs="{'invisible':['|',('is_opportunity','!=', False),('opportunity_id','!=', False)]}"/>
- <field name="state" clickable="True" widget="statusbar"/>
- </header>
- <sheet>
- <group>
- <field name="task_type_id" widget="radio" required='True'/>
- </group>
- <group>
- <field name="name" required='True'/>
- <field name="date_action_next"/>
- <field name="date_last_state_update" invisible="1"/>
- <field name="opportunity_id"
- options='{"no_create": 1, "no_create_edit": 1}'/>
- <field name="partner_id" required='True'/>
- <field name="user_id" required='True' options='{"no_create": 1, "no_create_edit": 1}'/>
- <field name="description"/>
- <field name="is_opportunity" invisible='1'/>
- </group>
- </sheet>
- <footer>
- <button name="write" string="Crear" type="object" class="oe_highlight"/> o
- <button string="Cancelar" class="oe_link" special="cancel"/>
- </footer>
- </form>
- </field>
- </record>
- </data>
- </openerp>
|