UPDATED: Exactly a week after its upfront presentation, CBS has picked up another comedy series for midseason, the single-camera Bad Teacher starring Ari Graynor, which has received a 13-episode order. Sony Pictures TV produced the pilot, an adaptation of the 2011 movie, which will now be a co-production with CBS TV Studios. Bad Teacher was among a slew of half-hour pilots that CBS were brass were high on this season. It screened and tested well and, despite not making the cut before the upfronts, CBS Logotalks between CBS and Sony continued through and after upfront week until a deal was reached. Bad Teacher  brings the number of new CBS comedy series on tap for next season to a whooping six, the most in almost two decades. (Last season the network picked up a total of two, only one of which, Partners, got on the air.) CBS’ 2013-14 comedy class is split evenly between multi-camera (fall entries Mom and The Millers and midseason’s Friends With Better Lives) and single-cam (fall’s The Crazy Ones and We Are Men, plus Bad Teacher).

Related: CBS New Series Previews – Video

The pickup brings the number of new Sony broadcast series for next season to eight, a record for the independent studio. It was able to land new shows on every network (The Michael J. Fox Show, The Blacklist, Welcome To The Family and After Hours at NBC, Rake and Us And Them on Fox, The Goldbergs on ABC and Bad Teacher on CBS). Sony was able to get The Blacklist, Welcome To The Family and After Hours picked up and Community renewed for a final season in a complex, hard-fought negotiation with NBC that went down to the wire and resulted in Sony getting all shows involved picked up and securing NBC’s best launching pad, the post-Voice Monday 10 PM slot, for Blacklist. Leveraging the red-hot Blacklist, which had tested through the roof, I hear Sony held firm, indicating it was ready to leave rather than take a bad deal. Meanwhile, I hear NBC got ownership in Blacklist, which could make hundreds of millions of dollars profit in success, and is paying license fee vs. full freight on Community.

The only major setback for the studio came at CBS where frontrunner Beverly Hills Cop did not get a series order. Reasons for the surprising pass vary, depending who you talk to, but the pilot, written by Shawn Ryan and directed by Barry Sonnenfeld, is being shopped to other networks. In fact, most of Sony’s broadcast pilots are still in play. CBS is considering retooling comedies The McCarthys and Jim Gaffigan, NBC too is taking another look at comedy Brenda Forever. And I hear ABC drama pilot Doubt, David Shore’s follow-up to House, is eying an international broadcaster. Additionally, Sony TV is in negotiations with USA about picking up cult ABC comedy Happy Endings.

Written by Hilary Winston, Bad Teacher stars Graynor as an always inappropriate, fearless and unapologetic former trophy wife who masquerades as a teacher in order to find a new man after her wealthy husband leaves her penniless. The film’s writers, Lee Eisenberg and Gene Stupnitsky, executive produce with Winston, Sam Hansen, Jimmy Miller and Michael Lasker for Sony, CBS Studios and Mosaic Media Group. Co-starring on the series are The Talk co-host Sara Gilbert, who will juggle the talk show and the series; David Alan Grier; Ryan Hansen; Sara Rodier; and Kristin Davis. This marks the third series order for Eisenberg and Stupnitsky, who serve as exec producers/showrunners on ABC’s Trophy Wife and HBO’s Hello Ladies.

Related: Eisenberg & Stupnitsky Sign New Overall Deal With ABC Studios