Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Web

Entity: base.document.layout

Compute Method: _compute_preview

Inputs Method Outputs
""" compute a qweb based preview to display on the wizard """
styles = self._get_asset_style()
for wizard in self:
            if wizard.report_layout_id:
                wizard.preview = wizard.env['ir.ui.view']._render_template(
                    wizard._get_preview_template(),
                    wizard._get_render_information(styles),
                )
            else:
                wizard.preview = False

Back to entity