Skip to Content
Menu
This question has been flagged
1 Reply
2707 Views

Hello,

I have this function:

def get_domain_useer_id(self,cr,uid,context=None):

When i have called it in my XML file , as follows :

<field name="distributeur" on_change="get_domain_useer_id()"/>

I get this erreur : TypeError: get_domain_useer_id() takes at least 3 arguments (1 given)

Avatar
Discard
Best Answer

Dear Zakaria

def get_domain_useer_id(self,cr,uid,ids, distributeur=[],context=None):

Instead of

def get_domain_useer_id(self,cr,uid,context=None):

and use 

 

<field name="distributeur" on_change="get_domain_useer_id(distributeur)"/>
instead of 
<field name="distributeur" on_change="get_domain_useer_id()"/>

I hope I helped you...
Avatar
Discard