Skip to Content
Menú
This question has been flagged
1 Respondre
3563 Vistes

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 Best Answer

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
Related Posts Respostes Vistes Activitat
1
de juny 18
3821
2
de nov. 16
6057
1
de gen. 19
3499
0
de maig 17
2930
1
d’oct. 23
1709