Language:
كتاب الحدود
86  
Limits and Punishments set by Allah (Hudood)
(42)
Chapter: What punishment may be inflicted on the person so that they may not commit the same sin again, or so that they may learn good manners
(42)
باب كَمِ التَّعْزِيرُ وَالأَدَبُ
Sahih al-Bukhari 6852

Narrated `Abdullah bin `Umar:

Those people who used to buy foodstuff at random (without weighing or measuring it) were beaten in the lifetime of Allah's Messenger (ﷺ) if they sold it at the very place where they had bought it, till they carried it to their dwelling places.

حَدَّثَنِي عَيَّاشُ بْنُ الْوَلِيدِ، حَدَّثَنَا عَبْدُ الأَعْلَى، حَدَّثَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ سَالِمٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، أَنَّهُمْ كَانُوا يُضْرَبُونَ عَلَى عَهْدِ رَسُولِ اللَّهِ صلى الله عليه وسلم إِذَا اشْتَرَوْا طَعَامًا جِزَافًا أَنْ يَبِيعُوهُ فِي مَكَانِهِمْ حَتَّى يُئْوُوهُ إِلَى رِحَالِهِمْ‏.‏
Reference : Sahih al-Bukhari 6852
In-book reference : Book 86, Hadith 74
USC-MSA web (English) reference : Vol. 8, Book 82, Hadith 835
  (deprecated numbering scheme)