Hello,
How to create an activity in CRM module v 15; when a lead still more than 3 days at 'New' stage, and assign this activity for both: the salesperson and sales team leader using Python code with an automated action?
env['mail.activity'].create({
'display_name': 'text',
'summary': '3 Days!',
'date_deadline': datetime.datetime.now(),
'user_id': record.user_id.id,
'res_id': record.id,
'res_model_id': self.env['ir.model'].search([('model', '=', 'crm.lead')]).id,
'activity_type_id': 4
})