# Reproduce BoL render error import traceback env = env # noqa report = env.ref('fusion_plating_reports.action_report_fp_bol_portrait') print('report:', report.report_name, 'model:', report.model) dlv = env['fusion.plating.delivery'].search([], order='id desc', limit=1) print('rendering for:', dlv.name, 'id=', dlv.id, 'state=', dlv.state) try: pdf, _ = report.with_context(force_report_rendering=True )._render_qweb_pdf(report.report_name, [dlv.id]) print('OK pdf size:', len(pdf), 'bytes') except Exception: print('--- TRACEBACK ---') traceback.print_exc()