Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

In wizard report there is no data means printing this error

By
sridhar
on 6/5/14, 1:02 AM 1,619 views

In wizard report there is no data means printing this error "SyntaxError: JSON.parse: unexpected end of data at line 2 column 1 of the JSON data" why? My warning message is not displaying, how to solve this.

2014-06-05 05:26:29,054 5937 ERROR demo openerp.tools.safe_eval: Cannot eval "repeatIn(get_total(data), 'y')"
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/tools/safe_eval.py", line 285, in safe_eval
    return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/opt/openerp/server/openerp/addons/product_category_report/report/product_category_report.py", line 64, in get_total
    raise osv.except_osv(_('Error!'), _('There is no product in this Category!'))
except_osv: (u'Error!', u'There is no product in this Category!')
2014-06-05 05:26:29,054 5937 ERROR demo openerp.service.web_services: Exception: (u'Error!', u'There is no product in this Category!')
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/service/web_services.py", line 712, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/opt/openerp/server/openerp/report/report_sxw.py", line 442, in create
    fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
  File "/opt/openerp/server/openerp/report/report_sxw.py", line 511, in create_source_pdf
    return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
  File "/opt/openerp/server/openerp/report/report_sxw.py", line 533, in create_single_pdf
    pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
  File "/opt/openerp/server/openerp/report/interface.py", line 206, in create_pdf
    obj.render()
  File "/opt/openerp/server/openerp/report/render/render.py", line 59, in render
    self._result = self._render()
  File "/opt/openerp/server/openerp/report/render/rml.py", line 41, in _render
    return rml2pdf.parseNode(self.rml, self.localcontext, images=self.bin_datas, path=self.path,title=self.title)
  File "/opt/openerp/server/openerp/report/render/rml2pdf/trml2pdf.py", line 1032, in parseNode
    r.render(fp)
  File "/opt/openerp/server/openerp/report/render/rml2pdf/trml2pdf.py", line 328, in render
    pt_obj.render(el)
  File "/opt/openerp/server/openerp/report/render/rml2pdf/trml2pdf.py", line 1003, in render
    fis += r.render(node_story)
  File "/opt/openerp/server/openerp/report/render/rml2pdf/trml2pdf.py", line 897, in render
    return process_story(node_story)
  File "/opt/openerp/server/openerp/report/render/rml2pdf/trml2pdf.py", line 886, in process_story
    for node in utils._child_get(node_story, self):
  File "/opt/openerp/server/openerp/report/render/rml2pdf/utils.py", line 48, in _child_get
    for ctx in eval(n.get('rml_loop'),{}, self.localcontext):
  File "/opt/openerp/server/openerp/tools/safe_eval.py", line 285, in safe_eval
    return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/opt/openerp/server/openerp/addons/product_category_report/report/product_category_report.py", line 64, in get_total
    raise osv.except_osv(_('Error!'), _('There is no product in this Category!'))
except_osv: (u'Error!', u'There is no product in this Category!')
2014-06-05 05:26:29,250 5937 ERROR demo openerp.netsvc: Error!
There is no product in this Category!
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 654, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 760, in exp_report_get
    return self._check_report(report_id)
  File "/opt/openerp/server/openerp/service/web_services.py", line 738, in _check_report
    netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
  File "/opt/openerp/server/openerp/netsvc.py", line 71, in abort_response
    raise openerp.osv.osv.except_osv(description, details)
except_osv: (u'Error!', u'There is no product in this Category!')

Give some detailed error or give server trace back.

Yogesh
on 6/5/14, 1:18 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 6/5/14, 1:02 AM
Seen: 1619 times
Last updated: 3/16/15, 8:10 AM