I have create a custom field in the lead and want to copy to the Contact and Opportunity form.
i have try to Automation but still not work. please help to advise as am new to Odoo studio
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have create a custom field in the lead and want to copy to the Contact and Opportunity form.
i have try to Automation but still not work. please help to advise as am new to Odoo studio
Yes, you can copy the custom field value from the Lead (crm.lead) to the linked Contact (res.partner) automatically using Odoo’s Automated Actions without any external code.
Here’s exactly what you should do:
if record.partner_id:
record.partner_id.write({'x_custom_info': record.x_custom_info})
i hoe it is usefull
it work now, but why i can't find the custom field that i create in Lead show in Opportunity? i try to find it in Existing Field but can't find and if i create again it give other name.
Is i missing something?
No need to copy — Lead becomes Opportunity, so the field stays if present in both views.
Just ensure:
pythonCopyEditif record.partner_id:
record.partner_id.x_custom_field = record.x_custom_field
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Aug 25
|
127 | ||
|
0
Feb 25
|
1435 | ||
|
1
Jan 25
|
1973 | ||
|
2
Dec 24
|
1655 | ||
|
1
Nov 24
|
155 |
Go to settings>Technical>Database Structure>fields, filter on crm.lead model and search your custom filed name
Note down the field technical name, e.g. x_custom_field.
Add the field to Opportunity form view:
Go to Settings > Technical > User Interface > Views, search for crm.lead form views.
Find the one used by Opportunities. Usually, Odoo has two different views or one view with conditional groups for Lead vs Opportunity.
Edit that view to add your custom field (x_custom_field).