Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
7641 Tampilan

in odoo 12 i increase decimal to 3 in product standard price to 3 (0.000) but now odoo always round this number to 2 decimal ex:

if i write 0.123 odoo round the number to 0.120


How can i stop round in odoo12? 

Avatar
Buang
Jawaban Terbai

In your float fields digits parameter added? 

rate = fields.Float(digits=(12,3))

Please check the below link
http://learnopenerp.blogspot.com/2018/09/how-to-stop-auto-rounding-of-float-fields-in-odoo.html

Avatar
Buang
Penulis

thank you but my problem continue...

i change the core code

standard_price = fields.Float(

'Cost', compute='_compute_standard_price',

inverse='_set_standard_price', search='_search_standard_price',

digits=(12,3), groups="base.group_user",

help = "Cost used for stock valuation in standard price and as a first price to set in average/FIFO.")

now i have 3 decimal in cost

but still rounding into 2 decimal

if i edit the product the cost now come with 3 decimal if a type 0.123 and i save odoo automatically round the cost into 0.120

why?

Jawaban Terbai

Hello,

Try this

goto UoM(Unit of measurement) and set decimal precision as 2


Thanks & Regards

Avatar
Buang
Penulis

thank you but my problem continue...

i change the core code

standard_price = fields.Float(

'Cost', compute='_compute_standard_price',

inverse='_set_standard_price', search='_search_standard_price',

digits=(12,3), groups="base.group_user",

help = "Cost used for stock valuation in standard price and as a first price to set in average/FIFO.")

now i have 3 decimal in cost

but still rounding into 2 decimal

if i edit the product the cost now come with 3 decimal if a type 0.123 and i save odoo automatically round the cost into 0.120

why?

Hello,

hope it will work

goto sales configuration in that search your unit of measure and set rounding precision as 0.00100

thanks & regards

Post Terkait Replies Tampilan Aktivitas
2
Sep 16
3159
4
Mar 16
5618
0
Mei 15
164
1
Mar 15
5882
1
Mar 15
6702