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! -- You received this bug notification because you are a member of OpenERP Indian Team, which is subscribed to OpenERP Addons. https://bugs.launchpad.net/bugs/1190773 Title: Chart of accounts - fiscal year periods are not sorted properly Status in OpenERP addons & packages developed by credativ: New Status in OpenERP Addons (modules): Incomplete Bug description: Account period is sorted on ID and not opening period. The code in onchange handler for fiscalyear in wizard/account_chart.py 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. To manage notifications about this bug go to: https://bugs.launchpad.net/credativ-openerp/+bug/1190773/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~openerp-india Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-india More help : https://help.launchpad.net/ListHelp

