Odoo Help


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.


Is there some conditions to respect to use widget in my qweb report?

Pascal Tremblay
on 2/19/16, 9:08 PM 1,130 views

Hello all, 

my new report is almost finished. But I did not manage to get only one widget working to format datas in this report. none

so may be i miss something

is there some important conditions to respect to get those widgets working?



Here is a easy test to show that widgets don't seem to work in my report.

In my report, I have put this code for diagnostic  :

<p>o = <span t-esc="o" /></p>

<p>currency = <span t-esc="currency" /></p>

<p>docs = <span t-esc="docs" /></p>

<p>doc_ids = <span t-esc="doc_ids" /></p>

<p>doc_model = <span t-esc="doc_model" /></p>

An here is the easy test I tried :

<t t-set="i" t-value="1666.435"/>

<td class="text-center" colspan="2"><span style="font-size: 20px;" t-esc="i"

t-field-options='{"widget": "monetary", "display_currency": "currency"}'/></td>

The result. See the variable currency is well defined.

Absolutely none dollar sign to the 1666.435 amount...


Since the beginning of my report conception, I ask to myself if I have the right docs, doc_ids and doc_model.

This report is launched from a wizard that I have made myself. Is it normal and correct that my docs and doc_model are  wizard.create.deposit (the model of the wizard)?

Is it normal that doc_ids is empty? 

My report works well even if I can't format with widgets in the qweb xml report.


Pascal Tremblay

--Pascal Tremblay--
| 5 2 7
Alma, Canada
--Pascal Tremblay--

Pascal Tremblay
On 2/20/16, 3:38 PM

YES!!!!! And YES again!

I have got result with this line :

<span t-esc="i" t-esc-options='{"widget": "monetary", "display_currency": "currency"}' />

Rather than this one :

<span t-esc="i" t-field-options='{"widget": "monetary", "display_currency": "currency"}' />

Strange thing however... the amount 1666.435 is rounded like 1666,43 $ and not like 1666,44 $. ??????

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)


Asked: 2/19/16, 9:08 PM
Seen: 1130 times
Last updated: 2/20/16, 4:44 PM