跳至内容
菜单
此问题已终结

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
4520
2
8月 24
2450
0
1月 24
1206
3
9月 23
2307
4
9月 18
5007