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

Hi everyone

I have :

class cvs_quotations_product(osv.osv):

_name="cvs.quotations.product"
def getcodesystemdoor(self, cr, uid, ids,fields, arg, context=None):
    x=[]
    getids= self.read(cr,uid,ids,['demomany2one'])[0]['demomany2one']
    get_oj=self.pool.get('product.category')
    search_oj=get_oj.search(cr, uid, [('id', '=',getids[0])])
    data_oj=get_oj.read(cr, uid, search_oj, ['parent_id'], context)
    for item in data_oj:
        for _item_child in item['parent_id']:
            if isinstance(_item_child,int):
                x.append(_item_child)
    return x
_columns={
    "demomany2one":fields.many2one("product.category","Chọn Hệ Vật Tư",translate=True),
    "codesystemdoor":fields.function(getcodesystemdoor,method = True, String='Demo')

}

cvs_quotations_product()

Result error : 'list' object has no attribute 'get'

Can you help me ?

아바타
취소