Connect a printer¶
Việc cài đặt máy in có thể được thực hiện chỉ trong vài bước đơn giản. Máy in có thể được sử dụng để in hóa đơn, nhãn, đơn hàng hoặc thậm chí là các báo cáo từ những ứng dụng khác nhau trong Odoo. Ngoài ra, tác vụ máy in cũng có thể được gán như một hành động theo kích hoạt trong quá trình sản xuất, hoặc được thêm vào một điểm kiểm soát chất lượng hay một bước kiểm tra chất lượng.
Cảnh báo
The only way to connect a printer directly to an Odoo database is through the use of an IoT system. Without an IoT system, printing can still occur, but it is managed through the printer itself, which is not the recommended process.
Kết nối¶
IoT systems support printers connected through USB, network connection, or Bluetooth. Supported printers are detected automatically, and appear in the Devices list of the IoT app.

Ghi chú
Printers can take up to two minutes to appear in the IoT app Devices list.
Link a printer¶
Link work orders to a printer¶
Work orders can be linked to printers, via a quality control point, to print labels for manufactured products.
In the Quality app, a device can be set up on a quality control point. To do so, go to the , and open the desired control point.
Quan trọng
A manufacturing operation and work order operation need to be attached to a quality control point before the Type field allows for the Print Label option to be selected.
From here, edit the control point by selecting the Type field, and selecting Print Label from the dropdown menu of options. Doing so reveals the Device field, where the attached device can be selected.
The printer can now be used with the selected quality control point. When the quality control point is reached during the manufacturing process, the database presents the option to print labels for a specific product.
Mẹo
Quality control points can also be accessed by navigating to Quality Control Points tab to add them to the device.
, then selecting the device. Go to theGhi chú
On a quality check form, the Type of check can also be set to Print Label.
Xem thêm
Link reports to a printer¶
It is possible to link report types to a specific printer. To do so:
Go to
and select the desired printer.Go to the Printer Reports tab and click Add a line.
In the pop-up that opens, select the types of reports to be linked to the printer and click Select.

Mẹo
Reports can also be configured by enabling the developer mode and going to . Select the desired report from the list and set an IoT Device.
The first time a linked report is selected to print, a Select Printers pop-up window appears. Tick the checkbox next to the correct printer for the report, and click Print. At that point, the report is linked to the printer.
Clear device printer cache¶
Sau khi một máy in được liên kết để in một báo cáo, cài đặt này sẽ được lưu trong bộ nhớ cache của trình duyệt. Điều này có nghĩa là người dùng có thể có các thiết bị khác nhau được lưu trong bộ nhớ cache của họ cho các báo cáo khác nhau, dựa trên thiết bị mà họ sử dụng để truy cập Odoo. Nó cũng có nghĩa là những người dùng khác nhau có thể in tự động một báo cáo từ các máy in khác nhau, dựa trên sở thích của họ.
To unlink a report from a printer, navigate to Unlink button next to each report to remove the link.
. This generates a list of reports that are linked to a printer on the current device. Click theQuan trọng
This step only prevents the report from automatically printing to the listed printer from the current browser. The report is still linked on the device, under the Printer Reports tab.

Xem thêm
Potential issues¶
The printer is not detected¶
If a printer does not appear in the devices list, go to the IoT box's or Windows virtual IoT's homepage, click Show in the Devices section, and make sure the printer is listed.
If the printer does not appear on the IoT system's homepage, click Printer Server, then Administration, and Add Printer. If the printer is not in the list, it is likely not connected properly.
The printer outputs random text¶
For most printers, the correct driver should be automatically detected and selected. However, in some cases, the automatic detection mechanism might not be enough, and if no driver is found, the printer might print random characters.
The solution is to manually select the corresponding driver. On the IoT system's homepage, click Printer Server, then Printers, and select the printer in the list. In the Administration dropdown menu, click Modify Printer. Follow the steps and select the printer's make and model.

Ghi chú
Epson receipt printers and Zebra label printers do not need a driver to work. Make sure that no driver is selected for those printers.
The printer is detected but is not recognized correctly¶
If Odoo and the IoT system do not recognize the printer correctly, go to Subtype field to the appropriate option: Receipt Printer, Label Printer, or Office Printer.
, click the device's card to access its form, and set theEpson configuration special case¶
Most Epson printers support printing receipts in Odoo Point of Sale using the GS v 0
command.
However, the following Epson printer models do not support this command:
TM-U220
TM-U230
TM-P60
TMP-P60II
To bypass this issue, you can configure the printer to use the ESC *
command.
First, review Epson's website for compatibility for both the GS v 0 and ESC * commands.
If the printer is incompatible with GS v 0
but supports ESC *
, configure the IoT system to use
the ESC *
command as follows:
Access the IoT box's or Windows virtual IoT's homepage.
Click the Printer server button, then click Administration on the CUPS page.
Click Add Printer in the Printers section, select the printer, and click Continue.
Mẹo
If the printer's name is still uncertain, take the following steps:
Take note of the listed printers on the CUPS page.
Turn the printer off and refresh the page.
Compare the difference with the first list to see which printer disappeared.
Turn the printer back on and refresh the page again.
Double-check the list again to see if the printer re-appears.
The printer that disappeared and reappears again on the listed printers is the name of the printer in question. It can be Unknown under Local printers.
On the Add Printer page, specify the printer's Name using the following convention:
<printer_name>__IMC_<param_1>_<param_2>_..._<param_n>__
, where:printer_name
is the printer's name. It can contain any character except_
,/
,#
, or ` ` (space character).IMC
: This stands for Image Mode Column (the simplified name forESC *
).param_1
: This stands for the specific parameter:SCALE<X>
: Scale of the picture (with the same aspect ratio).X
should be an integer describing the scale percentage that should be used. For example,100
is the original size,50
is half the size, and200
is twice the size.LDV
: Low Density Vertical (will be set to High Density Vertical if not specified).LDH
: Low Density Horizontal (will be set to High Density Horizontal if not specified).
Ghi chú
Density parameters might need to be configured in a particular way, depending on the printer model.
Refer to Epson's ESC * documentation to determine if the printer requires these parameters to be set.
Example
The following are examples of proper and improper name formatting:
Proper name formatting:
EPSONTMm30II__IMC__
EPSON_TM_U220__IMC_LDV_LDH_SCALE80__
Improper name formatting (this will not prevent printing, but the result might not have the expected printed output):
EPSON TMm 30II
: The name cannot contain spaces.EPSONTMm30II
: The name itself is correct, but it will not useESC *
.EPSONTMm30II__IMC
: This name is missing the end__
.EPSONTMm30II__IMC_XDV__
: The parameterXDV
does not match any existing parameters.EPSONTMm30II__IMC_SCALE__
: The parameterSCALE
is missing the scale value.
Once the printer's name has been defined using the appropriate naming convention, click Continue.
Set the Make value to Raw and the Model value to Raw Queue (en).
Click Add Printer. If everything was done correctly, the page should redirect to the Banners page.
Wait a few minutes for the IoT system to detect the printer and sync to Odoo's server.
Access the POS settings and select your POS, or click the vertical ellipsis button (⋮) on a POS card and click Edit. Scroll down to the Connected Devices section, enable IoT Box, and select the printer in the Receipt Printer field. Click Save.
Ghi chú
If the printer was set up incorrectly (e.g., it continues to print random text, or the printed receipt is too large or too small), it cannot be modified via the printer's name in CUPS. Instead, configure a new printer from scratch with modified parameters, following the steps above.
The following is an example of the troubleshooting process for a TM-U220B printer model using the
ESC *
command. The receipt pictured below is an example of a receipt that is printing correctly
due to proper formatting (in theory):

Printing this receipt immediately without proper formatting will not work, as the TM-U220B
printer model does not support the GS v 0
command. Instead, random characters will be printed:

To properly configure formatting for the Epson TM-U220B printer model, follow these steps:
After checking Epson's website for compatibility with both the GS v 0 and ESC * commands, the TM-U220B printer is indeed incompatible with
GS v 0
but supportsESC *
.When adding the printer, CUPS displays the list of available printers:
Trong trường hợp này, máy in được kết nối qua USB, vì vậy nó không phải là một phần của Máy in mạng được phát hiện. Thay vào đó, nó có thể là một phần của lựa chọn Không xác định trong Máy in cục bộ. Khi rút cáp USB của máy in khỏi hệ thống IoT và làm mới trang, máy in Không xác định sẽ biến mất. Khi cắm lại cáp USB, máy in sẽ xuất hiện trở lại.
For the naming convention, since the printer must print using the
ESC *
command, it is imperative to add__IMC
.For this particular model (TM-U220)
m
should be equal to 0 or 1. While referencing the Description table on Epson's ESC * website, them
values could be 0, 1, 32, or 33. So, in this case, them
value cannot be 32 or 33 (otherwise, random characters will be printed).Bảng bao gồm các giá trị số 32 và 33; cả hai xuất hiện nếu Số bit cho dữ liệu dọc được đặt là 24, tức là có Mật độ dọc cao. Khi cấu hình máy in Epson TM-U220, cần buộc sử dụng Mật độ dọc thấp vì mẫu máy in này không hỗ trợ Mật độ dọc cao cho lệnh
ESC *
.To add a Low Vertical Density, add the
LDV
parameter to the naming convention.Click Continue to proceed. Next, set the Make value to Raw and the Model value to Raw Queue (en).
However, when trying to print with the naming convention
EpsonTMU220B__IMC_LDV__
, the receipt is printed, but it is too large and outside the margin. To resolve this, add a new printer (and naming convention) with theSCALE<X>
parameter to adapt to the receipt's size.Here are some examples:
Printer Naming Convention
EpsonTMU220B__IMC_LDV__
EpsonTMU220B__IMC_LDV_SCALE75__
EpsonTMU220B__IMC_LDV_LDH__
EpsonTMU220B__IMC_LDV_LDH_SCALE35__
DYMO LabelWriter print issue¶
The DYMO LabelWriter has a known issue in printing with IoT systems. The OpenPrinting CUPS server installs the printer using Local RAW Printer drivers. In order to print anything, the correct Make and Model needs to be set to reference the correct driver when using the device.
Additionally, a new printer needs to be added to reduce the print delay that occurs after updating the driver.
Quan trọng
Máy in DYMO LabelWriter 450 DUO là máy in DYMO được khuyến nghị sử dụng với Odoo và các hệ thống IoT. Thiết bị này kết hợp hai loại máy in: một máy in nhãn và một máy in băng. Khi cấu hình các quy trình sau, cần đảm bảo chọn đúng mẫu máy (DYMO LabelWriter 450 DUO Label (en) hoặc DYMO LabelWriter 450 DUO Tape (en)). Để đảm bảo tính nhất quán, các quy trình sau đây hướng dẫn các bước cấu hình cho mẫu DYMO LabelWriter 450 DUO Label (en). Điều chỉnh lựa chọn mẫu máy theo nhu cầu.
DYMO LabelWriter not printing¶
If the DYMO LabelWriter fails to print, install a new driver:
Access the IoT system's homepage and click
to open the OpenPrinting CUPS console.Click
in the top menu, then click the printer in the list.Select Maintenance in the first dropdown menu.
Select Modify Printer in the second dropdown menu.
Select the specific network connection/printer on which the modification should be made and click Continue.
On the next page, click Continue, then select DYMO from the Make dropdown list.
Click on Continue and set the Model to DYMO LabelWriter 450 DUO Label (en) (or whichever DYMO printer model is being used).
Click Modify Printer to set the new driver; a confirmation page appears.
Click DYMO LabelWriter 450 DUO Label (or whichever DYMO printer model is being used).
in the top menu; all printers installed on the OpenPrinting CUPS server appear, including the newly updatedClick the newly updated printer, then click the Maintenance dropdown menu and select Print Test Page to print a test label. The test label is printed after a few seconds if the driver update was successful.
To reduce this delay, add a new printer using the steps below.
DYMO LabelWriter print delay¶
Mẹo
If the DYMO LabelWriter 450 DUO printer is not printing at all, or is not recognized (i.e., it has a RAW driver type), then update the drivers on the device.
To resolve the delay issue after modifying the driver, reinstall the printer:
Access the IoT system's homepage and click
to open the OpenPrinting CUPS console.Click Add a Printer.
in the top menu, then clickOn the next page, in the Local Printers section, select DYMO LabelWriter 450 DUO Label (DYMO LabelWriter 450 DUO Label) (or whichever DYMO printer model is being used) pre-installed printer. Click Continue.
On the following screen, update the Name to something easily identifiable, as the original printer will remain in the list. Then, click Continue.
Set the Model field to DYMO LabelWriter 450 DUO Label (en) (or whichever DYMO printer model is being used), then click Add Printer to complete the installation.
Click DYMO LabelWriter 450 DUO Label (or whichever DYMO printer model is being used) from in the list.
in the top menu and click the newly installed printerClick the Maintenance dropdown list and select Print Test Page to print a test label. The test label should print out immediately, or after one or two seconds.
The Zebra printer does not print anything¶
Máy in Zebra khá nhạy cảm với định dạng mã Ngôn ngữ lập trình Zebra (ZPL). Nếu không in được gì hoặc in ra nhãn trống, hãy thử thay đổi định dạng báo cáo gửi đến máy in. Để thực hiện, kích hoạt chế độ lập trình viên, truy cập , và tìm kiếm mẫu tương ứng.
Barcode scanner issues¶
The characters read by the barcode scanner do not match the barcode¶
By default, most barcode scanners are configured in the US QWERTY format. If the barcode scanner uses a different layout, go to Keyboard Layout field.
and click the barcode device's card. Then, select the correct language in theGhi chú
The Keyboard Layout is language-specific, with available options varying based on the device and the language of the database (e.g., English (UK), English (US), etc.).
Nothing happens when a barcode is scanned¶
Make sure the correct device is selected in the Point of Sale settings (when applicable) and the barcode is
configured to send an ENTER
character (keycode 28) at the end of every barcode.
The barcode scanner is detected as a keyboard¶
Quan trọng
Some barcode scanners are identified as USB keyboards rather than barcode scanners and are not recognized by IoT systems.
To change the device type manually, go to Is scanner.
and click the barcode device's card. Then, enableThe barcode scanner processes barcode characters individually¶
Khi truy cập phiên bản di động của Odoo từ thiết bị di động hoặc máy tính bảng được ghép nối với máy quét mã vạch thông qua hệ thống IoT, máy quét có thể hiểu mỗi ký tự trong mã vạch là một lần quét riêng biệt. Để khắc phục, hãy truy cập Bố cục bàn phím.
và nhấp vào thẻ thiết bị mã vạch. Sau đó, chọn ngôn ngữ chính xác trong trườngGhi chú
The Keyboard Layout is language-specific, with available options varying based on the device and the language of the database (e.g., English (UK), English (US), etc.).