Odoo Help


Controlling decimal precision, inconsistency betwen sales order and invoice form and their printed document

Acar Nila
on 3/27/13, 12:14 AM 7,795 views

Controlling the decimal precision is somewhat very tricky in OpenERP. As an example I want to wipe out the decimal number from all (pricelist, unit price, UoM, UoS, subtotal, tax, etc).

After I adjust it in the Settings --> Database Structure --> Decimal Accuracy (Product Price, Discount, Account, Product Unit of Measure, Product UoS) to become 0 digit, I found that in the Quotation, Sales Order, and Invoice form the "Untaxed Amount", "Taxes", and "Total" still displaying 2 digit decimal precision.

If I print the Quotation or Sales Order, I got the "Quantity" having 2 decimal digit, while "Untaxed Amount", "Taxes", and "Total" and the others don't have decimal digit.

If I print the Invoice I found that the "Quantity" and "Unit Price" have 2 decimal digit, but "Untaxed Amount", "Taxes", and "Total" and the others don't have any decimal digit.

How to make them consistence accross all the form and the printed version ?

I find the same problem. If I put in 6 digits for the Product Price in Settings/Database Structure/Decimal Accuracy, I can see that there are 6 digits in the product's sale price and purchase price, but when I actually use that product in an Expense report line, it shows 6 digits but rounds to 2 digits.

From the file hr_expense.py file, we see this line:

'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Product Price')),

so it looks like this is really where the precision setting is coming from. But where is the rounding coming from?

Tim Ingalls
on 4/5/13, 2:53 AM

It appears the rounding comes from two locations: 1) Settings/Miscellaneous/Currencies. When I choose USD and edit the rounding to 0.000001 (instead of the original 0.010000), I get an error message saying that it can't be more precise than the "Account" setting.

2) So going to Settings/Database Configuration/Decimal Accuracy I find the Account item and change it to 6 digits. Then I can save the USD rounding to 0.000001. But the problem is that I want the pricing to be accurate to 6 decimal digits, but when an invoice is finally created, I need to round the whole invoice to 2 digits. How?

Tim Ingalls
on 4/5/13, 3:32 AM

hey guys did you managed to solve this problem

Erhuvwu Akpobaro
on 1/22/15, 9:46 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 3/27/13, 12:14 AM
Seen: 7795 times
Last updated: 10/25/17, 6:35 AM