Origin-Destination recommendation that recom-mends personalized origin city (O) and destination city (D) of flight itinerary is of great value for both Online Travel Platforms (OTPs) and users. Existing studies on next location recommendation propose to model the sequential regularity of users' check-in location sequences, but cannot well solve two new challenges facing OTPs, namely the necessity of exploring O&D and learning O&D as a whole. To this end, we propose a novel personalized Origin-Destination ranking NETwork (ODNET) for flight recommendation. In particular, a heterogeneous spatial graph (HSG) which models historical interactions between users and cities is designed at first. HSG is then deployed in ODNET to identify user preference Os and Ds by exploring the neighbor-hood information in HSG. To cope with the second challenge, the idea of multi-task learning is employed by ODNET to learn $O$ and $D$ jointly so as to capture their correlations. Moreover, temporal information of Os and Ds are also considered to further improve the accuracy of origin-destination recommendation. An offline experiment on multiple real-world datasets and an online A/B test both show the superiority of ODNET towards the state-of-the-art methods. Further, the implementation and deployment details of the proposed ODNET at Fliggy, one of the most popular OTPs in China, are also described. ODNET has now been successfully applied to provide high-quality flight recommendation service at Fliggy, serving tens of millions of users.