Impacted versions: 9.0, 9.0 enterprise

Steps to reproduce:
On current runbot duplicate any posted journal entry which is balanced

Current behavior:
Error message "Cannot create unbalanced entry" is shown

Expected behavior:
New Journal entry is created in state 'draft'

Video/Screenshot link (optional):
![selection_268](https://cloud.githubusercontent.com/assets/14974044/15007437/41f45a56-11d9-11e6-84f3-b297befaa521.png)

addons/account/models/account_move.py
FROM
                        account_move_line l
                        RIGHT JOIN account_account a ON (a.id = l.account_id)
                        RIGHT JOIN account_account_type at ON (at.id = a.user_type_id)
                        {2}
                    WHERE
                        a.reconcile IS TRUE
                        {3}
                        {4}
                        {5}
                        AND l.company_id = {6}
                        AND EXISTS (
                            SELECT NULL
                            FROM account_move_line l
                            WHERE l.account_id = a.id
                            {7}
                            AND l.amount_residual > 0
                        )
                        AND EXISTS (
                            SELECT NULL
                            FROM account_move_line l
                            WHERE l.account_id = a.id
                            {7}
                            AND l.amount_residual < 0
                        )
                    GROUP BY {8} a.id, a.name, a.code, {res_alias}.last_time_entries_checked
                    ORDER BY {res_alias}.last_time_entries_checked
                ) as s
            WHERE (last_time_entries_checked IS NULL OR max_date > last_time_entries_checked)
        """.format(