Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3988 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Many2one related field แก้ไขแล้ว
3
ก.ย. 21
9760
Representation of Many2one in view แก้ไขแล้ว
4
ม.ค. 20
3518
0
พ.ย. 18
4763
0
เม.ย. 17
4080
2
มี.ค. 15
5412