← Back to team overview

openerp-india team mailing list archive

[Bug 965744] Re: Cannot upload a report template that uses a functional field

 

I did further debugging: I archived the information for the xml and xsl
and created a little sandbox program that tries to process the
information using the same steps as within OpenERP.  I've attached a tar
with all three...

More info :

a) I'm running Ubuntu 11.10 on a 64 bit PC

b) I'm using LibreOffice 3.4.4.  The page at
http://doc.openerp.com/v6.0/technical_guide/base_report_designer.html
doesn't indicate whether LibreOffice is acceptable and if it is what
versions are ok.. but then again, it also doesn't mention which versions
of OpenOffice it works with.  I should note that as far as I can tell
Ubuntu no longer has aptitude management for Open Office so LibreOffice
support is pretty important... If necessary, I can probably do a manual
install of Open Office but with it being no longer package manager
accessible, it's a kludgy short term solution at best.

c) I'm using python 2.7.  I didn't do anything to manually mess with
lxml or etree so the versions of that being used would be whatever
python 2.7 bundles with.  There are so files for etree and objectivy in
the modules directory and I'm not sure how to query them for what
version they are.

** Attachment added: "more files for problem reproducing"
   https://bugs.launchpad.net/openobject-server/+bug/965744/+attachment/2957893/+files/rgtester.tar

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/965744

Title:
  Cannot upload a report template that uses a functional field

Status in OpenERP Server:
  Incomplete

Bug description:
  While designing a custom report I noticed that I'm no longer able to
  create new reports.  On the Open Office side everything looks fine
  (the "live update" preview shows what I expect it to show) but when
  attempting to send I get

  2012-03-26 21:28:57,208 12901 WARNING ? openerp.osv.expression: The domain term '('name', '=', ['basic report'])' should use the 'in' or 'not in' operator.
  2012-03-26 21:28:57,209 12901 INFO ? werkzeug: 127.0.0.1 - - [26/Mar/2012 21:28:57] "POST /xmlrpc/object HTTP/1.1" 200 -
  2012-03-26 21:28:57,226 12901 INFO ? werkzeug: 127.0.0.1 - - [26/Mar/2012 21:28:57] "POST /xmlrpc/object HTTP/1.1" 200 -
  2012-03-26 21:28:57,236 12901 WARNING ? openerp.osv.orm: No such field(s) in model ir.values: object.
  2012-03-26 21:28:57,238 12901 INFO ? werkzeug: 127.0.0.1 - - [26/Mar/2012 21:28:57] "POST /xmlrpc/object HTTP/1.1" 200 -
  2012-03-26 21:28:57,325 12901 ERROR ? openerp.osv.osv: Uncaught exception
  Traceback (most recent call last):
    File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 121, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 164, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/usr/lib/pymodules/python2.7/openerp/addons/base_report_designer/base_report_designer.py", line 56, in upload_report
      'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read())),
    File "/usr/lib/pymodules/python2.7/openerp/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py", line 318, in sxw2rml
      root = etree.XPathEvaluator(result)("/document/stylesheet")
    File "xpath.pxi", line 406, in lxml.etree.XPathEvaluator (src/lxml/lxml.etree.c:114664)
    File "xpath.pxi", line 345, in lxml.etree.XPathDocumentEvaluator.__init__ (src/lxml/lxml.etree.c:114128)
    File "xpath.pxi", line 267, in lxml.etree.XPathElementEvaluator.__init__ (src/lxml/lxml.etree.c:113282)
  TypeError: Argument 'element' has incorrect type (expected lxml.etree._Element, got NoneType)

  I've attached a very simple sandbox addon that can be used to
  reproduce this.

  Steps to reproduce:

  1) create a database
  2) add the reportBugDemonstrationAddon addon
  3) This will install the base report designer but you may need to install the module in your local copy of Open Office or Libreoffice if you haven't done so
  4) in OO (or LO) a) connect to the new database; b) choose "open a new report"; c) pick "A sample entity" for module inclusion; d) add a loop on "list of a sample entity"; e) a couple of lines down, add text "tester field: " then insert the tester field field
  5) send to server with name "basic report"
  e) error gets generated.  

  Note that if you do step 1 through 4, but then do export to rml
  instead of send to server, the exact same problem happens

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/965744/+subscriptions


References