Al-Kāfi - Volume 1 > Something said about a man and it is not in him but is found in his sons or grand sons than it is as if it is in him
Hadith #3

3ـ الْحُسَيْنُ بْنُ مُحَمَّدٍ عَنْ مُعَلَّى بْنِ مُحَمَّدٍ عَنِ الْوَشَّاءِ عَنْ أَحْمَدَ بْنِ عَائِذٍ عَنْ أَبِي خَدِيجَةَ قَالَ سَمِعْتُ أَبَا عَبْدِ الله (عَلَيْهِ السَّلام) يَقُولُ قَدْ يَقُومُ الرَّجُلُ بِعَدْلٍ أَوْ بِجَوْرٍ وَيُنْسَبُ إِلَيْهِ وَلَمْ يَكُنْ قَامَ بِهِ فَيَكُونُ ذَلِكَ ابْنَهُ أَوِ ابْنَ ابْنِهِ مِنْ بَعْدِهِ فَهُوَ هُوَ.

3. Al-Husayn ibn Muhammad has narrated from Mu‘alla ibn Muhammad from al-Washsha’ from Ahmad ibn ‘A’idh from abu Khadija who has said the following. “I heard abu ‘Abdallah (a.s.) say, ‘Sometimes a man is considered as practicing justice or acting unjustly and such acts are ascribed to him even if he may not have committed them but such acts are found in his sons or his grandsons after him then he will be it (the one who has in reality his practiced such acts).”