Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
4159 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Autor Nejlepší odpověď

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

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

please help me

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
pro 17
4523
2
srp 24
2450
0
led 24
1206
3
zář 23
2307
4
zář 18
5007