[FIX] account: chart of account opening period selection

If a special period is present, it must be selected fist
Fixes #3946
This commit is contained in:
vrenaville 2014-11-28 14:01:50 +01:00 committed by Martin Trigaux
parent 419d934143
commit 13d0934f34
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class account_chart(osv.osv_memory):
FROM account_period p
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
WHERE f.id = %s
ORDER BY p.date_start ASC
ORDER BY p.date_start ASC, p.special DESC
LIMIT 1) AS period_start
UNION ALL
SELECT * FROM (SELECT p.id