In a brand new environment when you do docker-compose up
you get cups-server
service automatically.
In an existing environment just do docker-compose up -d cups-server
.
If your project relies on CUPS and base_report_to_printer
then you should already have this.
In any case, make sure you have these requirements in place:
- install
cups
andlibcups2-dev
inodoo/Dockerfile
/odoo/external-src/report-print-send
in ADDONS_PATH[email protected]:OCA/report-print-send.git
checked out in the path above
Go to http://localhost:6631
and type credentials admin / secr3t
.
Then you have to configure a printer:
- Go to Administration -> Printers -> click on
Add printer
.. image:: ./images/cups_administration.png
- Select
CUPS-PDF
and continue
.. image:: ./images/cups_add_printer1.png
- Leave printer info as it is and make sure to enable
Share This Printer
.. image:: ./images/cups_add_printer2.png
- Select
generic
and continue
.. image:: ./images/cups_set_printer_type1.png
- Select
Generic CUPS-PDF Printer (en)
and continue
.. image:: ./images/cups_set_printer_type2.png
- Set default size to
A4
and click onSet Default Options
.. image:: ./images/cups_set_printer_options.png
Now you can go to Printers
and see your brand new printer.
The final step is to tell Odoo about your printer:
- Go to Settings -> Printers -> Create
- Give it a name and set server as
cups-server
, default port631
is ok - Save and click on
Update printers
-> your PDF printer should show up
.. image:: ./images/odoo_printer.png
Your are done now. Every printed document will land into /tmp/cups-pdf
folder.