As you can see it all depends on who you talk to. The paint guys will tell you have it painted first (and let the upholster worry about not damaging the new paint) and the upholster will want it first (and let the painter worry about overspray, door jambs etc). Of couse the mechanic will tell you he needs to do the drivetrain before it goes to either the painter or upholster.

Most high quality jobs have the paint done before anything else (including glass) is installed.