8.0.2.1
Fixed bug -> removed raise exception when no xml id found. --HG-- branch : odoo8pull/80/head
parent
7c6388566d
commit
4f2776c2d3
|
@ -30,7 +30,7 @@ templates.
|
||||||
The py3o.template package is required; install it with:
|
The py3o.template package is required; install it with:
|
||||||
pip install py3o.template
|
pip install py3o.template
|
||||||
''',
|
''',
|
||||||
'version': '2.0',
|
'version': '8.0.2.1',
|
||||||
'category': 'Reporting',
|
'category': 'Reporting',
|
||||||
'author': 'XCG Consulting',
|
'author': 'XCG Consulting',
|
||||||
'website': 'http://odoo.consulting/',
|
'website': 'http://odoo.consulting/',
|
||||||
|
|
|
@ -124,14 +124,11 @@ class Py3oParser(report_sxw):
|
||||||
)
|
)
|
||||||
|
|
||||||
xml_id = None
|
xml_id = None
|
||||||
if not model_data_ids:
|
if model_data_ids:
|
||||||
raise exceptions.MissingError(
|
model_data = pool['ir.model.data'].browse(
|
||||||
_(u"Report %s not found" % report_xml)
|
cr, uid, model_data_ids[0], context=context
|
||||||
)
|
)
|
||||||
model_data = pool['ir.model.data'].browse(
|
xml_id = '%s.%s' % (model_data.module, model_data.name)
|
||||||
cr, uid, model_data_ids[0], context=context
|
|
||||||
)
|
|
||||||
xml_id = '%s.%s' % (model_data.module, model_data.name)
|
|
||||||
|
|
||||||
parser_instance = self.parser(cr, uid, self.name2, context=context)
|
parser_instance = self.parser(cr, uid, self.name2, context=context)
|
||||||
parser_instance.set_context(
|
parser_instance.set_context(
|
||||||
|
|
|
@ -51,6 +51,7 @@ class py3o_report(report_sxw):
|
||||||
report_xml_ids = report_xml_obj.search(cr, uid,
|
report_xml_ids = report_xml_obj.search(cr, uid,
|
||||||
[('report_name', '=', self.name[7:])], # Ignore "report."
|
[('report_name', '=', self.name[7:])], # Ignore "report."
|
||||||
context=context)
|
context=context)
|
||||||
|
|
||||||
if not report_xml_ids:
|
if not report_xml_ids:
|
||||||
return super(py3o_report, self).create(cr, uid, ids, data,
|
return super(py3o_report, self).create(cr, uid, ids, data,
|
||||||
context=context)
|
context=context)
|
||||||
|
|
Loading…
Reference in New Issue