Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2257 Widoki

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?

Awatar
Odrzuć
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)]

Najlepsza odpowiedź

Hi,

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


Hope it helps

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
wrz 22
1537
2
gru 23
1458
3
kwi 25
7871
1
lut 24
1956
1
sty 24
1943