Merge lp:~openerp-dev/openobject-addons/6.1-opw-576210-nep into lp:openobject-addons/6.1

Proposed by Nehal Panchal (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6884
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-576210-nep
Merge into: lp:openobject-addons/6.1
Diff against target: 14 lines (+2/-1)
1 file modified
account/wizard/ (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-576210-nep
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email:

Description of the change


If you pay foreign currency invoices with foreign currency, it will generate debit and credit entry with amount 0.0. Due to this, Generate Opening Entries" wizard generates credit and debit entries with amount 0.0 at the time of balance transfer before closing the year.

This fixes the issue.


To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :


This bug was qualified as Confirmed on Trunk (means still existing and reproducible). A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Naresh Soni

Unmerged revisions

6884. By Nehal Panchal (OpenERP)

[FIX] account : Generate Opening Entries wizard should not generate credit and debit entries with amount 0.0 at the time of balance transfer before closing the year

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/wizard/'
2--- account/wizard/ 2012-02-09 17:03:33 +0000
3+++ account/wizard/ 2012-07-12 11:32:20 +0000
4@@ -226,8 +226,9 @@
5 for account in obj_acc_account.browse(cr, uid, account_ids, context={'fiscalyear': fy_id}):
6 balance_in_currency = 0.0
7 if account.currency_id:
8- cr.execute('SELECT sum(amount_currency) as balance_in_currency FROM account_move_line ' \
9+ cr.execute('SELECT COALESCE(sum(amount_currency),0.0) as balance_in_currency FROM account_move_line ' \
10 'WHERE account_id = %s ' \
11+ 'AND (debit <> 0.0 and credit <> 0.0) ' \
12 'AND ' + query_line + ' ' \
13 'AND currency_id = %s', (,
14 balance_in_currency = cr.dictfetchone()['balance_in_currency']