Comment 6 for bug 870099

Revision history for this message
Bharat Devnani (Open ERP) (bde-openerp) wrote :

Hello Stéphane Bidoul,

Thanks for your time, I have checked your mentioned problem. But according to the latest changes made in trunk, user has to select Start Period and End Period manually due to the line pointed below which is in account_report_common.py.

cr.execute('''
                SELECT * FROM (SELECT p.id
                               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
                SELECT * FROM (SELECT p.id
                               FROM account_period p
                               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))

So, there are no chances that the start and end period are inverted through onchange, until p.special = false becomes true.

Hope this will help you.

Thanks & Regards,
Devnani Bharat R.