bzr revid: fp@tinyerp.com-20110924135906-6qs7b29z93xg8dg2
This commit is contained in:
Fabien Pinckaers 2011-09-24 15:59:06 +02:00
commit 7bd99a1b60
1 changed files with 2 additions and 0 deletions

View File

@ -68,6 +68,7 @@ class account_common_report(osv.osv_memory):
FROM account_period p
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
WHERE f.id = %s
AND p.special = false
ORDER BY p.date_start ASC, p.special ASC
LIMIT 1) AS period_start
UNION
@ -76,6 +77,7 @@ class account_common_report(osv.osv_memory):
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
WHERE f.id = %s
AND p.date_start < NOW()
AND p.special = false
ORDER BY p.date_stop DESC
LIMIT 1) AS period_stop''', (fiscalyear_id, fiscalyear_id))
periods = [i[0] for i in cr.fetchall()]