|
@@ -5,29 +5,28 @@
|
|
|
<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>
|
|
|
- <field name="state" clickable="True" widget="statusbar"/>
|
|
|
+ <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"/>
|
|
|
+ <field name="name" required='True'/>
|
|
|
<field name="date_action_next"/>
|
|
|
- <field name="user_id"/>
|
|
|
- <field name="partner_id"/>
|
|
|
- <field name="opportunity_id"/>
|
|
|
+ <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>
|
|
|
- <!-- <footer>
|
|
|
-
|
|
|
- <button name="write" string="Crear" type="object" class="oe_highlight"/> or
|
|
|
- <button type="cancel" string="Cancelar" class="oe_form_button_cancel"/>
|
|
|
- </footer> -->
|
|
|
</form>
|
|
|
</field>
|
|
|
</record>
|
|
@@ -60,9 +59,8 @@
|
|
|
<field name="model">crm.task</field>
|
|
|
<field name="type">calendar</field>
|
|
|
<field name="arch" type="xml">
|
|
|
- <calendar color="task_type_id" date_start="date_action_next" date_stop="" string="Tareas" event_open_popup="%(crm_task_form)s" >
|
|
|
+ <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"/>
|
|
|
- <field name="hex_value"/>
|
|
|
</calendar>
|
|
|
</field>
|
|
|
</record>
|
|
@@ -72,17 +70,18 @@
|
|
|
<field name="model">crm.task</field>
|
|
|
<field name="type">tree</field>
|
|
|
<field name="arch" type="xml">
|
|
|
- <tree string="Oportunidades" colors="red:expired_date == True and state == 'pending';gray:state == 'cancel';green:state == 'pending'">
|
|
|
- <field name="task_type_id"/>
|
|
|
+ <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="date_action_next"/>
|
|
|
+ <field name="name"/>
|
|
|
<field name="description"/>
|
|
|
<field name="user_id"/>
|
|
|
- <field name="partner_id" />
|
|
|
+ <field name="partner_id"/>
|
|
|
<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')]}"/>
|
|
|
+ <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>
|
|
@@ -137,5 +136,41 @@
|
|
|
<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="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>
|