Al-Kāfi - Volume 7 > Another Chapter
Hadith #2

2- عَلِيُّ بْنُ إِبْرَاهِيمَ عَنْ أَبِيهِ عَنِ ابْنِ أَبِي عُمَيْرٍ عَنْ بَعْضِ أَصْحَابِهِ عَنْ أَبِي عَبْدِ اللهِ (عَلَيْهِ السَّلام) فِي رَجُلٍ كَاتَبَ مَمْلُوكَهُ وَاشْتَرَطَ عَلَيْهِ أَنَّ مِيرَاثَهُ لَهُ فَرُفِعَ ذَلِكَ إِلَى أَمِيرِ الْمُؤْمِنِينَ (عَلَيْهِ السَّلام) فَأَبْطَلَ شَرْطَهُ وَقَالَ شَرْطُ اللهِ قَبْلَ شَرْطِكَ.

2. Ali ibn Ibrahim has narrated from his father from ibn abu ‘Umayr from certain persons of his people who has narrated the following: “About the case of a man who made a contract with his slave and a condition that his legacy will be for him, which then was brought before ’Amir al-Mu’minin, ‘Alayhi al-Salam, who annulled his condition saying that the condition of Allah is before your (the master’s) condition.’”