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.

0

Webkit Reports Tracebacks

By
Dave Burkholder
on 5/30/13, 10:43 PM 3,534 views

I've installed the following modules in my OpenERP 7 server, running on Ubuntu 12.04.

account_financial_report_webkit
base_headers_webkit
invoice_webkit
report_webkit
sale_order_webkit

Unfortunately, I'm getting errors on every webkit report I try to print. Here are the trackebacks I'm getting:

#------------------------------------
Sales Order Report
#------------------------------------
Webkit render!

Traceback (most recent call last):
File "/opt/openerp/7.0/addons/report_webkit/webkit_report.py", line 278, in create_single_pdf
*self.parser_instance.localcontext)
File "/usr/lib/python2.7/dist-packages/mako/template.py", line 302, in render return runtime._render(self, self.callable_, args, data)
File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 660, in _render *
_kwargs_for_callable(callable_, data))
File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 692, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 718, in _exec_template callable_(context, args, *kwargs)
File "memory:0x7f573c08b210", line 36, in render_body

File "/opt/openerp/7.0/server/openerp/osv/orm.py", line 486, in __getattr__ raise AttributeError(e)
AttributeError: "Field 'address' does not exist in object 'browse_record(res.partner, 1)'"

#------------------------------------
Customer Invoice
#------------------------------------
Webkit render!

Traceback (most recent call last):
File "/opt/openerp/7.0/addons/report_webkit/webkit_report.py", line 266, in create_single_pdf
**self.parser_instance.localcontext)
File "/usr/lib/python2.7/dist-packages/mako/template.py", line 302, in render return runtime._render(self, self.callable_, args, data)
File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 661, in _render return context._pop_buffer().getvalue()
File "/usr/lib/python2.7/dist-packages/mako/util.py", line 134, in getvalue
return self.delim.join(self.data).encode(self.encoding, self.errors)
TypeError: sequence item 233: expected string or Unicode, bool found

#------------------------------------
Supplier Invoice
#------------------------------------
Webkit render!

Traceback (most recent call last):
File "/opt/openerp/7.0/addons/report_webkit/webkit_report.py", line 266, in create_single_pdf
**self.parser_instance.localcontext)
File "/usr/lib/python2.7/dist-packages/mako/template.py", line 302, in render return runtime._render(self, self.callable_, args, data)
File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 661, in _render return context._pop_buffer().getvalue()
File "/usr/lib/python2.7/dist-packages/mako/util.py", line 134, in getvalue return self.delim.join(self.data).encode(self.encoding, self.errors)
TypeError: sequence item 163: expected string or Unicode, bool found

#------------------------------------

So, my webkit deployment is not going well at all. :-| Any suggestions for me?

Anybody? Anything?? Camptocamp, are you there?

Thinkwell Designs, Dave Burkholder
on 5/31/13, 7:16 PM
1
David Béal
On 6/3/13, 8:43 PM

Hello,

please choose this branch

https://code.launchpad.net/~sale-core-editors/sale-reports/7.0 (for v7)

instead of https://code.launchpad.net/~sale-core-editors/sale-reports/ (for v6.1)

The bug : AttributeError: "Field 'address' does not exist in object 'browse_record(res.partner, 1)'" prove that it is 6.1 version (not the same party model : 2 tables in v6.1, 1 for v7, no more field address in 'res.partner')

Do not remove rml

I am using the 7.0 branches. The contents of branch.conf for the sale-reports module: parent_location = http://bazaar.launchpad.net/~sale-core-editors/sale-reports/7.0/

The contents of branch.conf for the account-invoice-report module: parent_location = http://bazaar.launchpad.net/~account-core-editors/account-invoice-report/7.0/

Thinkwell Designs, Dave Burkholder
on 6/3/13, 9:46 PM
0
Michael Meierhoff
On 6/3/13, 9:26 AM

I had the same problem.

The solution is to remove the selection in the check box "Add RML Header" under "Settings -> Technical -> Actions -> Reports" in the respective report.

It seems that Webkit Report and RML Header do not work together. You can select the Webkit header in the webkit tab.

I tried that and now get this traceback (abridged): File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 661, in _render return context._pop_buffer().getvalue() File "/usr/lib/python2.7/dist-packages/mako/util.py", line 134, in getvalue return self.delim.join(self.data).encode(self.encoding, self.errors) TypeError: sequence item 231: expected string or Unicode, bool found

Thinkwell Designs, Dave Burkholder
on 6/3/13, 9:45 PM
0

Hi,

I had a similar error when printing invoices. I could solve it with a change of the account_invoice.mako template. Search at the bottom of the file:

    %if inv.fiscal_position :
        <br/>
        <p class="std_text">
        ${inv.fiscal_position.note | n}
        </p>
    %endif

And replace it with the following code:

%if inv.fiscal_position and inv.fiscal_position.note :
    <br/>
    <p class="std_text">
    ${inv.fiscal_position.note | n}
    </p>
%endif

As you can see, I've added a further argument in the if statement. The attribute inv.fiscal_position.note seemed to return a boolean False.

Best regards,

Reinhard

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

3 follower(s)

Stats

Asked: 5/30/13, 10:43 PM
Seen: 3534 times
Last updated: 3/16/15, 8:10 AM