Sahih Muslim Book 10, Hadith Number 3702.

Chapter : Pertaining to one who sells date-palm tree with dates hanging on Its branches.

Ibn Umar (Allah be pleased with them) reported Allah’s Apostle (may peace be upon him) as saying: Whosoever grafts the tree and then sells its roots, its fruit will belong to one who grafts it except when provision is laid down by the buyer.