Skip to Content
Menu
This question has been flagged
1 Reply
5027 Views

Hi.

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 :

    <thead>

    <tr>

    <th>Description</th>

    <th>Needed</th>

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

    </tr>

    </thead>  

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">

     <td>

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

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

    </td>

    <td>

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

    </td>

    <td class="text-right">

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

    </td>  


Thank you in advance.

Avatar
Discard
Best Answer

you need to override that report by using following:


 <report

id="account_budget.action_report_budget"

model="account.budget.post"

string="Budget"

report_type="qweb-pdf"

name="YOUR MODULE NAME.report_budget"

file="YOUR MODULE NAME.report_budget"

menu="False"

/>


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

Avatar
Discard