OCA reporting engine fork for dev and update.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
588 B

  1. # -*- coding: utf-8 -*-
  2. # © 2016-2018 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. from odoo import api, models
  5. class Report(models.Model):
  6. _inherit = "report"
  7. @api.model
  8. def _get_report_from_name(self, report_name):
  9. res = super(Report, self)._get_report_from_name(report_name)
  10. if not res:
  11. res = self.env['ir.actions.report.xml'].search([
  12. ('report_type', '!=', False),
  13. ('report_name', '=', report_name)], limit=1)
  14. return res