Skip to Content
Menú
This question has been flagged
2 Respostes
4169 Vistes

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

Avatar
Descartar
Best Answer

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
Descartar
Autor Best Answer

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

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

please help me

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de des. 17
4529
2
d’ag. 24
2451
0
de gen. 24
1214
3
de set. 23
2308
4
de set. 18
5008