Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Many2Many relationship via XML-RPC JAVA

on 9/1/15, 5:47 AM 481 views

I'm using OpenERP 7.0 and I want to set a ManyToMany relationship between my objects in XML-RPC.

According to the documentation (Unfortunately for Odoo 8.0 and OpenERP 6.0) , I have to use special commands that permit to edit those relationships.

For example to set a new ManyToMany relationship I have to use this triplet :  

(6, _, ids)

Here is my code to create a new message in OpenERP.

    models.execute("execute_kw", asList(
db, uid, password,
"mail.message", "create",
asList(new HashMap() {{
put("author_id", 10);
put("partner_ids", asList(asList(6, 0, asList(34,54,56))));
put("subject", "This is a subject");
put("body", "This is the body");

The message is created in OpenERP but the ManyToMany relationship is not set.

So my question is what I'm doing wrong when I want to set this relationship in Java via XML-RPC.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 9/1/15, 5:47 AM
Seen: 481 times
Last updated: 9/1/15, 5:47 AM