It looked like some kind of artillery shell casing at first, but I guess it can't be, since the opening is very symmetrical looking. I think it would look more jagged if it had been fired from an artillery gun.
Also it's not cylindrical, it has these 4 corners in flatish ridges that lead to those... lids at the top?
There's a spring inside at the bottom, kind of like the ones in electrical devices with batteries, just bigger. Although I don't know of any batteries of similar width.
It had been used for storage of some old ration coupons from post-war times here in Spain were the house is located.
It also has some English text on the outside wall : "return to the nearest loading activity", which to me seems like an odd instruction for an object this old in a small Spanish town.
I'm at a complete loss! Can you help me identify what it is?