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

how can i replace 

field.related to use it in v8 

'product_id': fields.related('order_line', 'product_id', type='many2one', relation='product.product', string='Product'),
頭像
捨棄
最佳答案

In the new API, there is no fields.related. You can try

number = fields.Char(related='move_id.name', store=True, readonly=True, copy=False)

where move_id is a Many2one relation

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
3
9月 21
9623
4
1月 20
3409
0
11月 18
4673
0
4月 17
3961
2
3月 15
5293