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
""" Create analytic items upon validation of an account.move.line having an analytic account. This
            method first remove any existing analytic item related to the line before creating any new one.
        """
        for obj_line in self:
            if obj_line.analytic_line_ids:
                obj_line.analytic_line_ids.unlink()
            if obj_line.analytic_account_id:
                vals_line = obj_line._prepare_analytic_line()[0]
                self.env['account.analytic.line'].create(vals_line)
    @api.one
    def _prepare_analytic_line(self):
        """ Prepare the values used to create() an account.analytic.line upon validation of an account.move.line having
            an analytic account. This method is intended to be extended in other modules.
        """
        amount = (self.credit or 0.0) - (self.debit or 0.0)
        return {
            'name': self.name,
            'date': self.date,
            'account_id': self.analytic_account_id.id,
            'unit_amount': self.quantity,
            'product_id': self.product_id and self.product_id.id or False,
            'product_uom_id': self.product_uom_id and self.product_uom_id.id or False,
            'amount': self.company_currency_id.with_context(date=self.date or fields.Date.context_today(self)).compute(amount, self.currency_id) if self.currency_id else amount,
            'general_account_id': self.account_id.id,
            'ref': self.ref,
            'move_id': self.id,
            'user_id': self.invoice_id.user_id.id or self._uid,
        }
    @api.model
    def _query_get(self, domain=None):