Split process method and group creation
process method of
Purchase are saving records once per sale or purchase. This is not very efficient (see #3516 (closed)).
Indeed by doing multiple loops we can save the invoices, the shipments and moves at once.
Also we could set the invoice and shipment state at once per state value.