Skip to content

Commit

Permalink
[FIX] base_report_to_printer: 1030: The printer or class does not exist
Browse files Browse the repository at this point in the history
Before this commit a error 1030: The printer or class does not exist because cups tried to print using uri printer
now configuring cups.setServer and cups.setPort as recommended at
http://nagyak.eastron.hu/doc/system-config-printer-libs-1.2.4/pycups-1.9.51/html/cups.Connection-class.html

it's working well
  • Loading branch information
hugho-ad committed Oct 22, 2021
1 parent d450781 commit 29f6a27
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base_report_to_printer/models/printing_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def _open_connection(self, raise_on_error=False):
self.ensure_one()
connection = False
try:
cups.setServer(self.address)
cups.setPort(self.port)
connection = cups.Connection(host=self.address, port=self.port)
except Exception:
message = _(
Expand Down

0 comments on commit 29f6a27

Please sign in to comment.