コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2285 ビュー

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?

アバター
破棄
著作者

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

最善の回答

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
1551
2
12月 23
1479
3
4月 25
7931
1
2月 24
1996
1
1月 24
1970