The 26-year-old rejected a new deal at the Saddlers earlier this week and will sign a three-year contract at the DW Stadium on July 1, subject to a medical.
O’Donnell, who was Walsall’s player of the year after keeping 21 clean sheets, becomes Gary Caldwell’s second signing of the week following Blackpool’s David Perkins.
Caldwell told the club’s official website: “I’m delighted Richard has agreed to join us.
“He was definitely one of the best keepers in League One last season; his clean sheet record speaks for itself.
“There were a number of clubs chasing his signature and we had to move quickly to get him because we had identified him as a potential target.
“He’s at a good age and fits in with the profile of ambitious players we are looking for and he will be a quality addition to the squad.”