Hello,
I dont know how to change many2one field in onchange method.
What i need to do is: when someone is creating a new invoice and changing currency, bank account changing in the same time. I'm using exception to have a look at the value of partner_bank_account.
@api.onchange('currency_id')
def currency_id_change(self):
if self.currency_id:
return {
'value': {
'partner_bank_id': ????????????????,
}
}
raise except_orm(('Warning!'), (self.partner_bank_id))