summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authormreficent <miquel.raich@eficent.com>2019-10-29 15:49:06 +0000
committerfw-bot <otis@odoo.com>2019-10-30 19:46:15 +0000
commitd9945494be884e0708578999708ad4993aa2ffbd (patch)
tree584baa41a328c5a53e70883a8cbde29c3fa77606 /doc/reference
parent12f69f94656a65f5e45bbd2f14d6b595fd9db1c3 (diff)
[DOC] render_html -> _get_report_values
closes odoo/odoo#39616 X-original-commit: 9beebf2b54959727407f3959e26cd1ee874c3307 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/reports.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/reference/reports.rst b/doc/reference/reports.rst
index 907b400162c..efed6b4e761 100644
--- a/doc/reference/reports.rst
+++ b/doc/reference/reports.rst
@@ -284,7 +284,7 @@ named :samp:`report.{module.report_name}`. If it exists, it will use it to
call the QWeb engine; otherwise a generic function will be used. If you wish
to customize your reports by including more things in the template (like
records of others models, for example), you can define this model, overwrite
-the function ``render_html`` and pass objects in the ``docargs`` dictionary:
+the function ``_get_report_values`` and pass objects in the ``docargs`` dictionary:
.. code-block:: python
@@ -292,16 +292,17 @@ the function ``render_html`` and pass objects in the ``docargs`` dictionary:
class ParticularReport(models.AbstractModel):
_name = 'report.module.report_name'
+
@api.model
- def render_html(self, docids, data=None):
- report_obj = self.env['report']
+ def _get_report_values(self, docids, data=None):
+ report_obj = self.env['ir.actions.report']
report = report_obj._get_report_from_name('module.report_name')
docargs = {
'doc_ids': docids,
'doc_model': report.model,
'docs': self,
}
- return report_obj.render('module.report_name', docargs)
+ return docargs
.. _reference/reports/custom_fonts: