Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2186 Visualizzazioni

Hello,

 

In Odoo 15, is it possible to globally set the number of decimal places in the pivot views?
Sure, by inheriting either the fields or the view individually it would be possible to change this, but it would be a lot of time to do it one by one for each pivot view separately.

 


Thanks for the replies


Avatar
Abbandona
Risposta migliore

Soluton 1 :"Decimal Places" in currency settings.I think if you are dealing with Monetary fields, then you dont need any code change, only need to set proper"Decimal Places" in currency settings
Solution 2: It will impact database table coumn propertiesYou can add your field with Decimal Accuracy with custom codes, and then precise as needed.
Solution 3 : It will be system wide and only for viewing purpose.All values of pivot is renderer after formating with a js method named , getFormattedValue(cell)The field could be relational(m2o) or non relational (char , var char)Lets say you are trying to see sales value , then it would be the toal amount grouped by your preferable measures.
So before rendering model sends the value to the pivot_rendererwhich uses the registry formater / So you need to bring changes to the registry category named "formatters"

Thanks & Regards, 

 

Brain Station 23 Ltd. 

Mobile: (+880) 1404055226 

Email: sales@brainstation-23.com 

Web: https://brainstation-23.com/ 

Address: (Building-1) 8th Floor, 2 Bir Uttam AK Khandakar Road, Mohakhali C/A, Dhaka 1212, Bangladesh 

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
lug 22
330
1
giu 22
3392
1
giu 25
1842
3
lug 25
3453
1
mag 25
1586