Skip to Content
Menu
This question has been flagged
1 Reply
3534 Views

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
Discard
Author 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
Discard
Related Posts Replies Views Activity
1
Jun 18
3794
2
Nov 16
6001
1
Jan 19
3457
0
May 17
2895
1
Oct 23
1681