diff --git a/base_report_to_printer/models/printing_server.py b/base_report_to_printer/models/printing_server.py
index 6ae2c6c14f3..ad1ef8c2827 100644
--- a/base_report_to_printer/models/printing_server.py
+++ b/base_report_to_printer/models/printing_server.py
@@ -36,6 +36,13 @@ def _open_connection(self, raise_on_error=False):
self.ensure_one()
connection = False
try:
+ # Sometimes connecting to printer servers outside of the local network
+ # can result in a weird error "cups.IPPError: (1030, 'The printer
+ # or class does not exist.')".
+ # An explicit call to `setServer` and `setPort` fixed the issue.
+ # (see https://github.com/OpenPrinting/pycups/issues/30)
+ cups.setServer(self.address)
+ cups.setPort(self.port)
connection = cups.Connection(host=self.address, port=self.port)
except Exception:
message = _(
diff --git a/base_report_to_printer/views/printing_printer.xml b/base_report_to_printer/views/printing_printer.xml
index 27e52107a49..379aedd0cbe 100644
--- a/base_report_to_printer/views/printing_printer.xml
+++ b/base_report_to_printer/views/printing_printer.xml
@@ -47,6 +47,7 @@
+
@@ -100,6 +101,7 @@
+