Skip to content

Commit

Permalink
[FIX] base_report_to_printer: Migrate noupdate record
Browse files Browse the repository at this point in the history
In version 9.0.2.0.0, added in OCA#60, the cron was modified. However, since it is a noupdate=1 record, preinstalled instances started failing there.

This fixes it.

@Tecnativa TT18838
  • Loading branch information
Jairo Llopis committed Dec 23, 2019
1 parent 5307ceb commit ec100b5
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,13 @@ def migrate(cr, v):
'port': config.get('cups_port', 631),
'printer_ids': [(6, 0, env['printing.printer'].search([]).ids)],
})
# Update the noupdate=1 cron if modified fields weren't touched
cron = env.ref("base_report_to_printer.ir_cron_update_printers")
if (
cron.model == "printing.printer" and
cron.function == "update_printers_status"
):
cron.write({
"function": "action_update_jobs",
"model": "printing.server",
})

0 comments on commit ec100b5

Please sign in to comment.