Skip to Content
Menu
This question has been flagged
1 Atsakyti
2318 Rodiniai

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?

Portretas
Atmesti
Autorius

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
rugs. 22
1566
2
gruod. 23
1511
3
bal. 25
8006
1
vas. 24
2055
1
saus. 24
2038