Odoo Help


Problem with api in version 7 and 8

on 6/1/15, 5:00 PM 496 views

I have problem with a functions. 

I create an onchange function using decorators in V:

def onchange_field(self):

but now need call this function onchange_field() from another module and need send to this some parameters, the problem is that this other module are the syntax is in V7, use parameters cr, uid and ids. But when send the parameters and modified the onchange function, do errors with 'self':

def onchange_field(self, param1=False, param2=False, param3=False):

in all parts that i used to assing some data, for example: 

self.office = self.employee.department.name or ' ' 
self.env.cr.execute(''' SQL querry''')

I try in many forms to use this but not find a solution for this, not know if need some vacation :) or if there are some thing that not remember for correct this.

Edit: Nothing ?

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 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

1 follower(s)


Asked: 6/1/15, 5:00 PM
Seen: 496 times
Last updated: 6/12/15, 3:20 PM