Ali Baba Goes to Town is a 1937 film starring Eddie Cantor, Tony Martin, and Roland Young. Cantor plays a hobo named Aloysius Al Babson, who walks into the camp of a movie company that is making the Arabian Nights. He falls asleep and dreams he is in Baghdad as an advisor to the Sultan Young. He organizes work programs, taxes the rich, and abolishes the army, in a spoof of Roosevelts New Deal.
Source: Wikipedia