Odoo Help
Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM
|
e-Commerce
|
Accounting
|
Inventory
|
PoS
|
Project management
|
MRP
|
etc.
xml-rpc search on many2many query
I want to search all res_users that belong to a certain res_company via xml-rpc. The test client is written in .net env. When i keep the search query simple like searching on the "login" field = 'login_name_x' this works fine.
String[] condition = new String[] { "login", "=", "name_x" };
ArrayList lstFilters = new ArrayList();
lstFilters.Add(condition);
Object[] resSearch = openERPproxy.search(dbname, userID, pwd,res.users",search", lstFilters.ToArray());
But i need to filter on de company_ids where a res_users records belongs to. So i tried following filter as i know there are res_users in company_id 3
String[] condition = new String[] { "company_ids", "=", "3" };
But this is not a working solution because it returns nothing?!
What is the correct approach to get xml-rpc do search filter on the many2xxx fields?
Hello Joeri,
use String[] condition = new String[] { "company_ids", "in", [3] };
Thanks,
Joeri, not sure how do you write a list([]) in .net but OpenERP will expect a list here as company_ids is a Many2many
You can find some examples of XMLRPC usage here ...
https://gist.github.com/t3dev/3016471
... and here ...
About This Community
This platform 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.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 5/7/13, 12:11 PM |
Seen: 3478 times |
Last updated: 3/16/15, 8:10 AM |