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 Search in inherit field

By
Sebastian782
on 9/1/15, 7:14 AM 535 views

Hi,

I created some inherit fields in res.partner but i don't how to search in this fields through XML-RPC.

I created my field like this:

from openerp import models, fields

class pb_it(models.Model):

    _inherit = 'res.partner'
    app_product_key = fields.Char(string='Product Key') 
XML-RPC return 
ValueError: Invalid field 'app_product_key' in leaf "<osv.ExtendedLeaf: ('app_product_key', '=', '4784-AZ44-Q123') on res_partner (ctx: ) 

If you have an idea :)

Thanks

can you put your xmlrpc calling code ? It is easy to find out an issue.

Emipro Technologies Pvt. Ltd.
on 9/1/15, 10:36 AM

Another idea is to be sure that the module that add the field are correctly installed or updated, the code is imported in the module and the model is correctly extended with the field. Perhaps the error is due to the res.partner model just don't know about the field due to the previous reasons

Axel Mendoza
on 9/1/15, 5:00 PM

Ok, my dev envirement die, so i reinstalled everything on a new computer, and now it work, so :)

Sebastian782
on 9/4/15, 4:36 AM
1

Anil R. Kesariya

--Anil R. Kesariya--
4321
| 6 5 8
Gandhinagar, India
--Anil R. Kesariya--
ERP Consultant

Key Skill
-
Technical & Functional Expert
Anil R. Kesariya
On 9/1/15, 11:09 AM

Hi Sebastian782,

There may be two possiblites of this error.

1) wrong syntax of domain. if we directly pass domain inside list [condition1, condition2] instead of list of tuples [(condition1), (condition2)] than odoo throws this kind of error.

2) Might be searching data with wrong class/model  it might give the leaf error.

Or provide your XML-RPC sample code which so can give you the exact solution for this.

Hope this might help.

Rgds,

Anil.




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: 9/1/15, 7:14 AM
Seen: 535 times
Last updated: 9/4/15, 4:36 AM