Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
51856 Представления

Hello Friends,

Can anyone know how to cut down 2 digits after decimal,there actually in default displayed 4 digits in Qweb report.

For example:

if value is 123.4556 it will be cut down as 123.46

if value is 1456.0000 then it should displayed as 1456.00

Please help me to resolve this situation.Thanks in advance

Аватар
Отменить

Thanks so much for help.

Лучший ответ

Hello,

I Think it's helpful for you. 

<span t-esc="'%.2f'% l.product_uom_qty"/>

Thanks.

Аватар
Отменить
Лучший ответ

Hello 

You can take reference of below code

<span t-esc="sum(docs.mapped('amount'))" t-options='{"widget": "float", "precision": 2}'/>
Best Thanks,
Ankit H Gandhi.
Аватар
Отменить
Лучший ответ

Hello, you can use formatLang like that:


<div class="number-report">

<span t-esc="formatLang(line.price_subtotal, digits=2)"/>

</div>

Аватар
Отменить
Related Posts Ответы Просмотры Активность
4
мая 23
10532
1
янв. 19
9630
0
окт. 17
3464
0
нояб. 16
2718
0
окт. 16
4965