Odoo Help


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.


"Argument 'element' has incorrect type" when exporting report from OpenOffice

on 6/21/13, 3:55 AM 1,185 views


I am new at generating reports via OpenOffice. I had no problems connecting to the server or adding the loop and the fields, but when I try to export RML I see the following error output in the console:

2013-06-21 05:48:16,634 19606 ERROR openerp3 openerp.netsvc: Argument 'element' has incorrect type (expected lxml.etree._Element, got NoneType)
Traceback (most recent call last):
  File "/home/ubuntu/Downloads/openerp-7.0-20130131-000102/openerp/netsvc.py", line 289, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/ubuntu/Downloads/openerp-7.0-20130131-000102/openerp/service/web_services.py", line 614, in dispatch
    res = fn(db, uid, *params)
  File "/home/ubuntu/Downloads/openerp-7.0-20130131-000102/openerp/osv/osv.py", line 123, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/ubuntu/Downloads/openerp-7.0-20130131-000102/openerp/osv/osv.py", line 179, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/ubuntu/Downloads/openerp-7.0-20130131-000102/openerp/osv/osv.py", line 166, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/ubuntu/Downloads/openerp-7.0-20130131-000102/openerp/addons/base_report_designer/base_report_designer.py", line 56, in upload_report
    'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read())),
  File "/home/ubuntu/Downloads/openerp-7.0-20130131-000102/openerp/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py", line 320, in sxw2rml
    root = etree.XPathEvaluator(result)("/document/stylesheet")
  File "xpath.pxi", line 403, in lxml.etree.XPathEvaluator (src/lxml/lxml.etree.c:118527)
  File "xpath.pxi", line 342, in lxml.etree.XPathDocumentEvaluator.__init__ (src/lxml/lxml.etree.c:117984)
  File "xpath.pxi", line 264, in lxml.etree.XPathElementEvaluator.__init__ (src/lxml/lxml.etree.c:117115)
TypeError: Argument 'element' has incorrect type (expected lxml.etree._Element, got NoneType)

I don't understand what the 'element' is as I don't have any field with that name. Any idea how can I bypass this issue or what might be causing it?

Thanks in advance

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)


Asked: 6/21/13, 3:55 AM
Seen: 1185 times
Last updated: 3/16/15, 8:10 AM