Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
7019 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

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?

Nejlepší odpověď

Hello,

Try this

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


Thanks & Regards

Avatar
Zrušit
Autor

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 Odpovědi Zobrazení Aktivita
2
zář 16
2700
4
bře 16
5137
0
kvě 15
164
1
bře 15
5523
1
bře 15
6418