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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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?
Hi,
Try assigning ids of "employee_ids" instead of its object, as follows: self.employee_ids = [(6, 0, employee_ids.ids)]
Hope it helps
| 관련 게시물 | 답글 | 화면 | 활동 | |
|---|---|---|---|---|
|
0
9월 22
|
1948 | |||
|
2
12월 23
|
2166 | |||
|
1
11월 25
|
422 | |||
|
Website Search bar
해결 완료
|
3
4월 25
|
8997 | ||
|
1
2월 24
|
2718 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
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)]