[web2py] Re: paired fields in web2py

2017-08-07 Thread Massimo Di Pierro
You can use SQLFORM.factory but I recommend something like vue, ractive, or angular. In in the end it makes things simpler. On Monday, 7 August 2017 01:01:05 UTC-5, Mumtoz Dalimov wrote: > > Thanks a lot, Massimo. > I understood the structure of the model. > > Any ideas how to make convenient i

[web2py] Re: paired fields in web2py

2017-08-06 Thread 'Mumtoz Dalimov' via web2py-users
Thanks a lot, Massimo. I understood the structure of the model. Any ideas how to make convenient input of data in the View. Should inputter remember invoice.id each time he inputs invoice_item to get invoice_items grouped? Maybe I better use SQLFORM.factory to get 2 tables populated at once? An

[web2py] Re: paired fields in web2py

2017-08-04 Thread Massimo Di Pierro
I would do db.define_table('customer',Field('name')) db.define_table('product',Field('name')) db.define_table('invoice',Field('customer','reference customer')) db.define_table('invoice_item',Field('invoice','reference invoice'),Field(product','reference product'),Field('quantity','integer')) cus