Yes, you need to file both OR and MT state returns.
This is how you do it.
1) Prepare Federal return
2) Prepare non-resident OR return -reporting only income earned in OR
3) prepare resident return (MT) reporting ALL income and then taking a credit for taxes paid to another state.