The Back-up Plan (2010)
The Back-up Plan (previously known as Plan B) is a 2010 romantic comedy film, starring Jennifer Lopez and Alex O'Loughlin. It was released theatrically in the U.S. on April 23, 2010, and later in other regions. This was Tom Bosley's final film before his death in October 2010.
More at Wikipedia.