I have this object (not grouped) :
This is what I want (after selecting a 'fill' color):
But I always get this:
How can this be achieved?
You need to cut off the inner objects from the outer object, i.e. to make a difference
(Path → Difference) of the outer object and inner objects, then you will fill only what you want.
To reach it:
Done. Now you may fill it.
You started with 4 shapes, each with a single path. Select them all and combine into a single shape with 4 sub-paths.
You want the interior sub-paths to create holes in the shape. If the holes are closed, use the node tool to select all the sub-path nodes then reverse the path direction.