The 1D barcode and specification text on the package of retail products contain rich information, such as date of manufacture and source of product. Acquiring this information quickly and accurately can improve the efficiency of unmanned retail system. However, traditional OCR methods are sensitive to text orientations. Based on the fact that 1D barcodes are usually aligned with text, this paper proposes a joint barcode and text orientation detection method. Our approach first determines the four vertices of arbitrarily aligned 1D barcode by a CNN-based barcode localization network. Then, a post processing module calculates the angle of alignment of text with the help of it. Experiments on combined public and self-collected dataset verify that our approach can localize barcode regions accurately and enhance the robustness for OCR in unmanned retail systems.