Browse Source

8.0.2.1

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

--HG--
branch : odoo8
pull/80/head
Szeka Wong 8 years ago
parent
commit
4f2776c2d3
  1. 2
      __openerp__.py
  2. 11
      py3o_parser.py
  3. 1
      py3o_report_modif.py

2
__openerp__.py

@ -30,7 +30,7 @@ templates.
The py3o.template package is required; install it with:
pip install py3o.template
''',
'version': '2.0',
'version': '8.0.2.1',
'category': 'Reporting',
'author': 'XCG Consulting',
'website': 'http://odoo.consulting/',

11
py3o_parser.py

@ -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(

1
py3o_report_modif.py

@ -51,6 +51,7 @@ class py3o_report(report_sxw):
report_xml_ids = report_xml_obj.search(cr, uid,
[('report_name', '=', self.name[7:])], # Ignore "report."
context=context)
if not report_xml_ids:
return super(py3o_report, self).create(cr, uid, ids, data,
context=context)

Loading…
Cancel
Save