Preheat the grill, setting the burners to high. Oil the grate.
In a food processor, chop the mushrooms. Add the beans and purée until smooth. Transfer to a bowl. Add the remaining ingredients and mix to combine well. Season with salt and pepper.
Using your hands, form the bean mixture into 6 patties. Place them on a large, oiled plated.
Grill the patties on the barbecue for 3 minutes on each side, handling them carefully. Meanwhile, grill the portobello mushrooms for 5 minutes and the onions for 8 minutes or until they are tender-crisp. Grill the hamburger buns, if desired.
Spread the insides of the buns with chermoula. Place a patty on each bun bottom. Top with the grilled portobello mushrooms and onions. Close with the bun tops and serve.