Hadithcore
Mishkat al-Masabih, 3074

It is related in <i>munqati’</i> form on the authority of Ibn ‘Abbas that the Prophet (ﷺ) said, “No legacy is to be left to an heir unless the other heirs are agreeable.” This is the wording in <i>al-Masabih</i>, but in Daraqutni’s version he said, “A legacy to an heir is not allowable unless the other heirs are agreeable.”

وَيُرْوَى عَنِ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «لَا وَصِيَّةَ لِوَارِثٍ إِلَّا أَنْ يَشَاءَ الْوَرَثَةُ» مُنْقَطِعٌ هَذَا لَفْظُ الْمَصَابِيحِ. وَفِي رِوَايَةِ الدَّارَقُطْنِيِّ: قَالَ: «لَا تَجُوزُ وَصِيَّةٌ لِوَارِثٍ إِلَّا أَنْ يَشَاء الْوَرَثَة»

References1 variant
In-Book Reference
Book 12, Hadith 33