This module allow to concatenate various types of PDF reports inside one PDF report file. In other words, you can get more than one reports inside one PDF report file.
Here is one of the standard way to generate PDF report in Odoo programmatically:
report_name = 'account.report_invoice' res_ids = [9, 11, 15] report = self.env['ir.actions.report']._get_report_from_name(report_name) return report._render_qweb_pdf(res_ids)[0]
And here is the way to generate concatenated PDF reports using this module:
from odoo.addons.concatenate_reports.models import concatenate_reports # Generate data for the primary/first report: report_name = 'account.report_invoice' res_ids = [9, 11, 15] report = self.env['ir.actions.report']._get_report_from_name(report_name) # Prepare appended reports: # (just one appended report) concatenate_reports.params = { 'ids': [3, 7], # ids of 'sale.order' records 'report_name': 'sale.report_saleorder' } # OR! # (several appended reports) concatenate_reports.params = [ { 'ids': [3, 7], # ids of 'sale.order' records 'report_name': 'sale.report_saleorder' }, { 'ids': [43, 18, 12], # ids of 'account.invoice' records 'report_name': 'account.report_invoice_with_payments' }, #... # (the number of appended reports is not limited) ] # Generate and return the primary/first report # (with appended reports inside the final PDF file): return report._render_qweb_pdf(res_ids)[0]
The name of output PDF file cannot be changed (it remains as for the primary/first report).
Support email: avs3.help@gmail.com
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module