In this paper, we extend the Topological Quantum Field Theory developed by González-Prieto, Logares and Muñoz for computing virtual classes of representation varieties of closed orientable surfaces in the Grothendieck ring of varieties to the setting of the character stacks.To this aim, we define a suitable Grothendieck ring of representable stacks, over which this Topological Quantum Field Theory is defined. We apply this theory to the case of the affine linear group of rank 1, providing an explicit expression for the virtual class of the character stack of closed orientable surfaces of arbitrary genus. This virtual class remembers the natural adjoint action, and in particular from this we can derive the virtual class of the character variety.For this reason, the algebraic structure of the character variety χ G (Σ g ) has been deeply studied. For instance, when G is a complex group, the character variety itself is a complex algebraic variety so its cohomology is naturally endowed with a mixed Hodge structure. In this way, a natural question is to compute the E-polynomialwhich encodes the information of the Hodge numbers h k;p,q c (χ G (Σ g )) = dim C H k;p,q c (χ G (Σ g )) on the compactly supported cohomology of χ G (Σ g ). Three main approaches coexist in the literature to this aim: the so-called arithmetic, the geometric and quantum methods.