Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
7084 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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?

Risposta migliore

Hello,

Try this

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


Thanks & Regards

Avatar
Abbandona
Autore

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 correlati Risposte Visualizzazioni Attività
2
set 16
2745
4
mar 16
5180
0
mag 15
164
1
mar 15
5566
1
mar 15
6450