Skip to content

PDF Auto-merging #1024

@jrgmcl

Description

@jrgmcl

Is it possible to change the output of report generation in report_py3o, specifically when generating multiple PDFs? We already have the py3o_multi_in_one field if we want to merge multiple PDFs into a single file, but if it is disabled, shouldn't we compress them as well instead?

def _merge_results(self, reports_path):
    self.ensure_one()
    filetype = self.ir_actions_report_id.py3o_filetype
    path_list = list(reports_path.values())
    if not reports_path:
        return False, False
    if len(reports_path) == 1:
        return path_list[0], filetype
    if filetype == formats.FORMAT_PDF:         # Merges the PDF regardless of what we set in `py3o_multi_in_one` field
        return self._merge_pdf(path_list), formats.FORMAT_PDF
    else:
        return self._zip_results(reports_path), "zip"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementstalePR/Issue without recent activity, it'll be soon closed automatically.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions