Have you tried crate training? It works, and the best part is no stains.  Even if they have an accident, you are right there and can clean it up right away.  We have white carpet and not a single stain, and not for lack of accidents!  (Credit goes to my Bissell Quicksteamer!)  You may be giving too much freedom, not rewarding enough, not being clear about where to potty, or at 7 months he may not have the bladder control yet?  We had out last accidents up until Loki was a year or so.  He would get up from a nap, walk toward the door and just pee.  He knew what to do, he simply couldn't hold it.  Now he is just fine.  If you are more specific, we can be more helpful