Skip to content
Snippets Groups Projects

Enhance substitution handling in ir.actions.report with value_type support

Merged oury.balde requested to merge topic/18.0/RED-593-FSB into branch/18.0
Files
3
@@ -112,14 +112,6 @@
filetype = rec.redner_filetype
rec.is_redner_native_format = fmt.get_format(filetype).native
def _get_template(self):
"""Get template for ir.actions.report."""
return self.redner_tmpl_id
def _get_substitutions(self):
"""Get substitutions for ir.actions.report."""
return self.substitution_ids
def get_report_metadata(self):
self.ensure_one()
@@ -224,3 +216,19 @@
attachment_vals["name"],
)
return buffer
# -------------------------------------------------------------------------
# MIXIN METHODS
# -------------------------------------------------------------------------
def _get_substitution_field(self):
"""Return the substitution field name for ir.actions.report."""
return "substitution_ids"
def _get_template(self):
"""Get template for ir.actions.report."""
return self.redner_tmpl_id
def _get_substitutions(self):
"""Get substitutions for ir.actions.report."""
return self.substitution_ids
Loading