Chart of accounts - fiscal year periods are not sorted properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Incomplete
|
Undecided
|
Unassigned | ||
credativ-openerp |
New
|
Undecided
|
Unassigned |
Bug Description
Account period is sorted on ID and not opening period.
The code in onchange handler for fiscalyear in wizard/
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
- OpenERP Core Team: Pending requested
-
Diff: 21 lines (+2/-2)1 file modifiedaccount/wizard/account_chart.py (+2/-2)
- Kinner Vachhani: Approve
-
Diff: 21 lines (+2/-2)1 file modifiedaccount/wizard/account_chart.py (+2/-2)
- OpenERP Core Team: Pending requested
-
Diff: 21 lines (+2/-2)1 file modifiedaccount/wizard/account_chart.py (+2/-2)
Changed in credativ-openerp: | |
assignee: | Kinner Vachhani (kinner-vachhani) → nobody |
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!