Al-Mughirah bin Hadhaf al-Absi heard a man from Hamdan ask Sayyiduna Ali (may Allah be pleased with him) about a man who had bought a cow to sacrifice, and it then gave birth. Sayyiduna Ali (may Allah be pleased with him) said: Do not drink its milk except the surplus (that is, what is left over after the calf); and when the day of sacrifice comes, slaughter the cow and its calf on behalf of seven people.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 10210