Reputation: 91
I have inherited an object from crm.lead and added some fields into it. its working fine but what I want that when I clicked on Create button to change lead to partner , those fields must be automatically copied from lead to customer. Remember I will also add those fields in customer as well. But unfortunately I yet could not able to find the exact location of where it is copying data from lead to partner. I tried to explore wizard of crm (crm_lead_to_partner) but I did not find any place. Kindly help me in this regards . Thanks
Upvotes: 0
Views: 454
Reputation: 446
take a look at how the crm_base_contact module does:
class crm_lead2partner(osv.osv_memory):
_inherit = 'crm.lead2partner'
def _create_partner(self, cr, uid, ids, context=None):
partner_ids = super(crm_lead2partner, self)._create_partner(cr, uid, ids, context)
[...do your stuff...]
return partner_ids
Upvotes: 1