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/account_fiscalyear_close.py (+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: mp+114613@code.launchpad.net

Description of the change

Hello,

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.

Thanks

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 :

Hello,

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 https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-576210-port-mma/+merge/132490 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.

Thanks,
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
=== modified file 'account/wizard/account_fiscalyear_close.py'
--- account/wizard/account_fiscalyear_close.py 2012-02-09 17:03:33 +0000
+++ account/wizard/account_fiscalyear_close.py 2012-07-12 11:32:20 +0000
@@ -226,8 +226,9 @@
226 for account in obj_acc_account.browse(cr, uid, account_ids, context={'fiscalyear': fy_id}):226 for account in obj_acc_account.browse(cr, uid, account_ids, context={'fiscalyear': fy_id}):
227 balance_in_currency = 0.0227 balance_in_currency = 0.0
228 if account.currency_id:228 if account.currency_id:
229 cr.execute('SELECT sum(amount_currency) as balance_in_currency FROM account_move_line ' \229 cr.execute('SELECT COALESCE(sum(amount_currency),0.0) as balance_in_currency FROM account_move_line ' \
230 'WHERE account_id = %s ' \230 'WHERE account_id = %s ' \
231 'AND (debit <> 0.0 and credit <> 0.0) ' \
231 'AND ' + query_line + ' ' \232 'AND ' + query_line + ' ' \
232 'AND currency_id = %s', (account.id, account.currency_id.id))233 'AND currency_id = %s', (account.id, account.currency_id.id))
233 balance_in_currency = cr.dictfetchone()['balance_in_currency']234 balance_in_currency = cr.dictfetchone()['balance_in_currency']