mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
Do not write the printer status if it has not changed
Avoid unnecessary UPDATE every minute
This commit is contained in:
@@ -101,7 +101,9 @@ class PrintingPrinter(models.Model):
|
||||
:param cups_printer: dict of information returned by CUPS for the
|
||||
current printer
|
||||
"""
|
||||
self.ensure_one()
|
||||
vals = self._prepare_update_from_cups(cups_connection, cups_printer)
|
||||
if any(self[name] != value for name, value in vals.iteritems()):
|
||||
self.write(vals)
|
||||
|
||||
@api.multi
|
||||
|
||||
Reference in New Issue
Block a user