Umrah narrates that in the time of the Messenger of Allah ﷺ, a man bought the dates of a garden. He took care of them until he suffered a loss, so he asked the owner of the garden to give him a concession, but the owner swore that he would not give any concession. Then the buyer went to the Messenger of Allah ﷺ and related the matter to him. The Messenger of Allah ﷺ said: "Did he swear an oath not to do a good deed?" When the owner of the garden heard this, he came to the Messenger of Allah ﷺ and said: "O Messenger of Allah! It is for him." (i.e., I have given the concession.)
Hadith Referenceمسند الإمام الشافعي / كتاب البيوع / 1428
Hadith Takhrijاخرجه مسلم ، المساقاة، باب استحباب الوضع من الدين (1557)۔