There are many methods that people try. No matter which method you use, YOU the owner need to be vigilent and consistent, even to the point of hiring babysitters for the dog.
I prefer the confinement method, where you purchase a dog carrier (protable kennel) just large enough that your pet will not be able to turn around.
When you are not home or are in between feedings. this becomes her home.. She only comes out when you take her for a walk to do her thing.
Shower her with praise and treates for the job well done and return her to the home without the kennel. After some freedom time, and good behavior, she gets put back in the kennel over night and taken for a walk in the morning;;;;she is free while you prepare for work, one more walk, and back in the kennel for the rest of the day.
There is no need to retrain her away from the kennel....You will be amazed that she will actuall put her self in the kennel from time to time. After she is trained, you can begin to leave the door open on the kennel, giving her freedome to access the kennel at will. She will learn to que you for the next job.
This link provides some additiona guidance for kennel training the puppy and the potty training. Both methods work well for the purpose of potty training.