Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
7654 Widoki

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? 

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
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?

Najlepsza odpowiedź

Hello,

Try this

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


Thanks & Regards

Awatar
Odrzuć
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

Powiązane posty Odpowiedzi Widoki Czynność
2
wrz 16
3170
4
mar 16
5621
0
maj 15
164
1
mar 15
5887
1
mar 15
6707