Merge lp:~openerp-dev/openobject-addons/7.0-opw-604593-pna into lp:openobject-addons/7.0

Proposed by Pinakin Nayi (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-604593-pna
Merge into: lp:openobject-addons/7.0
Diff against target: 30 lines (+3/-3)
1 file modified
account/wizard/account_fiscalyear_close.py (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-604593-pna
Reviewer Review Type Date Requested Status
Vincent Renaville@camptocamp (community) Approve
Naresh(OpenERP) Pending
Review via email: mp+209174@code.launchpad.net

Description of the change

Hello sir,

I improved account_fiscalyear_close.

If an account is set as consolidation, and as closin_method equal to balance, it will generated a opening entries for it , that is wrong.

In any case, no opening entries need to be generated for consolidation account.

Thanks,
pna

To post a comment you must log in.
Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

LGTM

review: Approve

Unmerged revisions

9860. By Vincent Renaville

[IMP]account_fiscalyear_close: exclude consolidated account from fiscal year close

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/wizard/account_fiscalyear_close.py'
2--- account/wizard/account_fiscalyear_close.py 2013-12-03 14:48:43 +0000
3+++ account/wizard/account_fiscalyear_close.py 2014-03-04 05:56:11 +0000
4@@ -132,7 +132,7 @@
5 FROM account_account a
6 LEFT JOIN account_account_type t ON (a.user_type = t.id)
7 WHERE a.active
8- AND a.type != 'view'
9+ AND a.type not in ('view','consolidation')
10 AND a.company_id = %s
11 AND t.close_method = %s''', (company_id, 'unreconciled', ))
12 account_ids = map(lambda x: x[0], cr.fetchall())
13@@ -182,7 +182,7 @@
14 FROM account_account a
15 LEFT JOIN account_account_type t ON (a.user_type = t.id)
16 WHERE a.active
17- AND a.type != 'view'
18+ AND a.type not in ('view','consolidation')
19 AND a.company_id = %s
20 AND t.close_method = %s''', (company_id, 'detail', ))
21 account_ids = map(lambda x: x[0], cr.fetchall())
22@@ -211,7 +211,7 @@
23 FROM account_account a
24 LEFT JOIN account_account_type t ON (a.user_type = t.id)
25 WHERE a.active
26- AND a.type != 'view'
27+ AND a.type not in ('view','consolidation')
28 AND a.company_id = %s
29 AND t.close_method = %s''', (company_id, 'balance', ))
30 account_ids = map(lambda x: x[0], cr.fetchall())