İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
12017 Görünümler

As per Odoo 10 official documentation, the way to delete data from a model using XMLRPC is:

models.execute_kw(db, uid, password, 'res.partner', 'unlink', [[id]])

If I want to delete all res.partner records, what shall I use as 'id'?

Avatar
Vazgeç
En İyi Yanıt

Don't use an ID.

models.execute_kw(db, uid, password, 'res.partner', 'unlink', [[]])
Avatar
Vazgeç
Üretici

Why [[]] instead of []?

En İyi Yanıt
search_ids = models.execute_kw(db, uid, password, 'res.partner', 'search', [])
models.execute_kw(db, uid, password, 'res.partner', 'unlink', search_ids)

Hope this will help you.

Avatar
Vazgeç
Üretici

Ray's answer is faster to solve the specific issue, but using a search points how to select a given set of IDs (which might be really useful)

İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Kas 18
2422
2
Kas 18
8217
1
Eyl 17
3623
3
Ağu 17
5774
0
May 23
2281