|
|
""" compute a qweb based preview to display on the wizard """
styles = self._get_asset_style()
for wizard in self:
if wizard.report_layout_id:
if wizard.env.context.get('bin_size'):
# guarantees that bin_size is always set to False,
# so the logo always contains the bin data instead of the binary size
wizard = wizard.with_context(bin_size=False)
wizard.preview = wizard.env['ir.ui.view']._render_template(
wizard._get_preview_template(),
wizard._get_render_information(styles),
)
else:
wizard.preview = False
|
|