webkit report - debug html does not contain data, pdf is ok

Bug #834942 reported by Ferdinand
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

6.0.3
activating debug opens an empty html form, while debug=off opens the correct report

<body style="border:0; margin: 0;" onload="subst()">
</body>

only for one "big" report for now

Changed in openobject-addons:
assignee: nobody → Nicolas Bessi - Camptocamp (nbessi-c2c)
Revision history for this message
Fernando Lopez (kyon) wrote :

On line 286, you have the code to set a variable named "deb". For some reason, the render function is not merging the code of the mako file, and the code of the ccs, header, and stuff. I modified the code as below, i don't have any idea if something is lost, but my report works. My report uses functions and they work. Try if it works for you. Still waiting for a pro answer.
if report_xml.webkit_debug :
            try :
                #deb = head_mako_tpl.render(helper=helper,
                # css=css,
                # _debug=tools.ustr("\n".join(htmls)),
                # _=self.translate_call,
                # **self.parser_instance.localcontext)
                deb = tools.ustr("\n".join(htmls)).encode('UTF-8')#Just commented all above, and set this deb
            except Exception, e:
                msg = exceptions.text_error_template().render()
                logger.error(msg)
                raise except_osv(_('Webkit render'), msg)
            return (deb, 'html')

Revision history for this message
Paulius Sladkevičius @ hbee (komsas) wrote :

Issue is that head_mako_tpl is used not a body_mako_tpl variable to render.

Revision history for this message
Paulius Sladkevičius @ hbee (komsas) wrote :

BTW, I can confirm that it still exist on the 7.0

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.