Hi Ana.Blanco ,
Yes, you need write this code on detail_cnt.htmpl, for example before <PDM_MACRO name=dtlEndTable>:
<PDM_IF "$args.id" == "0">
</script>
<input type=HIDDEN name="STAY_EDIT" value="1">
<script>
</PDM_IF>
<PDM_MACRO name=dtlEndTable>
When you create a new contact and save it will be saved and stay in edit mode. Second time that you click on save it will be saved.
I tested this on SDM 17.1.
Regards,
Carlos