Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3551 Widoki

I have problem with a functions. 

I create an onchange function using decorators in V:

@api.onchange('field_name')
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':

@api.onchange('field')
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 ?

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
mar 15
4082
1
kwi 15
8510
0
mar 15
3747
1
mar 15
4186
1
mar 15
3396