Skip to Content
Menú
This question has been flagged
1 Respondre
2255 Vistes

i had a list of employee then the create a ticket form request any parameter of this employee.

i create a button to generate a list of employee match the parameter.

how to show this list inside the same form below?

Avatar
Descartar
Autor

can i use ?
@py
employee_ids = fields.Many2many(
comodel_name='employee',
compute='_compute_employee',
string='employee Search Result',
)

@api.model
def _compute_employee(self):
employee_ids = self.env['employee'].search(
[
('active', '=', True),
])

self.employee_ids = [(6, 0, employee_ids)]

Best Answer

Hi,

Try assigning ids of "employee_ids" instead of its object, as follows: self.employee_ids = [(6, 0, employee_ids.ids)]


Hope it helps

Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
de set. 22
1531
2
de des. 23
1458
3
d’abr. 25
7866
1
de febr. 24
1951
1
de gen. 24
1942