Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3535 Vistas

can we related a field to a related field ?

I did 1st object:

_columns = { 'sale_price_unit': fields.related('sale_line_id','price_unit',string='Prix de vente',type='float', store=True, readonly=True), }

2nd object:

_columns={ 'sale_price_unit': fields.related('procurement_id','sale_price_unit',string='Prix de vente',type='float', store=True, readonly=True), }

the value of the 2nd object alwayse equal 0.0 !!

Avatar
Descartar
Autor Mejor respuesta

Solution

_columns={

'sale_price_unit': fields.related('procurement_id','sale_line_id','price_unit',string='Prix de vente',type='float', store=True, readonly=True),

}

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
jun 18
3794
2
nov 16
6001
1
ene 19
3457
0
may 17
2896
1
oct 23
1681