I want populate select field in wizard on every @api.onchange('journal_id')
My example:
@api.multi
@api.onchange('journal_id')
def _populate(self):
lst = []
journals = self.env['account.move'].search([('journal_id','=',self.journal_id.id)])
for journal in journals:
lst.append((journal.id, journal.name))
return lst
journal_id = fields.Many2one('account.journal', 'Jornal', required=True)
journal_from = fields.Selection('_populate',string='Name')
After change journal_id in console get good result but can't bind select field.
Where is problem?