Odoo Help

Welcome!

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.

0

Import partner tags into Odoo 7 using XML-RPC?

By
Daniel Kauffman
on 11/6/14, 10:14 PM 1,059 views

When importing partner tags into Odoo 7 using XML-RPC, the category_id field of the res.partner model is ignored.  Is this a bug?  Or is there some other way to import tags using XML-RPC?  The res_partner_category table has already been populated and now I just need to tag each partner with the proper tags.

0
Daniel Kauffman
On 11/7/14, 1:46 AM

Thanks to feketemihai's comment at https://github.com/odoo/odoo/issues/3509 I realized that I was using the wrong semantics for setting the field value.

This being my first deployment with Odoo, I found the use of the singular (category_id) as opposed to the plural (category_ids) for the field name confusing enough that I used the wrong semantics for setting the field value.

The following document shows the proper semantics for setting different types of field values:

https://doc.odoo.com/v6.0/developer/2_5_Objects_Fields_Methods/methods.html/

And the type of relationship (one2many, many2many, many2one) can be discovered by viewing the source files, in the case of the res.partner model the source file is:

openerp/addons/base/res/res_partner.py

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)

Stats

Asked: 11/6/14, 10:14 PM
Seen: 1059 times
Last updated: 3/16/15, 8:10 AM