1df5fb19c4
Document generation module: templates with own text (structure reference and source stand documented per template, no licensed full text in the repo), fill fields resolved from hr data (company, employee, hr.version stand) plus wizard input, preview rendering and PDF/HTML attachment via the generic report layout. - templates: pilot set for the general-AT track formulated as own text after the KB muster structure (lb-bes-09, lb-bnd-55, lb-bnd-52/62, lb-end-35), legal status per template marked as draft - rendering via convert_inline_template_to_qweb + ir.qweb (t-out auto-escapes values) — deliberately not mail.render.mixin inline engine, whose expression whitelist blocks werte[...] placeholders for non-template-editors - wizard resolves hr.version by date_version at the reference date; PDF falls back to HTML attachment without wkhtmltopdf - security: ir.model.access (hr user read / manager write) + company rule; 8 tests, suite 236/236 green on a fresh -i database run
17 lines
627 B
Python
17 lines
627 B
Python
# Part of the odoo-at-payroll project. License: LGPL-3.
|
|
"""Generisches Druck-Template: nimmt das vom Wizard gerenderte
|
|
body-HTML entgegen und bettet es in die PDF-Seite ein."""
|
|
from markupsafe import Markup
|
|
from odoo import models
|
|
|
|
|
|
class ReportDokumentGenerisch(models.AbstractModel):
|
|
_name = 'report.l10n_at_payroll_dokumente.report_dokument_generisch'
|
|
_description = 'Dokument aus Vorlage (generisches Drucklayout)'
|
|
|
|
def _get_report_values(self, docids, data=None):
|
|
data = data or {}
|
|
return {
|
|
'titel': data.get('titel', ''),
|
|
'body': Markup(data.get('body', '')),
|
|
} |