set a value to partner_bank_id on generated invoice...

The field partner_bank_id represents the destination account of an invoice (the company's account in case of a customer invoice or supplier refund and the partner's account in case of a supplier invoice or customer refund). This behaviour is set with the on_change on an invoice. For automatically generated invoices, set a value manually.