From d0ff6df2f43bb51ad62d145046bf73949d1dc17e Mon Sep 17 00:00:00 2001 From: Nicolas Bustillos Date: Thu, 30 Oct 2014 18:34:48 -0400 Subject: [PATCH] [FIX] doc: fit code example to new API When using this code as is, the 'ids' variable throws an exception for not being defined. In the new API, 'ids' is no longer given as a function variable but as a variable within 'self'. close #3406 --- doc/reference/reports.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/reference/reports.rst b/doc/reference/reports.rst index 78211ff4e49..7dfbfb1c8c7 100644 --- a/doc/reference/reports.rst +++ b/doc/reference/reports.rst @@ -65,9 +65,9 @@ render_html method. Classically, this method returns a call to the original report_obj = self.env['report'] report = report_obj._get_report_from_name('<>') docargs = { - 'doc_ids': ids, + 'doc_ids': self._ids, 'doc_model': report.model, - 'docs': self.env[report.model].browse(ids), + 'docs': self, } return report_obj.render('<>', docargs)