Odoo Help


[v8] getattr in a t-value

on 7/27/15, 9:47 AM 689 views


Hi !

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


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 platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


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