콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
12053 화면

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)

관련 게시물 답글 화면 활동
0
11월 18
2440
2
11월 18
8258
1
9월 17
3640
3
8월 17
5801
0
5월 23
2312