You may want to read this part of the book: http://web2py.com/book/default/section/6/6?search=joins
On Jul 23, 4:41 pm, Massimiliano <[email protected]> wrote: > Hi, > > I'm sorry if it is a basic question but I don't find a clean way to do that. > > Imagine I'm showing an Invoice with related rows. > > How can I create a row and to assign automaticaly the invoice_id field in > the row record? > > db.define_table( > 'invoices', > Field('dateinvoice', 'date', default=now,label='Data') > ... > ) > > db.define_table( > 'invoice_rows', > Field('invoice_id', db.invoices) > ... > ) > > Thank you > -- > Massimiliano

