Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2274 Vues

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
Ignorer
Auteur

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

Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
0
sept. 22
1548
2
déc. 23
1469
3
avr. 25
7906
1
févr. 24
1988
1
janv. 24
1958