i want to update crm.lead field stage_id when mail.activity is updated.
i am trying to add Automated Action on mail.activity with On Update trigger and Execute Python Code, its not working, please correct where i am wrong.
the Python Code is:
for records in record:
# raise Warning('stage_id update here...')
new_leads = env['crm.lead'].write({
'stage_id':2
})
please help, how it should update current lead's stage_id?
regards