Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
7719 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
feb 24
1926
0
lug 24
2950
0
lug 22
60
1
lug 22
2833
2
dic 23
33404