This question has been flagged
6 Replies
36895 Views

Hi all,

I'm using Odoo 10 with Purchase module. How can I customize the format of decimal number?

E.g: the Unit Price and Total, Sub Total... The current number format is 27,000.00, I want to change it to 27,000

Does anyone has experience with this?

Avatar
Discard
Author Best Answer

hi  Jainesh Shah,

I tried set the Product Price decimal digits to 0, but only affect to Unit Price, the Total and Subtotal still have decimal digits.


Avatar
Discard
Best Answer

Hi everyone! I am having a similar issue. Would it be possible to change this but on the Inventory and Manufacturing modules?
I work with products that will always be integers, but those two modules always show units as 5.00
I want it to be displayed as 5

From your answers above, I have tried changing the Settings -> Technical -> Database Structure -> Decimal Accuracy, and in particular the Product unit of measure to 0 decimals.
An error message appears saying "You are setting a Decimal Accuracy less precise than the UOMs".

Any ideas on how to change it?

Thank you a lot in advance! 

Avatar
Discard
Best Answer

If you want to remove decimal in product you can do by set zero in decimal accuracy from Settings -> Technical -> Database Structure -> Decimal Accuracy

if you want to remove zero in total and subtotal you have to set decimal places in your currency by the some hack in database table res_currency, you have to change column decimal_places to zero.

Avatar
Discard
Best Answer

Hello Odooers,

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.

Steps to change Subtotal fields (Monetary) decimal accuracy from 2 digit to 3 digits:

1. Activate Multi Currency from General Settings (Settings > General Settings > Accounting ('Invoicing' If Community)), Now activate Multi-Currencies from Currencies section.

2. Now go to Accounting ('Invoicing' If Community) > Configuration > Accounting > Currencies.

3. In currency form change value 0.010000 to 0.001000 in Rounding Factor field and save record.

I hope this will helpful.

--
Regards
Haresh Kansara
Odoo Application Engineer
  


Avatar
Discard

hello.
I have a reverse case, I have the decimals like this
300,000 = which are displayed with the currency 0.001000
but the problem is that I want to return to the previous one but it is not possible.

300.00 = I need this 0.010000.

I was trying through the qweb document but the currency sign disappears and the igv could not locate it.

Do you have any clue about the solution?

Best Answer

Hi Vu,

The answer of Niyas is perfect once you will change the product price digits. for the subtotal and unit price go to the price list and Open the currency and change the rounding factor which will affect in unit and subtotal.


Thanks.

Avatar
Discard
Author

Thanks

Author

Hi Jainesh,

Thanks for your reply.

But there is another place where the decimal value still show is the sum of list view.

I set the rounding factor of currency to 0, the purchase order line show correctly. But in sum of list purchase order, it still contains the decimal value (.00).

How can I remove it?

Best Answer

Hi,

To adjust the decimal points , activate the developer mode and navigate to Settings -> Technical -> Database Structure -> Decimal Accuracy.

Adjust the number of decimal point from here.


Have a look at this link also : https://www.odoo.com/forum/help-1/question/sale-order-total-amount-to-three-decimal-places-116978

Thanks

Avatar
Discard
Author

Hi,

Yes, I can change the Product Price, but how can I change the format of "Total" or "Sub Total"? It still have 2 digits for decimal