Yes, after Optmus and Megatron kill sentinel, Megatron asks for a truce or death, optimus denies killing him, but accepts a truce. Megatron calls off the invasion and takes the remaining decepticons to rebuild cybertron, while the autobots stay on Earth.
That would have been a great ending. I wonder why Ehren Kruger or Bay, which ever decides, didn't go with that?
Without some of the internal dialogue we get from Megatron in the novel, I honestly don't think it would have worked as well.