Skip to Content
Menu
This question has been flagged
2 Replies
4212 Rodiniai

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

Portretas
Atmesti
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.

Portretas
Atmesti
Autorius 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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
gruod. 17
4567
2
rugp. 24
2541
0
saus. 24
1253
3
rugs. 23
2372
4
rugs. 18
5048