Heat the oil in a pan ready to shallow fry. Rub the onions in the flour to coat them, then add in batches to the hot oil – it should sizzle as they go in – and cook for 3-4 minutes until golden and crisp.
Set aside on a plate lined with kitchen paper.
Cook the lentils according to the pack instructions for a couple of minutes less than the time stated (they should still be firm), then drain, drizzle with a little olive oil and set aside.
Heat 2 tbsp oil in a frying pan, then add the cumin and coriander seeds. Cook, stirring, over a medium heat, until the spices become fragrant, then add the turmeric and cinnamon and cook for another 2 minutes.
Add the rice and sugar, stirring to coat it in the spices, season well with salt and pepper, then add the lentils and 700ml water. Bring to a simmer, turn the heat down and bubble gently for 15 minutes or until the rice is tender.