This is a movie about gold being shipped, in a strong box, in a wagon. There is also a jail wagon and I think it was for women prisoners. There is an ambush and the strong box with the gold is taken. The gold was not in the strong box though. The gold is what the bars of the jail wagon were made of and painted over. So the gold was in fact not stolen after all.
At the end of the movie one guy asks the other guy why he is not upset about the gold having been stolen and he goes over to the wagon and scrapes the paint off one of the bars to reveal that it is made of gold.
What is the name of this spaghetti western?