Skip to Content
Menú
This question has been flagged

I have a server action that I want opened in a new tab.

<record id="action_groupby_lead_analysis_wizard" model="ir.actions.server">

        <field name="name">Analyze Opportunities</field>

        <field name="model_id" ref="crm.model_crm_lead"/>

        <field name="binding_model_id" ref="crm.model_crm_lead"/>

        <field name="binding_type">action</field>

        <field name="state">code</field>

        <field name="code">

lead_ids = env.context.get('active_ids', [])

action = {

    'type': 'ir.actions.act_window',

    'res_model': 'groupby.lead.analysis.wizard',

    'view_mode': 'form',

    'target': 'new',

    'context': {'default_lead_ids': lead_ids,}

}

        </field>

    </record>

groupby.lead.analysis.wizard is a transient model

(The action need not be a server action. It just should be able to take selected lead_ids from the list view.)


Odoo v18 Community Edition

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de jul. 25
447
1
de juny 25
585
1
de juny 25
740
3
de jul. 25
817
1
de juny 25
566