A man who assaulted his ex-partner has been handed a six month restraining order and put on probation for a year.