No, drinking warm beer will not prevent the common cold.
There was at least one study conducted revealing that humulone, an chemical found in hops, could help to fight a cold. This study seems to be both biased and exaggerated, as it was conducted by a beer company and the concentration in beer is so low that getting a therapeutic dose would create more problems than it would solve. [ http://newsfeed.time.com/2012/12/10/got-a-cold-have-a-beer/Got a Cold? Have a Beer! ]
I imagine that the rumor was based on either the above misleading story or a similar one based on a historical view of beer through "rose colored glasses". This coupled with the commonly known (and scientifically supported) method of drinking hot fluids to treat cold symptoms creates a believable enough tale to increase sales. [ http://news.bbc.co.uk/2/hi/uk_news/wales/south_east/7771893Study finds hot drinks help colds.stm ]