The present invention relates to an agricultural machine (1) to the harvesting of berries (b) of the stick on the vine stocks, said agricultural machine (1) comprises: - rocking means (5) in order to detach the window (b) with respect to said vine stocks, - at least one tank (6) of storage of said windows (b), - of the conveying means (7) in order to convey said windows (b) from said means of shakers (5), up to the storage bin (6), and - means (10) for spraying a liquid product for protection and / or of treatment (p) on the racks (b) have been detached, as well as the control means (11) for the control of said spray means (10).