Odoo Help


When i change combobox ,the error "'int' object has no attribute 'get'"

lam a bao
on 11/21/13, 3:46 AM 1,111 views

Hi everyone .

I have field ,it is a combobox :

  <field on_change="Changesystemdoor(codemoduel)" name="codemoduel"></field>

And function when changed :

 def Changesystemdoor(self,cr,uid,codemoduel,context=None):
    search_oj=process_oj.search(cr, uid, [('parent_id', '=',4)])
    data_oj=process_oj.read(cr, uid, search_oj, ['id', 'name'], context)
    return {'domain':{'codeproduct':[(chil['id'], chil['name']) for chil in data_oj]}}

when I change the value of the combobox ,the error : AttributeError: 'int' object has no attribute 'get' .

can you help me ?


Prajul P T
On 11/21/13, 3:56 AM

Hi, The arguments you have provided for onchange is not complete. It should be:

def Changesystemdoor(self,cr,uid,ids,codemoduel,context=None):

ids is missing. And there is also another bug. The domain you are passing is not valid. It should be of the form [('field', 'operator', 'value')]. eg: [('name', '=', 'test')]

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 11/21/13, 3:46 AM
Seen: 1111 times
Last updated: 3/16/15, 8:10 AM