Odoo Help


How to format Amount Paid on customer invoices

Iming Chan
on 7/29/15, 3:24 AM 1,865 views

Dear all,

I'm new to Odoo 8 and Qweb, so I'm looking for help to get my customer invoice report right.

On this report, there is an "Amount Paid" field:

<td><strong>Amount Paid</strong></td>

<td class="text-right">AUD$

<span t-raw="o.amount_total - o.residual"/>

When I print the report (in PDF), it shows detail as "AUD$13.5" instead of "AUD$13.50" (with 2 decimal places to be consistant with rest of this report).  On the screen, it does show with two (2) decimal places (which is consistant with Australian currency practice).

Can anyone help to get this corrected?

Thank you again for your help in advance.  Much appreciated.

Kind regards,


On 7/29/15, 4:10 AM

Hii Iming Chan ,

May be this will help you. put this code instead yours.

<span t-raw="formatLang(o.amount_total - o.residual or 0, digits=2)"/> 

yannick yaskos
On 8/4/15, 10:49 PM

please i also have problem to interpred this code in my qweb report i new in  odoo v8 and i try to custum my quotation report

<tr class="border-black">


<td class="text-right">

<span t-field="o.amount_total" t-field-options="{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}"/>




This isn't hard to understand: -

; new row with black border - Total; new column with bold text "Total" - ; another column with text right oriented - ; in upper cell that has text right oriented value of database column amount_total that is 'monetary' formated (with thousand and decimal characters and currency symbol at the end)
on 8/5/15, 2:51 AM
On 8/4/15, 7:02 AM


I have the same problem in Odoo8 Qweb reporting.

Decimal Accuracy is set and it's working nicely if number in Qweb is defined as "t-field".

If you need to calculate or call function you need to do it with "t-esc" function and in that case number is not formatted correctly. As I saw, you can use "formalLang" but you have to wrap old RML parser with Qweb one as in "report_payslip".

But isn't this nonsense. We are throving away RML reporting in behalf of Qweb and now wrapping it again? What will happen in Odoo 9, will this solution work also (as I know there will be no support for RML)?

What can be done? Call a function and format a number on 'python' side ???

Thanks for any information or solution,


Juan Muñoz
On 7/29/15, 6:01 AM

Hi Iming,

In order to change the digits you must go to Settings/Technical/Database Structure/Decimal Accuracy and here can change all the fields digits.

In order to change the decimal or thousand separator, you must go to Settings/Translations/Languages, select your language and change the values.

Hope this will help you!



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/29/15, 3:24 AM
Seen: 1865 times
Last updated: 8/4/15, 10:49 PM