You are here: Home OpenERP Problems and solutions The balance of the bank statement with foreign currencies is wrong
Search
Advanced Search…
E-Mail

Webmail: webmail.wyden.com

E-Mail Preferences: postfix.wyden.com/users

E-Mail Administration: postfix.wyden.com

Statistics
Total: 463
Total Pages: 284
Total Folders: 87
Total Files: 18
Total Links: 26
Last modification: 03.02.2012 16:00
 

The balance of the bank statement with foreign currencies is wrong

by Wyden Silvan last modified 02.06.2010 08:33

In the file account_bank_statement.py the function "_end_balance" is wrong. When you have entries in foreign currencies it doesn't take the date from the move line. So after the confirmation of the bank statement, the end balance change and the real balance and the calculated balance doesnt much any more.

I have found a solution that seems to work. I submit the date of the move line and round the amount:

Line 30:
from tools import config

Line 66:
res[statement.id] += round(res_currency_obj.compute(cursor,
                                user, company_currency_id, currency_id,
                                line.debit, context={'date': line.date}),int(config['price_accuracy']))
Line 75:
 res[statement.id] -= round(res_currency_obj.compute(cursor,
                                user, company_currency_id, currency_id,
                                line.credit, context={'date': line.date}),int(config['price_accuracy']))

launchpad bug numbers?

Posted by Anonymous User at 23.06.2010 20:18
When you write about bugs/workarounds could you please provide the corresponding bug numbers under which the issue can be tracked after you wrote about it.

launchpad bug numbers?

Posted by Wyden Silvan at 24.06.2010 07:46
You are right! Here is the coresponding link: https://bugs.launchpad.net/openobject-addons/+bug/588604