Ir al contenido
Menú
Se marcó esta pregunta

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
Publicaciones relacionadas Respuestas Vistas Actividad
1
jul 25
466
1
jun 25
605
1
jun 25
749
3
jul 25
842
1
jun 25
584