It has the same meaning of the expression"have your cake and eat it too", that is, when there's a tradeoff you cannot have both the goods.
In this case you have three parts:
botte piena = barrel full [of wine]
moglie ubriaca = drunk wife
uva sulla vigna = grapes on the vine, the grapes used to make the wine
The third part is hardly present, and you have "avere la moglie piena e la botte ubriaca".
There are some regional variations, for example in Ferrara there's
An s'pol brisa aver galina, ov e cul cald.
Non si possono avere gallina, uovo e culo caldo
You can't have chicken, egg and warm ass (where warm ass means to not have to work)