When working with a recordset of length
1, the various fields are available as record attributes. Relational attributes (
Many2many) are also available with values that are recordsets too. When working with recordsets with more than one record, the attributes cannot be used.
This recipe shows how to use the
mapped() method to traverse recordset relations; we will write two methods performing the following operations:
We will be reusing the simplified Partner model shown in the Create new records recipe of this chapter. ...