Hi Peter, The code is from the editPO controller. Tried the writable = True, but no luck. It seems to me like the fields must be readable and writable at the same time to be properly inserted. Might just have to show all the fields and hide some of them using javascript. Or rewrite the SQLEDITABLE module. Wanted a quicky solution ;)
Thanks for the help. Cheers, Vic On Saturday, October 29, 2016 at 2:51:58 PM UTC+2, Peter wrote: > > Hi Vic, > > I'm a noob and don't want to waste your time so up front I'm saying you > might want to ignore this entirely! > > It's not clear (to me) where your 'editable' gets used after it is > assigned? > To a noob it looks like the non standard SQLEDITABLE could be bypassing > web2pys inbuilt methods? > but then it all looks non standard/advanced to me... > > Replacing the table's auth.signature to what I think is the older format > of two lines > > Field( 'created_by' , db.auth_user , default=me , writable=False , > readable=False ), > Field( 'created_on' , 'datetime' , default=request.now , writable=False > , readable=False ) > > > might work if you remove the read/write protection... > > Field( 'created_by' , db.auth_user , default=me ), > Field( 'created_on' , 'datetime' , default=request.now) > > > or leave auth.signature as it is and try making the fields read/writable > > db.purchase_order_product.created_by.readable=db.purchase_order_product.created_by.writable=True > > db.purchase_order_product.created_on.readable=db.purchase_order_product.created_on.writable=True > > > Peter > > [edit] > probably have to set their new values as well with appropriate default > values (me,request.now) > is there an editPO controller? for the ('editPO', args=po_id) > > and > db.purchase_order_product.currency.readable=False, > db.purchase_order_product.currency.writable=True > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.