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.

1

OpenERP Client Error - Uncaught SyntaxError: Unexpected end of input // What does that mean?

By
Michael Egierski
on 9/10/14, 3:49 AM 6,065 views

Hello,

I have created a sales report with OpenOffice Report Designer and uploaded it to the server. When choosing this template in the "Print" menu, I get this error message:

OpenERP Client Error - Uncaught SyntaxError: Unexpected end of input

-----------------------------------------------------------------------------------------------------------------------------------------------

http://192.168.0.7:8069/?ts=1409059791570#id=4&view_type=form&model=sale.order&action=348:0

 

Could anyone tell me what this error exactly means? Could there anything be not right with the python syntax?

 

Greetings and thanks in advance.

Michael

1
Tintu Mon
On 9/9/15, 2:17 AM

If you haven't installed "wkhtmltopdf" it'll throw an error like this.

I have also faced the same error and I resolved it after installing wkhtmltopdf

Open Terminal and install:

sudo apt-get install wkhtmltopdf

Then  try it, report will be generated and PDF will get downloaded.

0
imad
On 2/17/15, 6:17 AM

hello,

when i want to print a client interface with another option by using jasper report(model res partner) i found this error

Odoo Erreur (côté interface)

Uncaught SyntaxError: Unexpected end of input

http://localhost:8069/web#id=7&view_type=form&model=res.partner&menu_id=193&action=61:0

can you help me.thnks

0

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 9/10/14, 4:36 AM

This could currently be any syntax error. Have you got the stacktrace from the logs? Might be easier to track down the error using those logs.

0
Michael Egierski
On 9/10/14, 5:42 AM

Hello Ludo,

the log file states a lot of errors of this types:

2014-09-09 09:37:06,801 24234 ERROR ubisys openerp.tools.safe_eval: Cannot eval "not show_discount(user.id) and removeParentNode('para')"
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/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>
NameError: name 'show_discount' is not defined

 

2014-09-09 09:37:06,801 24234 WARNING ubisys openerp.report.render.rml2pdf.utils: rml_except: "not show_discount(user.id) and removeParentNode('para')"
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/report/render/rml2pdf/utils.py", line 76, in _child_get
    eval(n.get('rml_except'), {}, self.localcontext)
  File "/usr/lib/pymodules/python2.7/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>
NameError: name 'show_discount' is not defined

 

2014-09-09 09:37:06,816 24234 ERROR ubisys openerp.tools.safe_eval: Cannot eval "show_discount(user.id) and formatLang(line.discount, digits=get_digits(dp='Discount')) or ''"
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/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>
NameError: name 'show_discount' is not defin

 

2014-09-09 09:37:06,905 24234 ERROR ubisys openerp.service.web_services: Exception: can't find frame('Firmendaten') in <reportlab.platypus.doctemplate.PageTemplate instance at 0x7fd668ed1cb0>(None) which has frames [(<reportlab.platypus.frames.Frame instance at 0x7fd668ed15a8>, u'first')]
handle_currentFrame args=('Firmendaten', 0)
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 712, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/usr/lib/pymodules/python2.7/openerp/report/report_sxw.py", line 442, in create
    fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
  File "/usr/lib/pymodules/python2.7/openerp/report/report_sxw.py", line 511, in create_source_pdf
    return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
  File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/report/interface.py", line 206, in create_pdf
    obj.render()
  File "/usr/lib/pymodules/python2.7/openerp/report/render/render.py", line 59, in render
    self._result = self._render()
  File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/report/render/rml2pdf/trml2pdf.py", line 1032, in parseNode
    r.render(fp)
  File "/usr/lib/pymodules/python2.7/openerp/report/render/rml2pdf/trml2pdf.py", line 328, in render
    pt_obj.render(el)
  File "/usr/lib/pymodules/python2.7/openerp/report/render/rml2pdf/trml2pdf.py", line 1012, in render
    self.doc_tmpl.build(fis)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 890, in build
    self.handle_flowable(flowables)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 767, in handle_flowable
    f.apply(self)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 145, in apply
    annotateException("\nhandle_%s args=%s"%(action,ascii(args)))
  File "/usr/lib/python2.7/dist-packages/reportlab/lib/utils.py", line 1337, in annotateException
    rl_reraise(t,v,b)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 138, in apply
    getattr(doc,arn)(*args)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 686, in handle_currentFrame
    self.handle_nextFrame(fx,resume)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 678, in handle_nextFrame
    raise ValueError("can't find frame('%s') in %r(%s) which has frames %r"%(fx,self.pageTemplate,self.pageTemplate.id,[(f,f.id) for f in self.pageTemplate.frames]))
ValueError: can't find frame('Firmendaten') in <reportlab.platypus.doctemplate.PageTemplate instance at 0x7fd668ed1cb0>(None) which has frames [(<reportlab.platypus.frames.Frame instance at 0x7fd668ed15a8>, u'first')]
handle_currentFrame args=('Firmendaten', 0)

 

I think I got this problem solved. There's been a frame in my document, that OO had obviously problems to handle with. I moved the frame content into a table instead, and now I can print the report.

Michael Egierski
on 9/10/14, 6:48 AM

Looks like it from the logs as well. Glad to hear you solved it!

Ludo - Neobis
on 9/10/14, 7:39 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

1 follower(s)

Stats

Asked: 9/10/14, 3:49 AM
Seen: 6065 times
Last updated: 7/31/16, 5:13 AM