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

Guys, how should it look like if I would like to adapt fields.related

into new API ?

in old API it is like:

'product_image': fields.related('product_id', 'image_medium', type='binary', 'Product Image')


Avatar
Discard
Best Answer

Hi, In new API :-

  product_image = fields.Binary(related='product_id.image_medium', string='Product Image')


Hope this help.


Avatar
Discard
Author

Thank you Baiju