Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
374 Vizualizări

Please who can help me to find the error in this function:


def get_inputs(self, cr, uid,ids, state,project, credit, context=None):

ret = []

obj = self.pool.get('project.service')

obj_ids = self.pool.get('project.service.line')

res = obj_ids.read(cr, uid, obj_ids, ['id', 'int_service','ext_service', 'unit_service', 'int_sevice_unit','ext_sevice_unit'], context)

for r in res :

inputs = {

'project_service_id': r['id'],

'int_services': r['int_service'],

'ext_services': r['ext_service'],

'state': states,

'project': projects,

'credit': credits,

'unit_services': r['unit_service'],

'int_sevices_unit': r['int_sevice_unit'],

'ext_sevices_unit': r['ext_sevice_unit'],

}

ret += [inputs]

return ret

Imagine profil
Abandonează
Autor Cel mai bun răspuns

Here where i call this function:


def on_change_state_id(self, cr, uid, ids, state,project, credit, context=None):

res = {'value':{'service_ids': self.get_inputs(cr, uid, ids, state, project, credit, context=context),

}

}

Imagine profil
Abandonează
Cel mai bun răspuns

There is not any issue in function but issues is there from where you are callling this function. you are not passing parameters properly.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mai 22
34429
0
mar. 19
4367
0
ian. 19
5465
4
feb. 24
12730
0
ian. 18
4229