Fixed bug -> removed raise exception when no xml id found.

--HG--
branch : odoo8
This commit is contained in:
Szeka Wong
2016-02-09 10:16:57 +01:00
parent 7c6388566d
commit 4f2776c2d3
3 changed files with 6 additions and 8 deletions

View File

@@ -124,14 +124,11 @@ class Py3oParser(report_sxw):
)
xml_id = None
if not model_data_ids:
raise exceptions.MissingError(
_(u"Report %s not found" % report_xml)
if model_data_ids:
model_data = pool['ir.model.data'].browse(
cr, uid, model_data_ids[0], context=context
)
model_data = pool['ir.model.data'].browse(
cr, uid, model_data_ids[0], context=context
)
xml_id = '%s.%s' % (model_data.module, model_data.name)
xml_id = '%s.%s' % (model_data.module, model_data.name)
parser_instance = self.parser(cr, uid, self.name2, context=context)
parser_instance.set_context(