[IMP] base_report_to_printer: archive printers

This commit is contained in:
Jaime Arroyo
2020-10-06 17:32:01 +02:00
committed by David Montull
parent 06aa650d99
commit 2e6de7e605
28 changed files with 47 additions and 5 deletions

View File

@@ -31,6 +31,7 @@ class PrintingPrinter(models.Model):
_order = "name"
name = fields.Char(required=True, index=True)
active = fields.Boolean(default=True)
server_id = fields.Many2one(
comodel_name="printing.server",
string="Server",

View File

@@ -61,7 +61,7 @@ class PrintingServer(models.Model):
servers = self.search(domain)
res = True
for server in servers:
for server in servers.with_context(active_test=False):
connection = server._open_connection(raise_on_error=raise_on_error)
if not connection:
server.printer_ids.write({"status": "server-error"})