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

Hi

I want insert value in many2many through xmlrpc , i make call that read value from xml file i have pass value in xml file like <category_ids> [[6, False, [3, 8]]]</category_ids> but it not link with category_ids, any help????

Avatar
Ignorer
Meilleure réponse

You have mixed parentheses and brackets

## we just search for the ids of all categories
ids = sock.execute(dbname, uid, pwd, 'res.partner.category', 'search', [])
## or specific categories
ids = sock.execute(dbname, uid, pwd, 'res.partner.category', 'search', [('name', 'like', 'cate%')])

partner_data = {'name':'Provider2', 'category_id': [(6, 0, ids)]}
partner_id = sock.execute(dbname, uid, pwd, 'res.partner', 'create', partner_data)
Avatar
Ignorer
Publications associées Réponses Vues Activité
1
févr. 24
1891
0
juil. 24
2896
0
juil. 22
60
1
juil. 22
2789
2
déc. 23
33344