Merge lp:~kinner-vachhani/openobject-addons/6.1-fiscal-year-periods-sorting-fix into lp:openobject-addons/6.1
Status: | Needs review |
---|---|
Proposed branch: | lp:~kinner-vachhani/openobject-addons/6.1-fiscal-year-periods-sorting-fix |
Merge into: | lp:openobject-addons/6.1 |
Diff against target: |
21 lines (+2/-2) 1 file modified
account/wizard/account_chart.py (+2/-2) |
To merge this branch: | bzr merge lp:~kinner-vachhani/openobject-addons/6.1-fiscal-year-periods-sorting-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+169443@code.launchpad.net |
Description of the change
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.
Unmerged revisions
- 7221. By Kinner Vachhani
-
[Fix] fiscal year periods are not sorted properly