Friday, October 30, 2015

Set Decimal Accuracy in Odoo

Odoo provides you a facility to set Decimal accuracy for floating point fields. To set a value like 150.345 or 876.342 instead of 150.30 or 876.30, Odoo Provides you a facility to set Decimal accuracy by just configuring it. To set it, go to the Settings → Technical → Database Structure → Decimal Accuracy

You can see the list of records inside it with some ‘Digits’ value. They are created from Odoo code. You can create a new record inside it but it will not be effective until it has been set from Odoo code but you can update the existing Digits value as per our need. If you need to set digits only for Accounting purpose, you will have to set accuracy in below terms, as they are related to accounting:

To update the Unit Price – Set digit in 'Product Price' record.
To update the Discount - Set digit in ‘Discount’ record.
To update the Untaxed-Taxed-Total - Set digit in ‘Account’ record.
To update the Product Qty - Set digit in ‘Product Unit of Measure’ record.

You can see Invoices and Accounting Entries with 2 decimal points as per first screenshot as below:

So, if you want to set accounting for 3 digits, you have to set decimal accuracy for all of above terms and set it as 3 as shown below:

Once you set new decimal accuracy, Reload Odoo page. Now it will reflect in the Accounting terms.

So, by this way, you can configure decimal accuracy in odoo as per your need.

1 comment:

  1. Great article! I was looking for ways to overcome an awkward '% discount' rounding on SO/Invoices when using List Price based discounts. Decimal accuracy is a great cue: changing in test dbase the 'Product Price' and the 'Discount' decimal accuracy to 3 digits solved it!! Just worried that it might have unforeseen impact on accounting side, that i do not want! How can i trace undesired impacts?