跳至內容
選單
此問題已被標幟
1 回覆
3834 瀏覽次數

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 !!

頭像
捨棄
作者 最佳答案

Solution

_columns={

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

}

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
6月 18
4121
2
11月 16
6476
1
1月 19
3836
0
5月 17
3222
1
10月 23
2006