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.

0

decimal precision and calculation

By
fati
on 5/6/13, 12:47 PM 1,611 views

i've changed the decimal precision for the cost_price. i put it to 4. but, when I make a new purchase for a product, the calculation of the new cost_price is based on 2 decimals then it is displayed on 4 Decimals.

What can I do to adjust the problem?

An exple: having put the decimal precision "product price" and "account" to 4 and the method of calculating cost to "average price". I make simulation of a computing cost for Article X.

I start with qty in stock: 149 cost price = 340.8322

new acquisition: qty = 23 purchase price = 326.22

after receipt, result: qty = 172 cost = 338.8763

manual calculation I found: qty = 172 and cost = 338.8782 which is <> that gave OpenERP.

I round cost price to 2 and recalculate.I find the same value OpenERP: ((149 * 340.83 + 23 * 326.22) / (149 +23) = 338.8763 that's the pb

fati
on 5/8/13, 7:28 AM
1

patrick

--patrick--
1958
| 5 4 7
Baarn, Netherlands
--patrick--
patrick
On 5/6/13, 5:35 PM

What is the currency you are using? I can imagine that when the currency is less than 4 (EURO for example is 2), it will show nothing more than 2, becuase that is what the currency is doing.

i use DZD. what can i do plz?

fati
on 5/7/13, 7:56 AM
0
fati
On 5/8/13, 7:35 AM

I prefer give An exple to explain the problem: having put the decimal precision "product price" and "account" to 4 and the method of calculating cost to "average price". I make simulation of a computing cost for Article X.

I start with qty in stock: 149 cost price = 340.8322

new acquisition: qty = 23 purchase price = 326.22

after receipt, result: qty = 172 cost = 338.8763

manual calculation I found: qty = 172 and cost = 338.8782 which is <> that gave OpenERP.

I round cost price to 2 and recalculate.I find the same value OpenERP: ((149 * 340.83 + 23 * 326.22) / (149 +23) = 338.8763

So, I feel OpenERP although the decimal precision is 4, it rounds to 2 before calculating which gives a false result

have you modified the rounding factor of the currency? you might need to do that if you want your computations to be correct.

Gilles Major (gim)
on 5/14/13, 5:43 AM

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

0 follower(s)

Stats

Asked: 5/6/13, 12:47 PM
Seen: 1611 times
Last updated: 3/16/15, 8:10 AM