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.
I work in different environment where I connect to OpenERP v7 through the XML-RPC protocol, but I have one probleme, In my environment I can't pass a domain for example :
EXECUTE dbname="demo" user=1 pwd="admin" model="res.partner" method="search" args=[(1,'=',1)]
the types here are String (for dbname, pwd, model, method) and Integer (for user) but for args my environment doesn't accept object or array of object or list so I have to pass the string such as
EXECUTE dbname="demo" user=1 pwd="admin" model="res.partner" method="search" args="[(1,'=',1)]"
I want now that I catch this String in the method execute and evaluate the string to domain, but where can I find the source of this method
Thanks in advance
The same XMLRPC problem is addressed here for the connection with Talend "Big Data".
You have to overwrite the search (and also write, read, ..) function of the partner somehow like this:
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): if isinstance(args, str): args = eval(args) return super(res_partner, self).search(cr, uid, args, offset, limit, order, context=context, count=count)
If you want to have this for all objects, then you can also adapt
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 3/6/13, 6:10 AM|
|Seen: 1460 times|
|Last updated: 3/16/15, 8:10 AM|