Chart of accounts - fiscal year periods are not sorted properly

Bug #1190773 reported by Kinner Vachhani on 2013-06-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Account period is sorted on ID and not opening period.

The code in onchange handler for fiscalyear in wizard/ sort period based on start and end date regardless of special period.

Code module sorting code:
ORDER BY p.date_start ASC
ORDER BY p.date_stop DESC

This causes a bug in the situation where the opening period has a higher ID than the first normal period in the year

Steps to produce bug:
* Create a new fiscalyear
* Open the chart of accounts wizard and verify that the opening period is shown as first period
* Remove the opening period
* Create a new opening period (date_start is first day of the year, special=true)
* Open the chart of accounts wizard
* The first period shown is no longer the opening period

The resulting chart of accounts is incorrect because opening balances are not shown.

Related branches

Changed in credativ-openerp:
assignee: Kinner Vachhani (kinner-vachhani) → nobody
Amit Parik (amit-parik) wrote :

Hello Kinner,

I disagree with the bug as well as the branch too because see the query that indicates that the on start_date date will be comes with the ascending date of the fiscal year means sorted date of the fiscal year as well as end date will return the last date of the selected fiscal year which is quite better. Its sorted based on date not on the ID.

I checked your patch you have used the special field which is for opening/closing period. What will happen suppose someone didn't check that checkbox when creating a first period and last period?

I have attached the video which will be more clear.

Would you please check and let us know about your opinion on this.

Thank you!

Amit Parik (amit-parik) wrote :
Changed in openobject-addons:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers