跳至内容
菜单
此问题已终结
3 回复
13662 查看

Hello guys!!!

Please, i wprk with Reports.

I have added a new report. It has worked fine.

But now, it shows me this error:

SyntaxError: JSON.parse: unexpected end of data at line 2 column 1 of the JSON data

http://localhost:8069/web/webclient/js?db=openerp:3104

Trace:

2015-08-11 14:30:09,330 8601 ERROR openerp openerp.service.web_services: Exception: AttValue: " or ' expected, line 44, column 11

Traceback (most recent call last):

File "/opt/openerp/v7/server/openerp/service/web_services.py", line 712, in go

(result, format) = obj.create(cr, uid, ids, datas, context)

File "/opt/openerp/v7/addons/report_webkit/webkit_report.py", line 330, in create

return super(WebKitParser, self).create(cursor, uid, ids, data, context)

File "/opt/openerp/v7/server/openerp/report/report_sxw.py", line 442, in create

fnct_ret = fnct(cr, uid, ids, data, report_xml, context)

File "/opt/openerp/v7/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/v7/addons/report_webkit/webkit_report.py", line 204, in create_single_pdf

return super(WebKitParser,self).create_single_pdf(cursor, uid, ids, data, report_xml, context=context)

File "/opt/openerp/v7/server/openerp/report/report_sxw.py", line 526, in create_single_pdf

processed_rml = etree.XML(rml)

File "lxml.etree.pyx", line 3012, in lxml.etree.XML (src/lxml/lxml.etree.c:68047)

File "parser.pxi", line 1786, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:102641)

File "parser.pxi", line 1674, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:101470)

File "parser.pxi", line 1074, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:96652)

File "parser.pxi", line 582, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:91461)

File "parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:92647)

File "parser.pxi", line 622, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:91943)

XMLSyntaxError: AttValue: " or ' expected, line 44, column 11

2015-08-11 14:30:09,566 8601 ERROR openerp openerp.netsvc: AttValue: " or ' expected, line 44, column 11

(<class 'lxml.etree.XMLSyntaxError'>, XMLSyntaxError(u'AttValue: " or \' expected, line 44, column 11',), <traceback object at 0x7f772877b488>)

Traceback (most recent call last):

File "/opt/openerp/v7/server/openerp/netsvc.py", line 296, in dispatch_rpc

result = ExportService.getService(service_name).dispatch(method, params)

File "/opt/openerp/v7/server/openerp/service/web_services.py", line 654, in dispatch

res = fn(db, uid, *params)

File "/opt/openerp/v7/server/openerp/service/web_services.py", line 760, in exp_report_get

return self._check_report(report_id)

File "/opt/openerp/v7/server/openerp/service/web_services.py", line 738, in _check_report

netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)

File "/opt/openerp/v7/server/openerp/netsvc.py", line 71, in abort_response

raise openerp.osv.osv.except_osv(description, details)

except_osv: (u'AttValue: " or \' expected, line 44, column 11', (<class 'lxml.etree.XMLSyntaxError'>, XMLSyntaxError(u'AttValue: " or \' expected, line 44, column 11',), <traceback object at 0x7f772877b488>))

2015-08-11 14:30:09,568 8601 INFO openerp werkzeug: 127.0.0.1 - - [11/Aug/2015 14:30:09] "POST /web/report HTTP/1.1" 500 -

Who can help me please!!

Regards.

形象
丢弃
编写者 最佳答案

I have found the solution:

It was because of the OpenERP while installing modules, table res_company is missing some attributes :  name, city, zip, country_id...

When i have eliminated them the report works correctly.

So now, i have to reinstall an other database and be carefull in completing attributes of tables :)

Regards.

形象
丢弃
最佳答案

There is an error in xml file in which you defined the header of your report or the report. Please check it or upload and hope we find a solution.

形象
丢弃
编写者

Here is the new error: 2015-08-11 15:13:34,544 12271 ERROR openerp openerp.service.web_services: Exception: u'report.titre de conge' Traceback (most recent call last): File "/opt/openerp/v7/server/openerp/service/web_services.py", line 711, in go obj = netsvc.LocalService('report.'+object) File "/opt/openerp/v7/server/openerp/netsvc.py", line 98, in LocalService return Service._services[name] KeyError: u'report.titre de conge' 2015-08-11 15:13:34,794 12271 ERROR openerp openerp.netsvc: report.titre de conge (, KeyError(u'report.titre de conge',), ) Traceback (most recent call last): File "/opt/openerp/v7/server/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/v7/server/openerp/service/web_services.py", line 654, in dispatch res = fn(db, uid, *params) File "/opt/openerp/v7/server/openerp/service/web_services.py", line 760, in exp_report_get return self._check_report(report_id) File "/opt/openerp/v7/server/openerp/service/web_services.py", line 738, in _check_report netsvc.abort_response(exc, exc.message, 'warning', exc.traceback) File "/opt/openerp/v7/server/openerp/netsvc.py", line 71, in abort_response raise openerp.osv.osv.except_osv(description, details) except_osv: (u'report.titre de conge', (, KeyError(u'report.titre de conge',), ))

相关帖文 回复 查看 活动
1
8月 15
4367
3
8月 19
9596
0
5月 18
13391
0
1月 17
3460
0
12月 15
76