The Frisco Kid (1979)
The Frisco Kid is a 1979 movie directed by Robert Aldrich. The movie is a Western comedy featuring Gene Wilder as Avram Belinski, a Polish rabbi who is traveling to San Francisco, and Harrison Ford as a bank robber who befriends him.
More at Wikipedia.