← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 510834] Re: Print Engine is broken Converting to other type that is not PDF or HTML

 

I don't know how the report engine works, but I've tried to dig.

The fix in comment #4 doesn't work.

The n.getparent() loop always reaches the top node (which in None), because the n.tag is never found in odt_parents.
The n.tag is never found in odt_parents because the nodes are not ODT nodes, but SXW nodes!

As a consequence, if I replace match = odt_parents with match = sxw_parents, I don't get an error, but the file is not filled with data. (we still see the directives as in the RML file). 
So there is something wrong with the originating root_node, which is of the wrong type.

-- 
Print Engine is broken Converting to other type that is not PDF or HTML
https://bugs.launchpad.net/bugs/510834
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Server: Confirmed

Bug description:
Crating reports and selecting odt file extension to ou give me an exception!

Menu > Administration > Low Level Objects > Actions > Report XML

Search with the Object File : "Invoice"

Edit this element and change the value that Say PDF for ODT.

Traceback (most recent call last):
  File "/home/nhomar/openerp/stable/5.0/instancias/ingelub/server/bin/service/web_services.py", line 703, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/home/nhomar/openerp/stable/5.0/instancias/ingelub/server/bin/report/report_sxw.py", line 364, in create
    fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
  File "/home/nhomar/openerp/stable/5.0/instancias/ingelub/server/bin/report/report_sxw.py", line 370, in create_source_odt
    return self.create_single_odt(cr, uid, ids, data, report_xml, context or {})
  File "/home/nhomar/openerp/stable/5.0/instancias/ingelub/server/bin/report/report_sxw.py", line 518, in create_single_odt
    rml_dom = self.preprocess_rml(rml_dom,report_type)
  File "/home/nhomar/openerp/stable/5.0/instancias/ingelub/server/bin/report/preprocess.py", line 59, in preprocess_rml
    self.preprocess_rml(node,type)
  File "/home/nhomar/openerp/stable/5.0/instancias/ingelub/server/bin/report/preprocess.py", line 54, in preprocess_rml
    t = _regex1.sub(_sub1, node.text)
  File "/home/nhomar/openerp/stable/5.0/instancias/ingelub/server/bin/report/preprocess.py", line 50, in _sub1
    while n.tag not in match:
AttributeError: 'NoneType' object has no attribute 'tag'

Edit The Element Again and put HTML

The result if the field are not in a setion this are not located and the printing is directly with the names of variables.

THIS HAPPEND on web-client ando with gtk-client.

I have resources to work in repair it, some body can explain in few words how is the logic in the printing system ¡¡¡¡please!!!!, ¿where are the scripts and the converters? because we had worked on it and We didn't found this characteristic in all the source code, debug the printing behaviour is a COMPLETE MISTERY.

Thanks.