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

Hi,

I would like to update a contact record with several tags (category_id).

This is my code :

id = 5404
TESLIST = [23, 30, 26]
contact_odoo_existing = MODELS.execute_kw(DB, UID, PASSWORD, 'res.partner', 'write', [[id], {
'category_id': [(6, 0, [TESLIST])]
}])

And this is the error i've got :

in write\n    new_links.update(pairs(act[2]))\nTypeError: unhashable type: \'list\'\n'>


Could you help me ?


アバター
破棄

Thanks a lot it works fin now !

最善の回答

You should pass list of IDs for the category_id field but you are passing list of list of IDs which is causing the error.

It should be as follow:

'category_id': [(6, 0, TESLIST)] 


アバター
破棄
関連投稿 返信 ビュー 活動
2
5月 22
10895
2
7月 23
3170
2
11月 21
13709
1
7月 18
7192
1
1月 18
5200