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

how to changes field types in BOM from one2many to float ?

아바타
취소
베스트 답변

Hi,

You need to redefine the field to change the field type using inheritance. 

E.g. :
Original one2many field:

class mrp_bom(osv.osv):
    _name = 'mrp.bom'
    _description = 'Bill of Material'
    _columns = {
       'bom_lines': fields.one2many('mrp.bom', 'bom_id', 'BoM Lines'),
    }
mrp_bom()
Do the following to change the field type to float:
class mrp_bom(osv.osv):
    _name = 'mrp.bom' 
   _description = 'Bill of Material'
    _inherit='mrp.bom'
    _columns={
        'bom_lines': fields.float(''BoM Lines'),
    }
mrp_bom()
Hope this may help you.

아바타
취소
작성자 베스트 답변

error, i cant login, because error in mrp.login

in _inherit='mail.thread' should i change into _inherit='mrp.bom' ??

please help me

아바타
취소
관련 게시물 답글 화면 활동
1
12월 17
4532
2
8월 24
2451
0
1월 24
1215
3
9월 23
2309
4
9월 18
5008