Skip to Content
Menu
This question has been flagged
1 Reply
934 Views

How to write datas in res_partner_res_partner_category_rel table using xmlrpc. After run script getting xmlrpc.client.Fault: <Fault 2: "Object res_partner_res_partner_category_rel doesn't exist"> error

Avatar
Discard
Author Best Answer

Finally I find the solution.

search_category_id = models_1.execute_kw(db1, uid_db1, password1, 'res.partner.category', 'search', [[['id', '=', row[16]]]])
print("Category ID",search_category_id)


new_name_id = ''
new_id = 13228
search_name_id = models_1.execute_kw(db1, uid_db1, password1, 'res.partner', 'search', [[['id', '=', 13228]]])
if search_name_id:
for name_id in search_name_id:
new_name_id = name_id
a = models_1.execute_kw(db1, uid_db1, password1, 'res.partner', 'write', [new_name_id, {
'responsible': row[17],
'category_id' : [(6, 0, [search_category_id])],
}])


Avatar
Discard