Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
3847 Visualizações

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
Cancelar
Autor Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
jun. 18
4125
2
nov. 16
6479
1
jan. 19
3843
0
mai. 17
3225
1
out. 23
2014