Skip to Content
Menu
This question has been flagged
2 Replies
1743 Views

We are offering the same lead to various customers. In order to avoid double setup and maintenance of opportunities I want to add more than one partner to a lead.

Also additional stakeholders  like vendors etc.

I did find information that there is a button "add partner" in the lead itself, anyhow I cannot find this in Odoo 16.


Thanks a lot for your help

Avatar
Discard
Best Answer

Hello findeisen.ext@climaline-gmbh.com,


Please find below code it may help you to resolve this issue,

Please find code in comment. 

I hope this will help you.

Thanks & Regards,
Email: odoo@aktivsoftware.com     

Skype: kalpeshmaheshwari

Avatar
Discard

Please find code here :-
from odoo import models, fields

class CrmLead(models.Model):
_inherit = 'crm.lead'

partner_ids = fields.Many2many('res.partner', string='Partners')
xml:
<record id="view_crm_lead_form_inherit" model="ir.ui.view">
<field name="name">crm.lead.form.inherit</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_leads"/>
<field name="arch" type="xml">
<field name="partner_ids" widget="many2many_tags"/>
</field>
</record>

Best Answer

Hi,

By default it is possible to set only One customer for a lead, if you need to add multiple partners/customers, you may have to customize and make it possible.

If you have studio, you can add many2many field and record the details.

Thanks

Avatar
Discard