Skip to Content
Menu
This question has been flagged
2 Replies
6382 Views

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
Discard
Best Answer

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
Discard
Author

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?

Best Answer

Hello,

Try this

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


Thanks & Regards

Avatar
Discard
Author

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

Related Posts Replies Views Activity
2
Sep 16
2218
4
Mar 16
4773
0
May 15
164
1
Mar 15
5136
1
Mar 15
6009