First of all my apologies if this question is well known or obvious: this is not in my area of research.
Let $T(x)=\sum_{n=0}^\infty t_nx^n$, where $t_n$ is the number of partitions $\lambda$ of $n$ into $m$ parts where, if $(m-i)\times (m-i)$ is the size of the Durfee square of $\lambda$, then the partition on the right of this Durfee square has at most $m-i-1$ parts.
As usual denote by $(x)_j:=(1-x)(1-x^2)\cdots (1-x^j)$.
If I am not mistaken $$ T(x)= \sum_{i=0}^{m-1} \frac{(x)_{m-1} x^{(m-i)^2+i}} {(x)_{m-i-1}^2(x)_i}.$$ In fact, given a positive integer $N$, the coefficient of degree $N$ in $$\frac{(x)_{m-1}x^i}{(x)_{m-i-1}(x)_{i}}$$ is the number of partitions of $N$ into exactly $i$ parts each of size at most $m-i$ (and this accounts for the partition at the bottom of the Durfee square because we are counting partitions with exactly $m$ parts). Similarly, the coefficient of degree $N$ of $$\frac{1}{(x)_{m-i-1}}$$ is the number of partitions of $N$ into at most $m-i-1$ parts (and this accounts for the partition on the right of the Durfee square because we are requiring that this piece has at most $m-i-1$ parts).
Computational evidence shows that $$T=\sum_{i=1}^m\frac{(-1)^{i-1}x^{i(i-1)/2}}{(x)_{m-i}}$$$$T=x^m\sum_{i=1}^m\frac{(-1)^{i-1}x^{i(i-1)/2}}{(x)_{m-i}}$$ but I have no idea why this is true.