Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3992 Zobrazení

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'),
Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
zář 21
9763
4
led 20
3520
0
lis 18
4764
0
dub 17
4083
2
bře 15
5415