跳至內容
選單
此問題已被標幟

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
7月 25
501
1
6月 25
621
1
6月 25
781
3
7月 25
871
1
6月 25
602