跳至内容
菜单
此问题已终结
2416 查看

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.

形象
丢弃
相关帖文 回复 查看 活动
1
11月 24
20798
1
9月 23
3598
3
5月 23
6203
7
4月 23
49594
1
12月 22
8296