diff --git a/base_report_to_printer/report.py b/base_report_to_printer/report.py index 6815f2b..a33e3cb 100644 --- a/base_report_to_printer/report.py +++ b/base_report_to_printer/report.py @@ -50,9 +50,7 @@ class Report(models.Model): If you want to prevent `get_pdf` to send report you can set the `must_skip_send_to_printer` key to True in the context """ - if context is None: - context = self.pool['res.users'].context_get(cr, uid) - if context.get('must_skip_send_to_printer'): + if context is not None and context.get('must_skip_send_to_printer'): return False if behaviour['action'] == 'server' and printer and document: return True