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)

vals['debit'] = amount < 0 and abs(amount) or 0.0
        vals['partner_id'] = self.env['res.partner']._find_accounting_partner(self[0].partner_id).id
        company_currency = self[0].account_id.company_id.currency_id
        writeoff_currency = self[0].currency_id or company_currency
        if 'amount_currency' not in vals and writeoff_currency != company_currency:
            vals['currency_id'] = writeoff_currency.id
            sign = 1 if vals['debit'] > 0 else -1
            vals['amount_currency'] = sign * abs(sum([r.amount_residual_currency for r in self]))
        
        first_line_dict = vals.copy()
        first_line_dict['account_id'] = self[0].account_id.id
        if 'analytic_account_id' in vals:
            del vals['analytic_account_id']
        
        second_line_dict = vals.copy()
        second_line_dict['debit'], second_line_dict['credit'] = second_line_dict['credit'], second_line_dict['debit']
        if 'amount_currency' in vals:
            second_line_dict['amount_currency'] = -second_line_dict['amount_currency']
        
        writeoff_move = self.env['account.move'].create({
            'journal_id': vals['journal_id'],
            'date': vals['date'],
            'state': 'draft',
            'line_ids': [(0, 0, first_line_dict), (0, 0, second_line_dict)],
        })
        writeoff_move.post()
        
        return writeoff_move.line_ids.filtered(lambda r: r.account_id == self[0].account_id)
    @api.model
    def compute_full_after_batch_reconcile(self):