I have a model DrawingRequest
class DrawingRequest(models.Model):
[...]
drawings = fields.One2many('drawing.document', 'drawing_request_id', string='Drawings', tracking=True)
and a model drawing document
class DrawingDocument(models.Model):
_name = 'drawing.document'
_order = 'sequence,id'
sequence = fields.Integer('Sequence')
document = fields.Binary(string='Document', attachment=True)
filename = fields.Char('Filename')
drawing_request_id = fields.Many2one(
'drawing.request', "Drawing request", tracking=True)
I would like to refer to the 'first' (they are sequenced) DrawingDocument from my DrawingRequest
What is the easiest way to refer to this first DrawingDocument from a tree list of DrawingRequests ?