Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2252 Tampilan

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
Buang
Penulis

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)]

Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
0
Sep 22
1522
2
Des 23
1458
3
Apr 25
7859
1
Feb 24
1942
1
Jan 24
1940