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

ODOO9: Exception: AttValue: " or ' expected, line 45, column 17

By
Drees Far
on 12/20/15, 9:48 AM 715 views

Can anyone help me know this error please:

2015-12-20 14:45:51,704 7676 ERROR ODOO openerp.service.report: Exception: AttValue: " or ' expected, line 45, column 17

Traceback (most recent call last):

File "/opt/odoo/openerp/service/report.py", line 94, in go

result, format = openerp.report.render_report(cr, uid, ids, object, datas, context)

File "/opt/odoo/openerp/report/__init__.py", line 22, in render_report

return registry['ir.actions.report.xml'].render_report(cr, uid, ids, name, data, context)

File "/opt/odoo/openerp/api.py", line 238, in wrapper

return old_api(self, *args, **kwargs)

File "/opt/odoo/openerp/addons/base/ir/ir_actions.py", line 197, in render_report

return new_report.create(cr, uid, res_ids, data, context)

File "/opt/odoo/openerp/report/report_sxw.py", line 371, in create

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

File "/opt/odoo/openerp/report/report_sxw.py", line 440, in create_source_pdf

return self.create_single_pdf(cr, uid, ids, data, report_xml, context)

File "/opt/odoo/openerp/report/report_sxw.py", line 455, in create_single_pdf

processed_rml = etree.XML(rml)

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

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

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

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

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

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

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

XMLSyntaxError: AttValue: " or ' expected, line 45, column 17

2015-12-20 14:45:51,925 7676 ERROR ODOO openerp.addons.web.controllers.main: An exception occured during an http request

Traceback (most recent call last):

File "/opt/odoo/openerp/addons/web/controllers/main.py", line 72, in wrap

return f(*args, **kwargs)

File "/opt/odoo/openerp/addons/web/controllers/main.py", line 1568, in index

request.session.db, request.session.uid, request.session.password, report_id)

File "/opt/odoo/openerp/http.py", line 969, in proxy_method

result = dispatch_rpc(self.service_name, method, args)

File "/opt/odoo/openerp/http.py", line 114, in dispatch_rpc

result = dispatch(method, params)

File "/opt/odoo/openerp/service/report.py", line 35, in dispatch

res = fn(db, uid, *params)

File "/opt/odoo/openerp/service/report.py", line 142, in exp_report_get

return _check_report(report_id)

File "/opt/odoo/openerp/service/report.py", line 120, in _check_report

raise UserError('%s: %s' % (exc.message, exc.traceback))

UserError: (u'AttValue: " or \' expected, line 45, column 17: (<class \'lxml.etree.XMLSyntaxError\'>, XMLSyntaxError(u\'AttValue: " or \\\' expected, line 45, column 17\',), <traceback object at 0x7fe68cca4ef0>)', None)

Thanks a lot in advance.

Best Regards.

what you want to do?? and what you change in web?? please give a some line of code.

Ajay Patel
on 12/21/15, 2:15 AM

Friend i want to create a report (webkit) on odoo9 :/

Drees Far
on 12/21/15, 3:38 AM

can you show some line of code of your xml file near (line 45)

Ajay Patel
on 12/21/15, 4:25 AM

I will post you my xml but there is no error. The unique error is that webkit report is not working on my odoo9 :/

Drees Far
on 12/21/15, 4:29 AM

NotImplementedError: Type de rapport inconnu : "webkit" Here is what i got when i print my report

Drees Far
on 12/21/15, 4:32 AM

Hey friend!!! are u here??

Drees Far
on 12/21/15, 5:31 AM
1

Drees Far

--Drees Far--
1130
| 5 2 6
Tunis, Tunisia
--Drees Far--
Drees Far
On 12/21/15, 4:30 AM

Friend;

Here is my xml:

<?xml version="1.0"?>

<openerp>

<data>

<record id="view_holidays_form_inherit" model="ir.ui.view">

<field name="name">Leave Request.inherit</field>

<field name="model">hr.holidays</field>

<field name="inherit_id" ref="hr_holidays.edit_holiday_new"/>

<field name="arch" type="xml">

<xpath expr="//field[@name='department_id']" position="after">

<field name="resumption_date"/>

</xpath>

</field>

</record>

</data>

</openerp>

And the xml of my report:

<?xml version="1.0"?>

<openerp>

<data>

<report

auto="False"

id="titre_conge_report"

model="hr.holidays"

name="titre_conge"

file="addons/seetek_leave/report/titre_conge.mako"

string="Titre de congés"

usage="default"/>

</data>

</openerp>

0
Ajay Patel
On 12/21/15, 5:59 AM

Try This may it will help you, in this you have to explicitly define the parser path. See this example, (parser) attribute:

 <report id="report_pack_slip"
        name="pack.slip"
        auto="False"
        model="stock.picking"
        file="mage2odoo_picking_ticket/report/packing.mako"
        string="Packing Slip"
    parser="<module_name>.<folder_name>.<py file>.<parsar class>"
    header="False"
        report_type="webkit"
/>

see this discussion: https://github.com/odoo/odoo/issues/2334 

i have tried it but nothing have changed. I still get this error :/

Drees Far
on 12/21/15, 6:09 AM

as per your question error in your xml syntax at line 45

Ajay Patel
on 12/21/15, 6:11 AM

I have tried this but it still not working pffff :'(

Drees Far
on 12/21/15, 6: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: 12/20/15, 9:48 AM
Seen: 715 times
Last updated: 1/18/16, 3:23 PM