Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
4175 Visninger

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

Avatar
Kassér
Bedste svar

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.

Avatar
Kassér
Forfatter Bedste svar

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

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

please help me

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
dec. 17
4535
2
aug. 24
2451
0
jan. 24
1216
3
sep. 23
2310
4
sep. 18
5009