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
=== modified file 'account/wizard/account_fiscalyear_close.py'
--- account/wizard/account_fiscalyear_close.py 2013-12-03 14:48:43 +0000
+++ account/wizard/account_fiscalyear_close.py 2014-03-04 05:56:11 +0000
@@ -132,7 +132,7 @@
132 FROM account_account a132 FROM account_account a
133 LEFT JOIN account_account_type t ON (a.user_type = t.id)133 LEFT JOIN account_account_type t ON (a.user_type = t.id)
134 WHERE a.active134 WHERE a.active
135 AND a.type != 'view'135 AND a.type not in ('view','consolidation')
136 AND a.company_id = %s136 AND a.company_id = %s
137 AND t.close_method = %s''', (company_id, 'unreconciled', ))137 AND t.close_method = %s''', (company_id, 'unreconciled', ))
138 account_ids = map(lambda x: x[0], cr.fetchall())138 account_ids = map(lambda x: x[0], cr.fetchall())
@@ -182,7 +182,7 @@
182 FROM account_account a182 FROM account_account a
183 LEFT JOIN account_account_type t ON (a.user_type = t.id)183 LEFT JOIN account_account_type t ON (a.user_type = t.id)
184 WHERE a.active184 WHERE a.active
185 AND a.type != 'view'185 AND a.type not in ('view','consolidation')
186 AND a.company_id = %s186 AND a.company_id = %s
187 AND t.close_method = %s''', (company_id, 'detail', ))187 AND t.close_method = %s''', (company_id, 'detail', ))
188 account_ids = map(lambda x: x[0], cr.fetchall())188 account_ids = map(lambda x: x[0], cr.fetchall())
@@ -211,7 +211,7 @@
211 FROM account_account a211 FROM account_account a
212 LEFT JOIN account_account_type t ON (a.user_type = t.id)212 LEFT JOIN account_account_type t ON (a.user_type = t.id)
213 WHERE a.active213 WHERE a.active
214 AND a.type != 'view'214 AND a.type not in ('view','consolidation')
215 AND a.company_id = %s215 AND a.company_id = %s
216 AND t.close_method = %s''', (company_id, 'balance', ))216 AND t.close_method = %s''', (company_id, 'balance', ))
217 account_ids = map(lambda x: x[0], cr.fetchall())217 account_ids = map(lambda x: x[0], cr.fetchall())