I code part as below :
class Selection(models.Model):
_name = 'selection.model'
_rec_name = 'select'
select = fields.Char(string='selections', required=True)
class Checks(models.Model):
_name = 'buy.goods'
strs = fields.Char()
results = fields.Many2one('selection.model', string='Selections')
@api.onchange('strs')
def _get_results(self):
goods = self.strs.split(',')
...
I want to show all items of 'goods' as selections of 'results' field; and when 'strs' field is changed, the selections of 'results' field should be updated at once. so how shall I code for this?