A spraying system for an agricultural machine, comprises a spray ramp, a control unit and a liquid circuit itself comprising: - a pump comprising an inlet and an outlet, the pump being designed to suck a liquid through the inlet and to discharge the sucked liquid through the outlet, - discharge paths (14a-14g) each connected, upstream, to the outlet of the pump through a discharge valve (18a-18g) designed to open and close said discharge path (14a-14g), at least one of the discharge paths (14a-14g), called a main discharge path, comprising spray nozzles mounted to the spray ramp and designed to spray liquid onto plants of a field to be treated, the other discharge path(s) (14b-14g), called secondary discharge path(s), being devoid of spray nozzles mounted to the spray ramp, - a regulation valve, the regulation valve being connected, upstream, to the outlet of the pump and, downstream, to the inlet of the pump, the regulation valve being further designed to selectively regulate, as a function of said open discharge path(s) (14a-14g), a liquid flow rate in the open discharge path(s) (14a-14g) to a predetermined regulation flow rate, or a liquid pressure in the open discharge path(s) (14a-14g) to a first predetermined regulating pressure, the spraying system being characterised in that the control unit is designed to command the regulation valve to flow-regulate the open discharge path(s) (14a-14g), when at least one of the open discharge path(s) (14a-14g) is predetermined as being to be flow-regulated, and to pressure-regulate the open discharge path(s) (14a-14g) when none of the open discharge path(s) (14a-14g) is predetermined as being to be flow-regulated. - a pump comprising an inlet and an outlet, the pump being designed to suck a liquid through the inlet and to discharge the sucked liquid through the outlet, - discharge paths (14a-14g) each connected, upstream, to the outlet of the pump through a discharge valve (18a-18g) designed to open and close said discharge path (14a-14g), at least one of the discharge paths (14a-14g), called a main discharge path, comprising spray nozzles mounted to the spray ramp and designed to spray liquid onto plants of a field to be treated, the other discharge path(s) (14b-14g), called secondary discharge path(s), being devoid of spray nozzles mounted to the spray ramp, - a regulation valve, the regulation valve being connected, upstream, to the outlet of the pump and, downstream, to the inlet of the pump, the regulation valve being further designed to selectively regulate, as a function of said open discharge path(s) (14a-14g), a liquid flow rate in the open discharge path(s) (14a-14g) to a predetermined regulation flow rate, or a liquid pressure in the open discharge path(s) (14a-14g) to a first predetermined regulating pressure, the spraying system being characterised in that the control unit is designed to command the regulation valve to flow-regulate the open discharge path(s) (14a-14g), when at least one of the open discharge path(s) (14a-14g) is predetermined as being to be flow-regulated, and to pressure-regulate the open discharge path(s) (14a-14g) when none of the open discharge path(s) (14a-14g) is predetermined as being to be flow-regulated.