<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <!--
        'Mark as Lost' in action dropdown
    -->
    <record id="action_mark_as_lost" model="ir.actions.server">
        <field name="name">Mark as lost</field>
        <field name="model_id" ref="model_crm_lead"/>
        <field name="binding_model_id" ref="crm.model_crm_lead"/>
        <field name="binding_view_types">list</field>
        <field name="state">code</field>
        <field name="code">
if not 'opportunity' in records.mapped('type'):
    records.action_set_lost()
elif records:
    action_values = env.ref('crm.crm_lead_lost_action').sudo().read()[0]
    action_values.update({'context': env.context})
    action = action_values
        </field>
    </record>

    <record id="action_your_pipeline" model="ir.actions.server">
        <field name="name">Crm: My Pipeline</field>
        <field name="model_id" ref="crm.model_crm_team"/>
        <field name="state">code</field>
        <field name="groups_id"  eval="[(4, ref('base.group_user'))]"/>
        <field name="code">action = model.action_your_pipeline()</field>
    </record>

    <record id="action_opportunity_forecast" model="ir.actions.server">
        <field name="name">Crm: Forecast</field>
        <field name="model_id" ref="crm.model_crm_team"/>
        <field name="state">code</field>
        <field name="groups_id"  eval="[(4, ref('base.group_user'))]"/>
        <field name="code">action = model.action_opportunity_forecast()</field>
    </record>

</odoo>
