how to changes field types in BOM from one2many to float ?
Esta pergunta foi sinalizada
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
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscrever-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
|
1
dez. 17
|
5371 | ||
|
Concatenate two fields in a third one
Resolvido
|
|
2
ago. 24
|
3740 | |
|
|
0
jan. 24
|
1998 | ||
|
|
3
set. 23
|
3511 | ||
|
Custom float field auto rounding?
Resolvido
|
|
4
set. 18
|
6142 |