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

I am importing bank statement transactions. Because of the float type, I am losing precision. How can I import accurate data?

By
Artem
on 10/7/16, 9:13 AM 116 views

It's really annoying. Who decided to use the float type for numbers?

I'm importing over 5k of bank statement transactions with the end real balance calculation on the fly. Numbers are not precise! And what will be the error at the end? Only Allah knows.

The example is below.

USD, ID_17173/USD, [{'date': '2014-10-15', 'balance_start': 0, 'balance_end_real': 0.010000000000000009, 'transactions': [{'date': '2014-10-15', 'amount': -1.29}, {'date': '2014-10-15', 'amount': 1.3}]},{'date': '2014-10-16', 'balance_start': 0.010000000000000009, 'balance_end_real': 49.33, 'transactions': [{'date': '2014-10-16', 'amount': -2.57}, {'date': '2014-10-16', 'amount': 51.89}]},{'date': '2014-10-17', 'balance_start': 49.33, 'balance_end_real': 58.65, 'transactions': [{'date': '2014-10-17', 'amount': -1.29}, {'date': '2014-10-17', 'amount': 10.61}]},{'date': '2014-10-19', 'balance_start': 58.65, 'balance_end_real': 157.80999999999997, 'transactions': [{'date': '2014-10-19', 'amount': -4.33}, {'date': '2014-10-19', 'amount': 103.49}]},{'date': '2014-10-20', 'balance_start': 157.80999999999997, 'balance_end_real': 276.18999999999994, 'transactions': [{'date': '2014-10-20', 'amount': -5.75}, {'date': '2014-10-20', 'amount': 124.13}]}]


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: 10/7/16, 9:13 AM
Seen: 116 times
Last updated: 10/7/16, 10:18 AM