Sayyiduna Ali (may Allah be pleased with him) said: I asked: O Messenger of Allah, if a child is born to me after you, may I give him a name like your (peace and blessings be upon him) name and a kunyah like your (peace and blessings be upon him) kunyah? He (peace and blessings be upon him) replied in the affirmative. Abu Bakr (bin Abi Shaybah, one of the narrators) did not say "I asked"; rather, he said: Ali said to the Prophet (peace and blessings be upon him).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الضحايا / 19329
Muhammad Ibn al-Hanafiyyah (may Allah have mercy on him) said: This was a concession for Sayyiduna Ali (may Allah be pleased with him), when he said: "O Messenger of Allah (peace and blessings be upon him), if a child is born to me after you, may I give him a name like your (peace and blessings be upon him) name and a kunyah like your (peace and blessings be upon him) kunyah?" He (peace and blessings be upon him) replied in the affirmative.
It was also narrated through another, weak route from Muhammad Ibn al-Hanafiyyah, and there is disagreement over whether this hadith is connected (mawsul).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الضحايا / 19330
Sayyidah Aishah (may Allah be pleased with her) said: A woman came to the Prophet (peace and blessings be upon him) and said: "O Messenger of Allah, I have named my child Muhammad and given him the kunyah Abu al-Qasim, and I have been told that you (peace and blessings be upon him) dislike this." He (peace and blessings be upon him) said: "What is it that has made my name lawful and my kunyah unlawful?" or: "What is it that has made my kunyah unlawful and my name lawful?"
The hadiths prohibiting the kunyah Abu al-Qasim without qualification are more authentic and more numerous than this hadith of al-Hajabi, so the ruling goes with them rather than with it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الضحايا / 19331