Can someone explain to me something about related fields. For example –
- How it was used
- How it can be helped
- For which kind of scenario I should use fields.related
If anybody can provide a small example for real use of fields.related I would appreciate it.
It lets you pull a field from a related table. You can find more details in the developer book, and one example to look at is the
order_partner_idfield of thesale_order_lineclass. In version 5.14, that’s at line 806 ofaddons/sale/sale.py.I often find that I want to display a field in a list, but it’s on a parent record instead of the actual table that I’m listing.