Hi, I was trying to do that when a Lead moves from stage to stage, an automation is established to create a project and open the view to edit a created project, I was trying to put this code but I get an error, can someone help me to solve it?
action = {
'type': 'ir.actions.act_window',
'res_model': 'project.project',
'view_mode': 'form',
'view_id': False, 'target': 'new',
'context': {'default_name': record.name}
}
return action
This is the error
SyntaxError: 'return' outside function at line 9