Merge lp:~openerp-dev/openobject-addons/6.0-opw-578072-han into lp:openobject-addons/6.0

Proposed by Hardik Ansodariya (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 5340
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-578072-han
Merge into: lp:openobject-addons/6.0
Diff against target: 16 lines (+1/-4)
1 file modified
account/wizard/account_fiscalyear_close.py (+1/-4)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-578072-han
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+126939@code.launchpad.net

Description of the change

Fixed the issue of fiscal year.

SQL request get all period before date_stop to select entry lines which
are used to calculate initial foreign currency amount.

So opening entries of new year will be wrong.

e.g if there are 2010,2011,2012 fiscal year.

If we want to close 2011 year and generate a entries for 2012 but it will brings both the year 2010,2011 so opening entries of 2012 will not math with closing year 2011.

With reference of Maintenance case: 578072

Thanks

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

Unmerged revisions

5340. By Hardik Ansodariya (OpenERP)

[FIX] account: Fixed the issue of close fiscal year (Maintenance case: 578072)

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 2012-04-27 06:57:05 +0000
3+++ account/wizard/account_fiscalyear_close.py 2012-09-28 11:57:37 +0000
4@@ -93,11 +93,8 @@
5 obj_acc_move_line.unlink(cr, uid, move_line_ids, context=context)
6 obj_acc_move.unlink(cr, uid, move_ids, context=context)
7
8- cr.execute("SELECT id FROM account_fiscalyear WHERE date_stop < %s", (str(new_fyear.date_start),))
9- result = cr.dictfetchall()
10- fy_ids = ','.join([str(x['id']) for x in result])
11 query_line = obj_acc_move_line._query_get(cr, uid,
12- obj='account_move_line', context={'fiscalyear': fy_ids})
13+ obj='account_move_line', context={'fiscalyear': old_fyear.id})
14 #create the opening move
15 vals = {
16 'name': '/',