Add pumpkin to a medium saucepan and cover with water. Place over high heat and bring to the boil. Reduce to a simmer and cook for 10 minutes until pumpkin has softened. Drain and mash with a fork.
Add butter, onion and garlic to a large frying pan on a low-medium heat. Cook for 10 minutes, until the onions have softened and are a golden brown colour.
Add spices and cook for a further minute, before adding the cannellini beans, mashed pumpkin, vinegar and stock. Bring to the boil, reduce heat to a simmer and cook covered for 10 minutes. Remove lid and cook for a further 5 minutes until it thickens a little.
Top the toasted sourdough with the bean mixture, avocado and sprinkle with Parmesan.