Spanish grocery retailer Eroski has reached an agreement to sell seven hypermarkets to French grocer E.Leclerc.