Skip to Content
Menu
This question has been flagged
1 Reply
1408 Views

Hello, I'm having troubles to configure correctly the following automated action:

When a Sales Order is created, I want that an Opportunity is created based on the information from the Sales Order. Required information like the Opportunity name and Type (Lead or Opportunity) is already working. The missing information is the customer. This is what i got:


Customer (crm.lead)        Python expression        record.partner_id.company_name


with this i do not get an error message when trying to create a Sales Order but on the Opportunity, the "Customer" field stays empty. I tried several other expressions but I get error messages.


Does anyone know how to solve that?


Thank you

Avatar
Discard
Best Answer

Hi,

Set the python expression as :  

record.partner_id.id


Thanks

Avatar
Discard
Author

thank you, works fine