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

I have a table which has the field defined as (Odoo 10),

total_amount= fields.Float('Total Amount', digits=(16, 4))

It stores amount eg. 5.0000

but when I read from orm method it trailing the zero ie.

self.env['...'].search([])[0].total_amount
it gives 5.0

I want to read as it is ie. 5.0000
Any idea how I can do that, I don't want to format it to every place while reading the value.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 24
20845
1
thg 9 23
3644
3
thg 5 23
6246
7
thg 4 23
49625
1
thg 12 22
8321