The strong U.S. dollar had an adverse effect on consumer products maker Colgate-Palmolive (CL) - Get Report , which missed analysts' second-quarter revenue estimates Thursday. But it would be a mistake to part with this winner on the basis of one quarter of disappointing sales.

Investors who are looking for a large-cap consumer-staples stock that pays a solid dividend yield can do well here. Despite the revenue miss, Colgate-Palmolive posted strong gross margin expansion, leading to beat on the bottom line.

With the company affirming its full-year outlook, this suggests the underlying fundamentals are solid and the stock should be bought on weakness. See the chart below, courtesy of TradingView.

Image placeholder title

The stock currently trades at around $73 per share and has risen about 10% year to date and almost 13% over the past year, compared with a 6% year-to-date rise in the S&P 500 (SPX) index and a 7% rise in the tracking Consumer Staples Select Sector SPDR (XLP) - Get Report  exchange-traded fund.

Despite the slight outperformance, Colgate stock is below its 20-day moving average of $73.95 (blue line) and appears heading towards support at $72.34 (green line) and near it 50-day average (pink line). This suggests investors are now selling on the news, thinking there is no other catalyst following the sharp post-Brexit 8% climb. This pullback creates a solid buying opportunity for investors who are looking out to the next two quarters.

Thanks to the 150 basis-point climb in adjusted operating margin, Colgate-Palmolive still achieved organic sales growth of 4.5%. Combined with diligent costs cuts, Colgate-Palmolive's gross margin rate rose 170 basis points. In other words, the company is still making money and creating shareholder value.

Plus, had it not been for 5.5 percentage-point impact of currency, which offset a three percentage-point gain in better pricing, the company would have beaten on revenue as well as earnings, something sellers likely missed and from which new investors should profit.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.