Odoo Help

Welcome!

This community 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.

8

How do I increase the number of decimals of a tax type?

By
Antonin Bourguignon (abo)
on 2/5/13, 9:05 AM 1,474 views

For instance: 0.09975 which should be 9.975% in Quebec, but currently rounds to 9.98, causing calculations to be off.

8

Antonin Bourguignon (abo)

--Antonin Bourguignon (abo)--
912
| 0 0 0
--Antonin Bourguignon (abo)--
Murder simulators enthusiast. http://gaming.stackexchange.com/users/15726/anto
Antonin Bourguignon (abo)
On 2/5/13, 10:38 AM

In order to avoid the annoying decimal rounding, open the tax in form view. In the Tax Definition tab, Tax Computation section, set the Tax Type to Python Code.

Following the example aboe, in the Python Code field, enter:

result = price_unit * 0.09975

And in the Python Code (reverse) field:

result = price_unit / 0.09975

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/5/13, 9:05 AM
Seen: 1474 times
Last updated: 3/16/15, 8:10 AM