Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6507 Lượt xem

Hello everyone.
I have no experience with qweb, that's why I need help.
i am trying to show only 2 decimals in the invoice but i could only do it with one field:

t-options="{'widget': 'float', 'precision': 2}"


but the other values ​​I can't identify

or I don't know how to identify them.

Thanks in advance

https://docs.google.com/document/d/1DI7gZsA_WweaB62RpOqQbhzpwA4cgc2euAPzbXFixB8/edit?usp=sharing

Ảnh đại diện
Huỷ bỏ

Thanks for your valuable information.SARATH V C

Câu trả lời hay nhất

You can use the following format inside the qweb.

Syntax:

t-esc="round(field_name, decimal_precision)"

Example :

t-esc="round(your_field,2)" this will round to two decimals.  


Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks for your help, how could I do it if you could exemplify it please. I have no experience in qweb :(

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 11 24
3283
2
thg 10 20
3756
1
thg 1 24
1887
1
thg 4 23
4105
1
thg 2 19
7781