Narrated Ibn 'Umar: I saw the people buy foodstuff randomly (i.e. blindly without measuring it) in the life-time of Allah's Apostle and they were punished (by beating), if they tried to sell it before carrying it to their own houses.
— Sahih Bukhari, Volume 3, Book 34: Sales and Trade, Hadith #347
Narrated Ibn 'Umar: I saw the people buy foodstuff randomly (i.e. blindly without measuring it) in the life-time of Allah's Apostle and they were punished (by beating), if they tried to sell it before carrying it to their own houses.
This hadith is from the book of Sales and Trade in Sahih Bukhari, compiled by Imam al-Bukhari. It is hadith number 347 in book 34 of volume 3.
This hadith is referenced in the following topics: Business Ethics.