How to set Odoo invoice default journal to null on the invoices?
<p>I want the client to be force to choose the journal in the invoice form view and not to have the first pre-selected.</p>

<p>Which is the correct way to remplace default, on the partner_id field change the the default journal choose event is tigger.</p>

<p><strong>Edit</strong></p>

<p>If I try to override the onchange_partner_id function I get the following error:</p>

<pre><code>File "/opt/PycharmProjects/gca_odoo/clientes/client_PRINCE/models.py", line 22, in onchange_partner_id
    self.journal_id = False
  File "/opt/PycharmProjects/gca_odoo/3party/server/openerp/fields.py", line 847, in __set__
    record.ensure_one()
  File "/opt/PycharmProjects/gca_odoo/3party/server/openerp/models.py", line 5306, in ensure_one
    raise except_orm("ValueError", "Expected singleton: %s" % self)
except_orm: ('ValueError', 'Expected singleton: account.invoice()')
</code></pre>

<p>I use the following code:</p>

<pre class="lang-py prettyprint-override"><code>class account_invoice(models.Model):
    _inherit = 'account.invoice'

    @api.multi
    def onchange_partner_id(self, type, partner_id, date_invoice=False,payment_term=False, partner_bank_id=False, company_id=False):
        ret = super(account_invoice,self).onchange_partner_id(type=type, partner_id= partner_id,
        date_invoice=date_invoice,payment_term=payment_term, partner_bank_id=partner_bank_id, company_id=company_id)
        self.journal_id = False
        return ret
</code></pre>