You can take a cow to a cubicle..
... the ground supplemented by a nylon rope about 20 in. above ground level. But wooden partitions at four foot centres do not marry very happily with most barns, which are liable to have H-section, heavy uprights at 15 ft. centres. So, despite added cost ...