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

I imported bank statements by default import from csv file.

In the file the amount is -20.58 but in database I see -20.580000000000002.

What's wrong with numbers in Odoo?

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

As I understand this is due to float type used for numbers.

Float type is not precise!!!

Details are here https://docs.python.org/2/tutorial/floatingpoint.html

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

use widget="integer" ..........

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

It's like a makeup, numbers are still not precise.

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 20
7746
4
thg 3 16
5689
0
thg 5 15
164
1
thg 3 15
5951
1
thg 3 15
6760