콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
31569 화면

Dears:

my env is odoo V8 

i have many2many fields.. 

orders_id = fields.Many2many('mrp.production', relation='mrp_rel_mo')
order_list = self.env.cr.execute('select mrp_production_id from mrp_rel_mo where mrp_rel_mo_id = %s', (self.id))
data = {
     "order_list" = self.env.cr.fetchall()
}

but can't get order_list data....allways is None ....


아바타
취소
베스트 답변

Hi,

Please check table in pg admin and ensure the data is available. then try to execute the same query on the psql pan, this would helps to clear your doubts.

Update dict 'data' as

data = {

     "order_list" : order_list.fetchall()

}


Thanks

아바타
취소
베스트 답변

test=[]

self._cr.execute('select selecting filed from table name )
test.append(self._cr.fetchone())

try this

아바타
취소

temp_value= self._cr.execute('select * from std_table_print')

data={ "temp_value":temp_value.fetchall() }

but the result is none

관련 게시물 답글 화면 활동
1
2월 24
1425
1
10월 20
9615
0
3월 15
5822
0
3월 15
6872
2
8월 25
358