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

[v8] getattr in a t-value

By
PY
on 7/27/15, 9:47 AM 591 views

https://github.com/antonylesuisse/qweb/issues/17


Hi !

Are some builtin Python functions not available in qweb templates ? Because getattr(object, attr_name) returns a QWebException: "'NoneType' object is not callable".

Thanks.

0
PY
On 7/27/15, 10:28 AM

Found an ugly workaround that takes place in the controller. When returning the function, to call the template engine which will render the qweb view, just pass 'getattr': getattr in the dictionnary of values.


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)

Stats

Asked: 7/27/15, 9:47 AM
Seen: 591 times
Last updated: 7/27/15, 10:28 AM