Odoo Help


How to show value of custom field in QWeb report ?

on 3/9/16, 5:21 AM 503 views


I added a custom field named "Needed" in "budget.lines" in "Accounting>Budget".

I need to customize the QWeb report, by adding "Needed" field in the associated QWeb view :





    <th class="text-right">Theoretical Amt</th>

    <th class="text-right">Planned Amt</th>

    <th class="text-right">Practical Amt</th>

    <th class="text-center">Perc(%)</th>



So, when I try to show the value of this custom variable ('x_needed'), I get "500: Internal Server Error" :

    "x_needed" while evaluating

    "formatLang(line['x_needed'], dp='Account', currency_obj=res_company.currency_id)"

Can someone help me to solve this problem please :

    <tr t-foreach="funct(o, data['form'])" t-as="line">


    <span style="color: white;" t-esc="'... '*(line['status'] - 1)"/>

    <span t-esc="line['name']"/>



    <span t-esc="formatLang(line['x_needed'], dp='Account', currency_obj=res_company.currency_id)"/>


    <td class="text-right">

    <span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/>


Thank you in advance.

Krupesh Laiya
On 3/9/16, 7:45 AM

you need to override that report by using following:






name="YOUR MODULE NAME.report_budget"

file="YOUR MODULE NAME.report_budget"



pls try this if not working then kindly post your error.

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: 3/9/16, 5:21 AM
Seen: 503 times
Last updated: 3/9/16, 7:45 AM