Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
386 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

}

}

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 22
34460
0
thg 3 19
4382
0
thg 1 19
5468
4
thg 2 24
12751
0
thg 1 18
4239