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'?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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'?
Don't use an ID.
models.execute_kw(db, uid, password, 'res.partner', 'unlink', [[]])
Why [[]] instead of []?
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.
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)
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
0
nov. 18
|
2362 | ||
|
2
nov. 18
|
8139 | ||
|
1
set. 17
|
3543 | ||
XMLRPC create picklist in odoo 10 API
Resolvido
|
|
3
ago. 17
|
5668 | |
|
0
mai. 23
|
2187 |