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
18 lines
588 B
# -*- coding: utf-8 -*-
|
|
# © 2016-2018 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import api, models
|
|
|
|
|
|
class Report(models.Model):
|
|
_inherit = "report"
|
|
|
|
@api.model
|
|
def _get_report_from_name(self, report_name):
|
|
res = super(Report, self)._get_report_from_name(report_name)
|
|
if not res:
|
|
res = self.env['ir.actions.report.xml'].search([
|
|
('report_type', '!=', False),
|
|
('report_name', '=', report_name)], limit=1)
|
|
return res
|