Odoo Help

4

Seamlessly Print POS receipt without using PosBox

After researching for printing POS receipts for awhile, I've found a solution to print without using PosBox. I'm writing on here to my personnel reference and might helpful to whom encounter unsolved PosBox problems.

Why not PosBox?

First, I had tried using PosBoxless solution to print the receipts, following the official document. Somehow, the hardware proxy service always crashed after the client connected to Odoo9 server. I might do something wrong.
So that, I recently brought a PosBox and hoped it's going to work for sure. After testing, I found that it could print only a few receipts before the PosBox went offline, and Thai font won't come out. I just got to know PosBox does not support Thai and many languages.

Solution

Actually, POS web can print the receipt via browser, but it's not so convenient as the print preview dialog always popups which requires few more clicks to process printing. The following are how to get rid of those dialogs.
Prerequisite
1. In Windows, please install your ESC/POS printer driver and set the printer as the default printer. Non ESC/POS Printer will be fine too.
2. Set automatic print in Pos setting.
Note that I used EPSON TM-T88IV and Windows 10.

Chrome
There is a feature in Chrome called Kiosk mode which force the browser to run in full screen mode and automatically click the preview dialog.
To set Kiosk mode in Windows
1. Create a new Chrome shortcut
2. Open shortcut Properties (Right-click on the shortcut, select Properties)
3. At Target field, append option --kiosk --kiosk-printing http:// [enter store URL here]
the whole target field would be like this

     "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk --kiosk-printing http://localhost:8069

4. Test it. Use Alt+F4 to exit.


Firefox
It's also easy to bypass the print dialog. Please follow the step in https://www.websitesupport.info/hc/en-us/articles/205075144-Bypass-the-Print-Dialog-Box-in-Firefox.


Printing Result
Unlike PosBox which sends line command to the ESC/POS printer and let the printer render graphic itself, browser printing sends whole receipt as an image to ESC/POS printer, so that the print result depend on how the browser render the image and how good the ESC/POS printer handle image.
According to my test, PosBox yields the finest print result. Firefox give an good result but you have to change font style at

in \addons\point_of_sale\static\src\css\pos.css
@media print { ...
.pos .pos-sale-ticket{ ...
font-size: 16px !important;
         font-family: Tahoma, Geneva, sans-serif

For Chrome, It's result look a bit distorted no matter you change the font style. However, it's ok to read.

0
Rodney Carrilho
On 2/8/17, 5:01 PM

I don't get it. Is there no way to print to an IP-Printer directly through port 9100? I tried that and I get a lot of Weird stuff like:

OPTIONS /hw_proxy_print_xml_receipt?session_id=alongnumber HTTP1.1
Host: 12.34.56.78 (IP-Adres)
User-Agent: Mozzilla/5.0 (Windows NT 10.0;WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
And so on.

I use an Epsopn TM88VI attached to my network with an ethernet cable and not with USB. I can't find any documentation on a ip-attached printer for the POS. Anyone any tips?

0
Naing
On 2/2/17, 4:06 AM

Hi,

Any solutions for unsupported fonts to be able to print  via POS BOX?

We also had same issue. POS BOX doesn't support Myanmar fonts too.

But we need to print via POS BOX because we need multiple printings (to kitchen1,to kitchen 2, to drink counter,etc.. )

Any solutions for this issue,please? 

Using PosBox with other languages, Esc/pos printers require extra coding in Odoo's hw_escpos module. Not only understands programming, but the developer must also understands Myanmar to do this job. However, you have to make sure first that the printer itself supports Myanmar too.

Another solution is to fix point_of_sale's javascript to convert your printing content from text to image before sending to Posbox. This way can avoid language complexity and applicable to many languages.

นายมนต์ชัย พงศ์พฤฒฺิพันธ์
on 2/3/17, 7:54 AM
0
bob harris
On 1/12/17, 9:47 AM

Just out of interest, what printers is everyone using? I spotted some small format, portable options at www.able-systems.com and wondered if these would be suitable?

If you don't bother with very small ticket, it'll be fine.

นายมนต์ชัย พงศ์พฤฒฺิพันธ์
on 1/12/17, 10:41 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 10/3/16, 1:02 AM
Seen: 3176 times
Last updated: 4/27/17, 1:47 PM