Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2293 Prikazi

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
Opusti
Avtor

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
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
sep. 22
1557
2
dec. 23
1488
3
apr. 25
7965
1
feb. 24
2030
1
jan. 24
2000