Community mailing list archives

community@mail.odoo.com

Re: Odoo 8 - How to print report to a CUPS printer?

by
OpenERP Master
- 12/07/2014 00:02:00
I have done this many times to print reports directly to a printer without returning a PDF. Such use case would be printing a shipping label with the click of a button.

You can use lpr, a command that can be used to send a pdf/document to a printer in linux. You can call the command from Odoo using subprocess.

import subprocess
command = ["lpr", "-H", 'host.ip', '-P', 'printer share name']
subprocess.call(command)

We used the webkit report module to generate a pdf with wkthmltopdf.

On Sat, Dec 6, 2014 at 9:27 PM, Fred Lu (呂豐昌) <fred@e-ipro.com> wrote:
Hi,

I would like to print report to a dot matrix printer.
How to do that in Odoo 8 ?


-- 

Best Regards,

Fred Lu | 呂豐昌
--------------------------------------------------------------------
T: +886 3 657 9368 #110 | M: +886 936 180 686
IPRO 網際家  |  http://www.e-ipro.com
企業行動化 解決方案 | Enterprise Mobility Solutions
--------------------------------------------------------------------
企業行動力 - 任何時間、任何地點, 即時安全存取企業資訊, 立即採取行動

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe