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
""" Returns two lines whose amount are opposite """
        
        partner_id_condition = partner_id and 'AND a.partner_id = %(partner_id)s AND b.partner_id = %(partner_id)s' or ''
        query = """
                SELECT a.id, b.id
                FROM account_move_line a, account_move_line b
                WHERE a.amount_residual = -b.amount_residual
                AND NOT a.reconciled AND NOT b.reconciled
                AND a.account_id = %(account_id)s AND b.account_id = %(account_id)s
                {partner_id_condition}
                ORDER BY a.date asc
                LIMIT 10
            """.format(**locals())
        self.env.cr.execute(query, locals())
        pairs = self.env.cr.fetchall()
        
        all_pair_ids = [element for tupl in pairs for element in tupl]
        allowed_ids = set(self.env['account.move.line'].browse(all_pair_ids).ids)
        pairs = [pair for pair in pairs if pair[0] in allowed_ids and pair[1] in allowed_ids]
        
        if len(pairs) > 0:
            target_currency = (self.currency_id and self.amount_currency) and self.currency_id or self.company_id.currency_id
            lines = self.browse(list(pairs[0]))
            return lines.prepare_move_lines_for_reconciliation_widget(target_currency=target_currency)
        return []
    @api.model
    def domain_move_lines_for_reconciliation(self, excluded_ids=None, str=False):