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

XML-RPC getting child elements in the return

By
Nico Sap
on 8/27/14, 1:22 PM 884 views

I'm querying every invoice that is later then today with XML-RPC (OpenERP 7)

The command looks like this:

sock = xmlrpc.client.ServerProxy('http://openerp.sapico.me:8069/xmlrpc/object')
        args = [('state', '=', 'open'),('date_due','<',now_str),] 
        ids = sock.execute(dbname, uid, pwd, model, 'search', args)
        # READ PARTNER DATA
        fields = ['partner_id','date_invoice','date_due', 'state', 'invoice_line', 'amount_total',  'comment']

Is there a way to let XML-RPC include the child elements? Because all it returns right now (from the demo file), is this:

[{"date_due": "2014-08-11", "amount_total": 847.0, "date_invoice": "2014-07-12", "partner_id": [31, "Agrolait, Michel Fletcher"], "id": 4, "state": "open", "comment": false, "invoice_line": [8]}]

 

Because i can't find a lot of documentation about XML-RPC, i'd appreciate adding any resources (except the default CRUD+Search about res.partner) or any information about how i can execute SQL query's through XML-RPC.

Thanks in advance

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: 8/27/14, 1:22 PM
Seen: 884 times
Last updated: 3/16/15, 8:10 AM